解题思路:
注意事项:
参考代码:
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner=new Scanner(System.in);
int c= scanner.nextInt();
int a,t,s,x,h,f=0;
for (int i = 0; i < c; i++){
int b= scanner.nextInt();
a=b%10;
t=(b/10)%10;
s=(b/100)%10;
x=(b/1000)%10;
h=t+s+x;
if(a-h>0) {
f++;
}
}
System.out.println(f);
}
}
0.0分
1 人评分