| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 140941 | 汪义罗 | 19斯诺克比赛 | C++ | Compile Error | 0 MS | 0 KB | 260 | 2025-12-20 14:58:14 |
#include<bits/stdc++.h> using namespace std; int main(){ int a[8]; for(int i=1;i<8;i++){ cin>>a[i]; } if(a[i]!=0){ int 1=7; while(a[i]==0)i--; sum+=a[1]*(1+i): } for(int i=2;i<=7;i++){ sum+=a[i]*i; } cout<<sum; return 0; }
Main.cc: In function 'int main()':
Main.cc:8:7: error: 'i' was not declared in this scope
if(a[i]!=0){
^
Main.cc:9:7: error: expected unqualified-id before numeric constant
int 1=7;
^
Main.cc:11:3: error: 'sum' was not declared in this scope
sum+=a[1]*(1+i):
^
Main.cc:14:3: error: 'sum' was not declared in this scope
sum+=a[i]*i;
^
Main.cc:16:8: error: 'sum' was not declared in this scope
cout<