| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 149671 | 李鸿文添 | 18统计成绩 | C++ | Compile Error | 0 MS | 0 KB | 527 | 2026-03-15 16:57:49 |
#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 a[101]n,s=0,max=-1,min=101; cin>>n; for(int i=1;i<=n;i++){ cin>>a[i]; if(a[i]>max){ max=a[i]; } if(a[i]<min){ min=a[i]; } a[i]=s; } printf("%d %.2lf %d %d")s,s*1.0/n,max,min; return 0; }
Main.cc: In function 'int main()':
Main.cc:7:15: error: expected initializer before 'n'
int a[101]n,s=0,max=-1,min=101;
^
Main.cc:8:10: error: 'n' was not declared in this scope
cin>>n;
^
Main.cc:10:12: error: 'a' was not declared in this scope
cin>>a[i];
^
Main.cc:17:12: error: 's' was not declared in this scope
a[i]=s;
^
Main.cc:19:28: warning: format '%d' expects a matching 'int' argument [-Wformat=]
printf("%d %.2lf %d %d")s,s*1.0/n,max,min;
^
Main.cc:19:28: warning: format '%lf' expects a matching 'double' argument [-Wformat=]
Main.cc:19:28: warning: format '%d' expects a matching 'int' argument [-Wformat=]
Main.cc:19:28: warning: format '%d' expects a matching 'int' argument [-Wformat=]
Main.cc:19:29: error: expected ';' before 's'
printf("%d %.2lf %d %d")s,s*1.0/n,max,min;
^