Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
140509 周宸宇 18高于平均分的学生数量 C++ Accepted 0 MS 272 KB 504 2025-12-15 18:49:05

Tests(10/10):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n,a[100],s=0,pjz,rs=0; cin>>n; for(int i=0;i<n;i++){ cin>>a[i]; s+=a[i]; } pjz=s/1.0/n; for(int i=0;i<n;i++){ if(a[i]>pjz){ rs++; } } cout<<rs; return 0; }