woshishaobei @ 2023-04-06 09:33:16
#include <bits/stdc++.h>
using namespace std;
double n=1;
double m;
double sum;
int main()
{
cin>>m;
while(sum<=m)
{
sum+=1/n;
cout<<sum<<endl;
n++;
}
cout<<n-1<<endl;
return 0;
}
by 5k_sync_closer @ 2023-04-06 09:40:29
@woshishaobei 有没有一种可能,他只让你输出一个整数
by woshishaobei @ 2023-04-06 09:54:12
调试的时候留的, 忘删了,我太“聪明”了
by chenyikai123456 @ 2023-04-09 11:33:22
666
by Kete @ 2023-10-04 15:29:22
牛