代码:
import java.util.Scanner;
//第十一届蓝桥杯
public class Main {
public static void main(String[] args) {
//试题F:成绩分析
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
float totalScore = 0;
int maxScore = 0;
int minScore = 100;
for (int i=0;i<n;i++) {
int score = sc.nextInt();
totalScore += score;
maxScore = maxScore >= score ? maxScore : score;
minScore = minScore <= score ? minScore : score;
}
System.out.println(maxScore+"\n"+minScore+"\n"+String.format("%.2f", totalScore/n));
}
}