Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
151384 万麟峰 18高于平均分的学生数量 C++ Accepted 2 MS 272 KB 298 2026-04-12 11:56:48

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int n; double s=0; cin>>n; int a[n]; for(int i=1;i<=n;i++){ cin>>a[i]; } for(int i=1;i<=n;i++){ s+=a[i]; } double d=s/n; int r=0; for(int i=1;i<=n;i++){ if(a[i]>d){ r++; } } cout<<r; return 0; }