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.

23 lines
363 B

#include<iostream>
#include<math.h>
using namespace std;
int main() {
double k;
double current = 0.000000;
cin >> k;
int count = 1;
while (true) {
current = current + 2.000000 * pow(0.98, count - 1);
if (current >= k) {
cout << count << endl;
break;
}
count++;
}
return 0;
}