解题思路:
注意事项:
参考代码:public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
int max1 = 0,max2 = 0;
for (int i = 0; i < n; i++) {
int A = sc.nextInt();
int B = sc.nextInt();
if (A>=90&&A<=140&&B>=60&&B<=90){
max1++;
}else {
max2 = Math.max(max2,max1);
max1 = 0;
}
}
System.out.println(Math.max(max1,max2));
}
}
0.0分
1 人评分
C二级辅导-计负均正 (C++代码)浏览:898 |
C语言程序设计教程(第三版)课后习题6.11 (C语言代码)浏览:475 |
点我有惊喜!你懂得!浏览:1395 |
C语言程序设计教程(第三版)课后习题8.9 (Java代码)浏览:1335 |
P1001 (C语言代码)浏览:801 |
C语言训练-求1+2!+3!+...+N!的和 (C语言代码)万恶的long long浏览:880 |
【排队买票】 (C语言代码)浏览:900 |
校门外的树 (C语言代码)浏览:702 |
Cylinder (C语言描述,蓝桥杯)浏览:1247 |
关于C语言变量位置的问题浏览:273 |