| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 131330 | 王奕杰 | 满足Sn>k的最小n | C++ | Compile Error | 0 MS | 0 KB | 2060 | 2025-09-22 18:47:09 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ double Sn=0; int k,n=0; cin>>k; while(Sn<=k){ n++; Sn+=1.0/n; } cout<<n; return 0; }#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ double Sn=0; int k,n=0; cin>>k; while(Sn<=k){ n++; Sn+=1.0/n; } cout<<n; return 0; }#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ double Sn=0; int k,n=0; cin>>k; while(Sn<=k){ n++; Sn+=1.0/n; } cout<<n; return 0; }#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ double Sn=0; int k,n=0; cin>>k; while(Sn<=k){ n++; Sn+=1.0/n; } cout<<n; return 0; }#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ double Sn=0; int k,n=0; cin>>k; while(Sn<=k){ n++; Sn+=1.0/n; } cout<<n; return 0; }
Main.cc:21:2: error: stray '#' in program
}#include // cin\cout\endl
^
Main.cc:41:2: error: stray '#' in program
}#include // cin\cout\endl
^
Main.cc:61:2: error: stray '#' in program
}#include // cin\cout\endl
^
Main.cc:81:2: error: stray '#' in program
}#include // cin\cout\endl
^
Main.cc:21:3: error: 'include' does not name a type
}#include // cin\cout\endl
^
Main.cc: In function 'int main()':
Main.cc:27:5: error: redefinition of 'int main()'
int main(){
^
Main.cc:7:5: note: 'int main()' previously defined here
int main(){
^
Main.cc: At global scope:
Main.cc:41:3: error: 'include' does not name a type
}#include // cin\cout\endl
^
Main.cc: In function 'int main()':
Main.cc:47:5: error: redefinition of 'int main()'
int main(){
^
Main.cc:7:5: note: 'int main()' previously defined here
int main(){
^
Main.cc: At global scope:
Main.cc:61:3: error: 'include' does not name a type
}#include // cin\cout\endl
^
Main.cc: In function 'int main()':
Main.cc:67:5: error: redefinition of 'int main()'
int main(){
^
Main.cc:7:5: note: 'int main()' previously defined here
int main(){
^
Main.cc: At global scope:
Main.cc:81:3: error: 'include' does not name a type
}#include // cin\cout\endl
^
Main.cc: In function 'int main()':
Main.cc:87:5: error: redefinition of 'int main()'
int main(){
^
Main.cc:7:5: note: 'int main()' previously defined here
int main(){
^