这题目 我完全不知道咋写 一脸懵逼 咋去比较呀 😭😭😭
求大佬救救迷茫的我
已解决
评论 (1)
- 受欢迎
- 新
- 旧
你必须先登录才能发表评论
Lisa
15 二月 2022, 12:48解决方法
1. Read 10 ints from the console and add them to a list
2. create some variables that hold a maxSequence and a currentSequence count
3. loop over the list and each element compare with it's next element. If they are equal, incement currentSequence, if not compare currentSequence with maxSequence and if curr > max, mac = curr
don't forget to reset currentSequence if the next element doesn't match
+2