Nyoj 97 兄弟郊游问题

来源:互联网 发布:淘宝怎么看申请时间 编辑:程序博客网 时间:2024/05/16 14:43

题目来源: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;}


0 0
原创粉丝点击