#include #include #include // for setprecision

using namespace std;

int main() { int n; cin >> n;

vector<int> scores(n);
int sum = 0;
for (int i = 0; i < n; i++) {
    cin >> scores[i];
    sum += scores[i];
}

double average = (double)sum / n;
int aboveAverage = 0;
int belowAverage = 0;

for (int i = 0; i < n; i++) {
    if (scores[i] >= average) {
        aboveAverage++;
    } else {
        belowAverage++;
    }
}

cout << fixed << setprecision(1) << average << " " << aboveAverage << " " << belowAverage << endl;

return 0;

}


原文地址: https://www.cveoy.top/t/topic/qjBb 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录