| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 128393 | 唐安轩 | 数列求和 | C++ | Compile Error | 0 MS | 0 KB | 198 | 2025-08-16 11:05:19 |
#include<bits/stdc++.h> using namespace std; int main(){ int n, long long a=1; long long sum=1; cin>>n; for(int i=2;i<=n;i++){ a=a*2; sum+=a; } cout<<sum<<endl; return 0; }
Main.cc: In function 'int main()': Main.cc:5:2: error: expected unqualified-id before 'long' long long a=1; ^ Main.cc:9:3: error: 'a' was not declared in this scope a=a*2; ^