#include <iostream>
#include <stdio.h>
using namespace std;
int main(){
int n, m, in;
cin >> n;
for(int i = 0; i < n; i++){
cin >> m;
int arr[m];
double ave = 0;
double percent = 0;
for(int j = 0; j < m; j++){
cin >> in;
arr[j] = in;
ave += in;
}
ave = ave/m;
// cout << ave << endl;
for(int j = 0; j < m; j++){
if(arr[j] > ave){
percent++;
}
}
percent = percent/m;
printf("%.3f%%\n", percent * 100);
}
return 0;
}