#include <iostream>
#define max 1000
using namespace std;
void input(int n){
float arr[max];
for(int i=0; i<n; i++){
double average = 0.0;
int m,cnt=0;
cin >> m;
for(int j=0; j<m; j++){
cin >> arr[j];
average += arr[j];
}
average = average/m;
for(int j=0; j<m; j++){
if(arr[j] > average) cnt++;
}
cout<< fixed;
cout.precision(3);
cout << (double)cnt/m * 100.0 << "%" << endl;
}
}
int main(){
int n;
cin >> n;
input(n);
return 0;
}
'백준알고리즘' 카테고리의 다른 글
백준 1065 C++ (0) | 2021.06.30 |
---|---|
백준 4673 C++ (0) | 2021.06.28 |
백준 2588 C++ (0) | 2021.06.28 |
백준 10869 C++ (0) | 2021.06.28 |
백준 1546번 C++ (0) | 2021.06.28 |