Start: Jul, 03, 2019 08:38:00
2019年度暑期短学期第七天 助教场
End: Jul, 04, 2019 23:00:00
Time elapsed:
Time remaining:

Problem_ID: H
Result: Accepted
Time: 4ms
Memory: 1756kB
Author: 2017212212083
In contest: 1292

#include<bits/stdc++.h>

using namespace std;

double a, b, x, s;

int main() {
    while (~scanf("%lf %lf %lf", &a, &b, &x)) {
        double tmp = a * (2 - x) / 2 / (1 - x) / (1 - x) * b * 0.01;
        s = 0;
        int i;
        double temp = 1;
        for (i = 1; s < tmp; ++i) {
            s += (i + 1) / 2.0 * a * temp;
            temp *= x;
        }
        printf("%d\n", i - 1);
    }
    return 0;
}