| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 120296 | 钟驰 | 22第n项的数 | C++ | Compile Error | 0 MS | 0 KB | 273 | 2025-05-25 09:59:59 |
#include<bits/stdc++.h> using namespace std; int main() { int a[4],c1,c2; for(int i=0;i<4;i++) cin>>a[i]; c1=a[1]-a[0]; c2=a[3]-a[2]; b=a[1]/a[0]; if(c1==c2) cout<<a[0]+c1*(n-1); else cout<<int(a[0]*pow(b,(n-1))); return 0; }
Main.cc: In function 'int main()':
Main.cc:10:6: error: 'b' was not declared in this scope
b=a[1]/a[0];
^
Main.cc:12:19: error: 'n' was not declared in this scope
cout<