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

Tests(0/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[n],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; }


Run Info:

*** stack smashing detected ***: ./Main terminated