0分,救命!
查看原帖
0分,救命!
1040355
zengziyuezzy楼主2023/8/3 19:45
#include<bits/stdc++.h> 
using namespace std;
int main()
{
	double cnt;
	int n = 1,k;
	cin >> k;
	while(cnt < k)
	{
		cnt += (1.0 / n);
		n++;
	}
	cout << n;
	return 0;
}
2023/8/3 19:45
加载中...