Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
150120 王晏林 满足Sn>k的最小n C++ Accepted 1 MS 272 KB 216 2026-03-22 11:51:02

Tests(10/10):


Code:

#include<iostream> #include<cmath> using namespace std; int main(){ double k,sn=1; int n=1; cin>>k; while(sn<=k){ sn+=pow(n+1,-1); n++; } cout<<n<<endl; return 0; }