每日leetcode_LCP01猜数字
记录自己的成长,加油。
题目出处:LCP 01. 猜数字 - 力扣(LeetCode)
题目
解题
class Solution {
public int game(int[] guess, int[] answer) {
int count = 0;
for (int i = 0 ; i< guess.length; i++){
if(guess[i] == answer[i]){
count ++;
}
}
return count;
}
}