| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 131756 | 罗晟睿 | 05等差数列 | C++ | Compile Error | 0 MS | 0 KB | 155 | 2025-10-01 13:51:40 |
#include<bits/stdc++.h> using namespace std; int main(){ int a1,a2,d,d; cin>>a1>>a2>>n; d=a2-a1; cout<<a1+(n-1)*d; return 0; }
Main.cc: In function 'int main()':
Main.cc:5:17: error: redeclaration of 'int d'
int a1,a2,d,d;
^
Main.cc:5:15: note: 'int d' previously declared here
int a1,a2,d,d;
^
Main.cc:6:18: error: 'n' was not declared in this scope
cin>>a1>>a2>>n;
^