#include<stdio.h>
int n, m, sum, cnt;
int a[100000];
int main()
{
scanf("%d", &n);
for (int i = 0; i < n; i++){
scanf("%d", &m);
if (m == 0) printf("0.000%%\n");
sum = 0;
for (int j = 0; j < m; j++){
scanf("%d", &a[j]);
sum += a[j];
}
cnt = 0;
for (int j = 0; j < m; j++){
if (a[j] * m >= sum) cnt++;
}
printf("%.3lf%%\n", (double)cnt / (double)m*100.0);
}
return 0;
}