728x90
const fs = require('fs');
const input = require('fs').readFileSync('/dev/stdin').toString().trim().split('\n');
let start = 1;
let arr = input.map((num) => Number(num))
arr = arr.sort((a, b) => a-b)
while(start <= 30) {
if(arr[start-1] !== start) {
console.log(start)
arr.splice(start-1, 0, start)
}
start++
}
728x90
'Development > 코딩테스트' 카테고리의 다른 글
[백준] 2743 Node.js (0) | 2022.09.13 |
---|---|
[백준] 2738 node.js (0) | 2022.09.05 |
[백준] 10807 Node.js (0) | 2022.09.03 |
[백준] 10871 Node.js (0) | 2022.09.02 |
[백준] 10950 Node.js (0) | 2022.09.01 |
댓글