Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
110268 | 吴梓玄 | 18高于平均分的学生数量 | C++ | Accepted | 1 MS | 272 KB | 264 | 2025-02-15 16:38:52 |
#include <bits/stdc++.h> using namespace std; int main() { int w,s=0,t=0; cin>>w; int a[w+5]; for(int i=1;i<=w;i++){ cin>>a[i]; s=s+a[i]; } float p=1.0*s/w; for(int i=1;i<=w;i++){ if(a[i]>p){ t=t+1; } } cout<<t; return 0; }