ysh 杨书蘅 · 发布于 2024-11-27 · 浏览 568 回复 0 include <bits/stdc++.h> using namespace std; int main() { double k, n = 1, s = 0; scanf("%lf", &k); while (s <= k) { s = s + (1.0 / n) ; n++; } printf("%.0lf", n - 1); return 0; }