Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
124962 | 王宸轩 | 18高于平均分的学生数量 | C++ | Accepted | 1 MS | 280 KB | 262 | 2025-07-13 09:01:49 |
#include<bits/stdc++.h> using namespace std; int main(){ int a[101],n,sum=0,cnt=0; float pj; cin>>n; for(int i=0;i<n;i++){ cin>>a[i]; sum+=a[i]; } pj=float(sum)/n; for(int i=0;i<n;i++) if(a[i]>pj) cnt++; cout<<cnt; return 0; }