| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 80488 | 赵文浚 | 18统计成绩 | C++ | Compile Error | 0 MS | 0 KB | 342 | 2024-07-11 14:51:23 |
#include<bits/stdc++.h> using namespace std; int main() { double n; double s=0; cin>>n; int a[n]; for (int i=1;i<=n;i++) { cin>>a[i]; s+=a[i]; } cout <<s<<" "; printf("%.21f",s/n); int max=0,min=0; for (int i=1;i<=n;i++) { if(a[i]<min) { min=a[i]; } } cout<<" "<<max<<" "<<min return 0; }
Main.cc: In function 'int main()':
Main.cc:8:9: error: size of array 'a' has non-integral type 'double'
int a[n];
^
Main.cc:25:2: error: expected ';' before 'return'
return 0;
^