本题重点在于比较会使用比较即可
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s=new Scanner(System.in);
int []arr=new int[10];
int d=0;
for (int i = 0; i < 10; i++) {
arr[i] = s.nextInt();
}int c= s.nextInt();
for (int i = 0; i < 10; i++) {
if (arr[i]<=c+30){
d++;
}
}
System.out.println(d);
}
}