hdu 2547

地址:http://acm.hdu.edu.cn/showproblem.php?pid=2547

题意:中文。

mark:其实就是求两点间距离,水。注意输入数据是实数。

代码:

# include <stdio.h>
# include <math.h>


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



posted @ 2012-02-19 07:49  Seraph2012  阅读(201)  评论(0编辑  收藏  举报