728x90
import java.util.Arrays;
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int line = sc.nextInt();
double [] sub = new double [line];
for(int i = 0; i < line; i++) {
sub[i] = sc.nextInt();
}
Arrays.sort(sub);
double sum = 0;
for(int i = 0; i < line; i++) {
sub[i] = ((double)(sub[i] / sub[line-1]))*100;
sum += sub[i];
}
System.out.println(sum/line);
}
}
728x90
'알고리즘 > 백준(backjoon)' 카테고리의 다른 글
[Baekjoon]백준 NO.4344 평균은 넘겠지(브론즈1) / Java(자바) (0) | 2021.07.18 |
---|---|
[Baekjoon]백준 NO.8958 OX퀴즈(브론즈2) / Java(자바) (0) | 2021.07.16 |
[Baekjoon]백준 NO.3052 나머지(브론즈2) / Java(자바) (0) | 2021.07.14 |
[Baekjoon]백준 NO.2577 숫자의 개수 / Java(자바) (0) | 2021.07.11 |
[Baekjoon]백준 NO.2562 최댓값 / Java(자바) (0) | 2021.07.10 |