当前位置:首页 > 编程笔记 > 正文
已解决

每日leetcode_LCP01猜数字

来自网友在路上 174874提问 提问时间:2023-10-12 09:56:55阅读次数: 74

最佳答案 问答题库748位专家为你答疑解惑

每日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;}
}
查看全文

99%的人还看了

猜你感兴趣

版权申明

本文"每日leetcode_LCP01猜数字":http://eshow365.cn/6-19153-0.html 内容来自互联网,请自行判断内容的正确性。如有侵权请联系我们,立即删除!