Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
121190 胡汪兵-小胡老师 18高于平均分的学生数量 C++ Accepted 1 MS 276 KB 274 2025-06-07 09:02:55

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a[101],n,sum=0,count=0; float pj; cin>>n; for(int i=1;i<=n;i++) { cin>>a[i]; sum+=a[i]; } pj=float(sum)/n; for(int i=1;i<=n;i++) if(a[i]>pj) count++; cout<<count; return 0; }