louzhu @ 2023-03-11 13:22:51
#include <bits/stdc++.h>
using namespace std;
int main()
{
int k;
cin >> k;
int cnt = 0;
double sum = 0;
while(sum <= k)
{
cnt++;
sum += 1 / cnt;
}
cout << cnt << endl;
return 0;
}
by Angel0418 @ 2023-03-11 13:28:55
@louzhu 复杂度