import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner s = new Scanner(System.in);
System.out.println("请输入学生个数:");
int count = s.nextInt();
System.out.println("请输入这"+ count +"个学生的成绩:");
int[] score = new int[count];
int maxScore =0;
for (int i =0;i < 5;i++ ){
score[i] = s.nextInt();
if (score[i] > maxScore){
maxScore = score[i];
}
}
System.out.println("最高分是"+maxScore);
char level;
for (int i =0 ;i<score.length;i++){
if (score[i] >= maxScore - 10){
level = 'A';
}else if (score[i] >= maxScore - 20){
level = 'B';
}else if (score[i] >= maxScore - 30){
level = 'C';
}else {
level = 'D';
}
System.out.println("第"+ (i+1) +"个学生的成绩是"+score[i]+",成绩的等级是:" + level);
}
}
}