https://www.acmicpc.net/problem/4344
#include<stdio.h>
int main() {
int n;
scanf("%d",&n);
for(int i=0;i<n;i++){
int m;
scanf("%d",&m);
int sum=0;
int count=0;
int arr[m];
for(int i=0;i<m;i++){
scanf("%d",&arr[i]);
sum+=arr[i];
}
double ave=(double)sum/m;
for(int j=0;j<m;j++){
if(arr[j]>ave) count++;
}
printf("%.3f%c\n",(double)count*100/m,'%');
}
}