114514aaaazx @ 2024-05-22 22:08:13
#include<bits/stdc++.h>
using namespace std;
int main(){
double n,k=0,t=0;
cin>>k;
for(n=1;t>k;n++)t=1/n+t;
n=t;
cout<<n;
}
by ZhangXuKun @ 2024-05-22 22:22:18
#include<bits/stdc++.h>
using namespace std;
int main(){
double n, k = 0, t = 0;
cin >> k;
for (n = 1; t >= k; n++) {
t = 1 / n + t;
}
n = t;
cout << n;
}
by 114514aaaazx @ 2024-05-22 22:26:10
我真服了 devc++的编译器是错误的,在洛谷又对了 【生气】