Development82 [백준] 1436 Node.js const fs = require('fs'); const N = fs.readFileSync("/dev/stdin").toString().trim(); let input = Number(N); let num = 665; while(input > 0) { num++ if(num.toString().includes('666')) { input--; } } console.log(num) 2022. 10. 28. [백준] 1181 Node.js const fs = require('fs'); const [N, ...arr] = fs.readFileSync("/dev/stdin").toString().trim().split("\n"); arr.sort((a, b) => a.length - b.length || a.localeCompare(b)) console.log(Array.from(new Set(arr)).join('\n')) localeCompare 내장 메소드가 이렇게 유용할 줄은...! 2022. 10. 26. [백준] Node.js 2775 const fs = require('fs'); const [T, ...arr] = fs.readFileSync("/dev/stdin").toString().trim().split("\n"); for (let i = 0; i < Number(T); i++) { const k = Number(arr.shift()); const n = Number(arr.shift()); const apt = []; for (let j = 0; j 2022. 10. 12. [백준] 2798 Node.js const fs = require('fs'); const input = fs.readFileSync("/dev/stdin").toString().trim().split("\n"); const [N, M] = input[0].split(" ").map(Number); let arr = input[1].split(" ").map(Number); arr = arr.sort((a, b) => a-b) let result = 0; let sum = 0; for (let i = 0; i =0 && result 2022. 9. 30. 이전 1 2 3 4 ··· 21 다음