You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#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;
|
|
}
|