题目来源:http://acm.nyist.net/JudgeOnline/problem.php?pid=97
#include <iostream>
#include <cstdio>
using namespace std;
int main()
{
double k, dis, x, y, z, m;
int T;
scanf("%d", &T);
while(T--)
{
scanf("%lf %lf %lf %lf", &m, &x, &y, &z);
k = (m*x)/(y-x);
dis = k * z;
printf("%.2lf\n", dis);
}
return 0;
}