0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-27 07:31:58 +00:00
OI-codes/Luogu/P1163/P1163.cpp

21 lines
409 B
C++
Raw Normal View History

2020-10-25 12:45:23 +00:00
#include <bits/stdc++.h>
using namespace std;
int main() {
double n, m, k, l, r, mid;
cin >> n >> m >> k;
l = 00.0;
r = 10.0;
while (r - l >= 0.0001) {
mid = (l + r) / 2;
if (pow(1.0 / (1.0 + mid), k) >= 1 - n / m * mid) {
r = mid;
2021-11-19 09:01:13 +00:00
} else {
2020-10-25 12:45:23 +00:00
l = mid;
}
}
cout << fixed << setprecision(1) << l * 100 << endl;
return 0;
}