标签:
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 4112 Accepted Submission(s): 2638
2 0 0 3 4 4 0 0 3
5.0 5.0
解题思路:x,y为变量就是求亮两点之间的最短距离
</pre></p><p><pre class="java" name="code">package HDU; import java.util.Scanner; public class P2547 { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); while(n-->0){ double a=sc.nextDouble(); double b=sc.nextDouble(); double c=sc.nextDouble(); double d=sc.nextDouble(); System.out.printf("%.1f",Math.sqrt((a-c)*(a-c)+(b-d)*(b-d))); System.out.println(); } } }
标签:
原文地址:http://blog.csdn.net/xianzgiyou/article/details/48034859