import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int []a=new int[n]; int []grade=new int[5]; int []score={0,60,70,80,90,101}; for (int i = 0; i < a.length; i++) { a[i]=sc.nextInt(); if(a[i]>=90) grade[4]++; else if(a[i]>=80) grade[3]++; else if(a[i]>=70) grade[2]++; else if(a[i]>=60) grade[1]++; else grade[0]++; } int max=0,index=0; for (int i =grade.length-1; i>=0; i--) { if(grade[i]>max){ max=grade[i];index=i; } if(i==0)System.out.println(grade[i]); else System.out.print(grade[i]+" "); } System.out.println(max); Arrays.sort(a);String s=""; for (int i = a.length-1; i >=0; i--) { if(a[i]>=score[index]&&a[i]<score[index+1]) s+=a[i]+" "; } System.out.println(s.trim()); } }
0.0分
1 人评分