풀이
class Solution {
public int[] solution(int[] lottos, int[] win_nums) {
int[] answer = {0,0};
int z = 0;
int c = 7;
for(int i=0; i<6; i++){
for(int j=0; j<6; j++){
if(win_nums[i] == lottos[j]){
c --;
}
}
}
for(int i=0; i<6; i++){
if(lottos[i] == 0){
z ++;
}
}
answer[0] = c-z;
answer[1] = c;
if(answer[1] == 7){
answer[1] = 6;
}
if(answer[0] == 7){
answer[0] = 6;
}
return answer;
}
}