代码
#include<bits/stdc++.h> using namespace std; int main() { long long s,n,k,q; cin>>k; for (n=1;n<=k;n++) { s=s+1/n; if(s>k) { cout<<n; } } }