LCP 01. 猜数字 - 力扣(LeetCode)
一、Java
class Solution {public int game(int[] guess, int[] answer) {int cnt=0;for(int i=0;i<3;i++){if(guess[i]==answer[i])cnt++;}return cnt;}
}
LCP 01. 猜数字 - 力扣(LeetCode)
一、Java
class Solution {public int game(int[] guess, int[] answer) {int cnt=0;for(int i=0;i<3;i++){if(guess[i]==answer[i])cnt++;}return cnt;}
}