https://programmers.co.kr/learn/courses/30/lessons/86051
function solution(numbers) {
let answer=0;
for(let i=0; i<=9; i++){
if(!numbers.includes(i)) answer+=i;
}
return answer;
}
function solution(numbers) {
let answer=0;
let idx=0;
numbers = numbers.sort((a, b) => a - b); //오름차순
for(let i=0; i<=9; i++){
if(numbers[idx]===i) idx++;
else answer+=i;
}
return answer;
}