'commit'
This commit is contained in:
16
TangDou/LuoGuBook/P1423.cpp
Normal file
16
TangDou/LuoGuBook/P1423.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
double k;
|
||||
double x;
|
||||
|
||||
int main() {
|
||||
cin >> k;
|
||||
for (int cnt = 1;; cnt++) {
|
||||
x += 2.0 * pow(0.98, cnt - 1);
|
||||
if (x >= k) {
|
||||
cout << cnt << endl;
|
||||
exit(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user