Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
150102 孔声豪 满足Sn>k的最小n C++ Accepted 1 MS 276 KB 221 2026-03-22 11:22:23

Tests(10/10):


Code:

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