WA code:
#include <bits/stdc++.h> using namespace std; int main() { int k; cin >> k; int n = 1; double cnt = 0; while(cnt <= k) { cnt += 1.0 / n; n++; } cout << n; return 0; }