Development82 [백준] 2292 Node.js const fs = require('fs'); const input = fs.readFileSync("/dev/stdin").toString().trim(); let result = 1; let i = 1; while(true) { if(input 2022. 9. 29. [백준] 1085 Node.js const fs = require('fs'); const [x,y,w,h] = fs.readFileSync("/dev/stdin").toString().trim().split(" ").map(Number); console.log(Math.min(...[w-x, h-y, x, y])) 2022. 9. 29. [백준] 1259 Node.js const fs = require('fs'); const arr = fs.readFileSync("/dev/stdin").toString().trim().split("\n"); for (let i = 0; i < arr.length; i++) { if(arr[i] == 0) { break; } test(arr[i].split('')) } function test(n) { let result = 'no'; for (let i = 0; i < n.length; i++) { if((n[i] == n[n.length-1-i]) == false) { result = 'no'; break; } result = 'yes'; } console.log(result); } 2022. 9. 28. [백준] 3052 Node.js const fs = require('fs'); const input = fs.readFileSync("/dev/stdin").toString().trim().split("\n").map(Number); const obj = {} input.forEach((n, i) => { obj[n%42] = obj[n%42]? obj[n%42] +1 : 1 }) console.log(Object.keys(obj).length) 2022. 9. 28. 이전 1 2 3 4 5 ··· 21 다음