0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-12-01 01:36:27 +00:00
OI-codes/problem/P1258/P1258.cpp
Ren Baoshuo 4a3d4d6ec0
P1258 小车问题
C++: R40248094
Python: R40249214
2020-10-21 21:46:15 +08:00

11 lines
229 B
C++

#include <bits/stdc++.h>
using namespace std;
int main() {
double s, a, b;
scanf("%lf%lf%lf", &s, &a, &b);
printf("%.6lf\n", ((b + a) * s / (b + 3 * a)) / b + (s - ((b + a) * s / (b + 3 * a))) / a);
return 0;
}