Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
106488 | 杜洛雨泽 | 18高于平均分的学生数量 | C++ | Accepted | 1 MS | 268 KB | 311 | 2025-01-16 11:53:02 |
#include<bits/stdc++.h> using namespace std; int main() { int n; cin >> n; int a[n]; for (int i = 0; i < n; i++) { cin >> a[i]; } int sum=0,p; for(int i=0;i<n;i++){ sum=sum+a[i]; } p=sum/n; int b=0; for(int i=0;i<n;i++){ if(a[i]>p){ b++; } } cout<<b; return 0; }