Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
100978 秦浩然 满足Sn>k的最小n C++ Compile Error 0 MS 0 KB 402 2024-12-14 12:00:30

Tests(0/0):


Code:

#include<iostream> using namespace std; int main(){ double n=0,k,s=0; cin>>k; while(s <= k){ n++; s=s+1.0/n; } cout<<n; return 0; }#include<iostream> using namespace std; int main(){ double n=0,k,s=0; cin>>k; while(s <= k){ n++; s=s+1.0/n; } cout<<n; return 0; }


Run Info:

Main.cc:14:2: error: stray '#' in program
 }#include
  ^
Main.cc:14:3: error: 'include' does not name a type
 }#include
   ^
Main.cc: In function 'int main()':
Main.cc:16:5: error: redefinition of 'int main()'
 int main(){
     ^
Main.cc:3:5: note: 'int main()' previously defined here
 int main(){
     ^