提交时间:2024-01-26 15:29:13

运行 ID: 129009

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