#include <iostream>
using namespace std;
int main()
{
int n;
cin>>n;
while(n--)
{
double m, x, y, z;
cin>>m>>x>>y>>z;
cout.precision(2);
cout<<fixed<<m*x/(y-x)*z<<endl;
}
return 0;
}
兄弟郊游问题
最新推荐文章于 2020-12-11 17:43:51 发布
#include <iostream>
using namespace std;
int main()
{
int n;
cin>>n;
while(n--)
{
double m, x, y, z;
cin>>m>>x>>y>>z;
cout.precision(2);
cout<<fixed<<m*x/(y-x)*z<<endl;
}
return 0;
}