#include<iostream>
#include<iomanip>
using namespace std;
void main(){
int n;
cin>>n;
int k;
double *p;
while(n-- > 0){
cin>>k;
p = new double[k];
double sum = 0;
for(int i=0;i<k;i++){
cin>>p;
sum += p;
}
int c = 0;
double ave = sum/(double)k;
for(i=0;i<k;i++){
if(p > ave) c++;
}
delete p;
double x = (double)100*c/k;
cout<<setprecision(3)<<setiosflags(ios::fixed)<<x<<"%"<<endl;
}
}
A simple problem but I've got a lot of CE.
Why ?Thanks in advance!!