| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 158923 | 余建成 | 22第n项的数 | C++ | Compile Error | 0 MS | 0 KB | 257 | 2026-08-23 13:33:06 |
#include<iostream> using namespace std; int main(){ int n; long long x[100],k; cin>>n; for(int i=0;i<4;i++){ cin>>x[i]; } int a=x[1]-x[0]; if(x[3]-x[2]==a)k=x[0]+[n-1]*a; else k=[0]*pow(x[2]/x[1],n-i); cout<<x; return 0; }
Main.cc: In function 'int main()':
Main.cc:11:27: error: expected ',' before '-' token
if(x[3]-x[2]==a)k=x[0]+[n-1]*a;
^
Main.cc:11:27: error: expected identifier before '-' token
Main.cc: In lambda function:
Main.cc:11:30: error: expected '{' before '*' token
if(x[3]-x[2]==a)k=x[0]+[n-1]*a;
^
Main.cc: In function 'int main()':
Main.cc:11:30: error: no match for 'operator*' (operand types are 'main()::' and 'int')
Main.cc:12:10: error: expected identifier before numeric constant
else k=[0]*pow(x[2]/x[1],n-i);
^
Main.cc: In lambda function:
Main.cc:12:12: error: expected '{' before '*' token
else k=[0]*pow(x[2]/x[1],n-i);
^
Main.cc: In function 'int main()':
Main.cc:12:29: error: 'i' was not declared in this scope
else k=[0]*pow(x[2]/x[1],n-i);
^
Main.cc:12:30: error: 'pow' was not declared in this scope
else k=[0]*pow(x[2]/x[1],n-i);
^