| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 150116 | 余建成 | 满足Sn>k的最小n | C++ | Compile Error | 0 MS | 0 KB | 216 | 2026-03-22 11:48:16 |
#include<bits/stdc++.h> using namespace std; int main() { double sn=1,k, int n=1; cin>>k; while(sn<=k) { sn+=pow(n+1,-1) n++; } cout<<n<<endl; return 0; }
Main.cc: In function 'int main()':
Main.cc:6:5: error: expected unqualified-id before 'int'
int n=1;
^
Main.cc:10:17: error: 'n' was not declared in this scope
sn+=pow(n+1,-1)
^
Main.cc:13:11: error: 'n' was not declared in this scope
cout<