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 ;
}



原文地址:https://www.cnblogs.com/lzsz1212/p/2357865.html