Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
131755 罗晟睿 05等差数列 C++ Compile Error 0 MS 0 KB 155 2025-10-01 13:51:13

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a1,a2,d,d; cin>>a1>>a2>>n; d=a2-a1; cout<<a1+(a-1)*d; return 0; }


Run Info:

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;
                  ^
Main.cc:8:15: error: 'a' was not declared in this scope
     cout<