numbers result
[1,2,3,4,6,7,8,0] 14
[5,8,4,0,6,7,9] 6
import java.util.*;
class Solution {
public int solution(int[] numbers) {
int answer = 0;
int[] sum = {0,1,2,3,4,5,6,7,8,9};
for(int i = 0; i< sum.length; i++){
for(int j=0; j< numbers.length; j++){
if(sum[i] == numbers[j]){
sum[i] -= numbers[j];
}
}
answer += sum[i];
}
return answer;
}
}
class Solution {
public int solution(int[] numbers) {
int answer = 0;
int sum = 0;
for(int i=0; i<numbers.length; i++){
sum += numbers[i];
}
return answer = 45-sum;
}
}