Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
131331 王奕杰 满足Sn>k的最小n C++ Accepted 3 MS 272 KB 412 2025-09-22 18:47:17

Tests(10/10):


Code:

#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; }