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;

}

全部回复 共 0 条

还没有人回复。往下写第一条。

发表回复