using namespace std; int n=1,k,b; double a=1; int main(){ cin>>k; for(int i=2;a<=k;i++){ a+=1.0/i; n++; } cout<<n; return 0; }
使用您的 蒙青创OJ 通用账户