提交时间:2024-01-26 09:22:52

运行 ID: 128756

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