| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 118717 | 陈骏睿 | 19斯诺克比赛 | C++ | Compile Error | 0 MS | 0 KB | 577 | 2025-05-10 11:01:29 |
#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[8]={0},w=0,i; cin>>a[8]; for(int i=1;i<=7;i++) cin>>a[i] if(a[1]!=0){ while(a[i]==0) i--; if(i==1){ cout<<i<<endl; return 0; } else w+=a[1]=(1+i); } for(int j=2;j<=7;j++){ w+=a[j]*j; } cout<<w; return 0; }
Main.cc: In function 'int main()':
Main.cc:12:3: error: expected ';' before 'if'
if(a[1]!=0){
^
Main.cc:8:18: warning: unused variable 'w' [-Wunused-variable]
int a[8]={0},w=0,i;
^
Main.cc:8:22: warning: unused variable 'i' [-Wunused-variable]
int a[8]={0},w=0,i;
^
Main.cc:27:1: error: expected '}' at end of input
}
^