Files
python/TangDou/XiTi/1242.cpp

20 lines
331 B
C++
Raw Normal View History

2025-08-30 18:35:01 +08:00
#include <bits/stdc++.h>
using namespace std;
int main() {
float x;
cin >> x;
float pre = 2;
float sum = 2;
for (int i = 2;; i++) {
sum += pre * 0.98;
pre = pre * 0.98;
if (sum > x) {
cout << i << endl;
break;
}
}
return 0;
}