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.

33 lines
936 B

2 years ago
#include <bits/stdc++.h>
using namespace std;
/**
x,y
ab
z?
x:yb:a
x*b:y*a
z * (y*a)/(x*b+y*a)
7 4 80 50 2010
v * x/y = v
80 v + 50 v =2010
80 v + 50 v x/y=2010
80 v + 50 v * 7 /4=2010
80a+50×a÷4×7=2010
80a+87.5a=2010
167.5a=2010
a=12
=12×80=960
*/
int main() {
int x, y, a, b, z;
cin >> x >> y >> a >> b >> z;
cout << z * (a * y) / (a * y + x * b) << endl;
return 0;
}