0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-23 23:48:48 +00:00

P1035 [NOIP2002 普及组] 级数求和

R58891633
This commit is contained in:
Baoshuo Ren 2021-10-02 09:46:25 +08:00 committed by Baoshuo Ren
parent a9ea25dbd1
commit 6dcb3facc8
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

View File

@ -0,0 +1,15 @@
#include <bits/stdc++.h>
using namespace std;
int k, n;
double s;
int main() {
cin >> k;
while (s <= k) {
s += 1.00 / ++n;
}
cout << n << endl;
return 0;
}