hdu2547 无剑无我

来源:互联网 发布:异次元杀阵1解析 知乎 编辑:程序博客网 时间:2024/04/30 23:43
#include <stdio.h>
#include <math.h>


int main()
{
    int t;
    double a, b, c, d, ans;
    scanf("%d", &t);
    while(t--)
    {
        scanf("%lf%lf%lf%lf", &a, &b, &c, &d);
        ans = sqrt(a*a + b*b + c*c + d*d - 2*a*c - 2*b*d);
        printf("%.1lf\n", ans);
    }
    return 0;

}

心得:今天没心情做难题,水。

0 0
原创粉丝点击