Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
6969 詹梓涵 18高于平均分的学生数量 C++ Accepted 0 MS 260 KB 307 2025-03-29 12:53:25

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int a[101],n,x=0,z=0; int main(){ cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; x=a[i]+x; } x=x*1.0/n; for(int i=1;i<=n;i++){ if(a[i]>x){ z++; } } cout<<z<<endl; return 0; }