提交时间:2021-05-27 20:32:32

运行 ID: 19983

#include<bits/stdc++.h> using namespace std; int main() { // freopen("x12_2.in","r",stdin); // freopen("x12_2.out","w",stdout); int n,s,i; double sum=1; cin>>s; for(i=2;sum<=s;++i) sum+=1.0/i; cout<<i-1; return 0; }