| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 152437 | 张蔚林 | 18高于平均分的学生数量 | C++ | Compile Error | 0 MS | 0 KB | 247 | 2026-04-26 11:01:32 |
#include<bits/stdc++.h> using namespace std; int main() { int n,a[101]={ },z=0; cin>>n; for(int i=0;i<n;i++){ cin>>a[i]; z+=a[i]; } double p=z*1.0/n; for(int i=0;i<n;i++){ if(a[i]>=p)c++; } cout<<c<<endl; return 0; }
Main.cc: In function 'int main()':
Main.cc:13:14: error: 'c' was not declared in this scope
if(a[i]>=p)c++;
^
Main.cc:15:8: error: 'c' was not declared in this scope
cout<