

[풀이]
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int n = sc.nextInt();
double[] scores = new double[n];
double max = 0;
for (int i = 0; i < n; i++) {
scores[i] = sc.nextInt();
if (scores[i] > max) {
max = scores[i];
}
}
double sum = 0;
for (int i = 0; i < n; i++) {
scores[i] = scores[i] / max * 100;
sum += scores[i];
}
System.out.println(sum / n);
}
}
[결과]

'알고리즘 > 백준' 카테고리의 다른 글
| [백준] 1330번 / 두 수 비교하기 (0) | 2025.08.05 |
|---|---|
| [백준] 1001번 / A-B (0) | 2025.08.05 |
| [백준] 11720번 / 숫자의 합 (1) | 2025.07.29 |
| [백준] 알고리즘 8958 OX퀴즈 (0) | 2021.04.17 |
| [백준] 알고리즘 2562 최댓값 (0) | 2021.04.16 |