import java.util.Arrays;
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
int C = input.nextInt();
students students[] = new students[C];
for(int i=0; i<C; i++){
students[i] = new students(input.nextInt());
for(int j=0; j<students[i].N; j++){
students[i].scores[j]=input.nextInt();
}
students[i].setpercentage();
}
for(int i=0; i<C; i++){
System.out.printf("%.3f",students[i].percent);
if(i<C-1)
System.out.println();
}
}
}
class students{
int N;
int scores[] = new int[N];
double percent;
public students(){}
public students(int k){
N=k;
}
public void setpercentage(){
int k=0;
double sum=0;
for(int i=0; i<N; i++){
sum += scores[i];
}
for(int i=0; i<N; i++){
if(scores[i]>sum/N)
k++;
}
percent= Math.floor((double)1000*k/N)/1000.0;
}
}
어디서 문제가 생겼나요?