Hide

Problem H
Computer, compute!

You likely know the Euclidean distance formula – the formula to find the distance d between two points, (x1,y1) and (x2,y2), in a plane.

The formula is d=(x2x1)2+(y2y1)2

You will take the two integer coordinates as input and compute the distance between them.

Hint: You can use the sqrt function in the math module.

Input

Input consists of four lines. The first line consists of one integer x1, the x-coordinate of the first point. The second line consists of one integer y1, the y-coordinate of the first point. The third line consists of one integer x2, the x-coordinate of the second point. The fourth line consists of one integer y2, the y-coordinate of the second point. It is guaranteed that 10000x1,y1,x2,y210000.

Output

Output one line with one floating point number d, the Euclidean distance between the two points. The output number should have an absolute or relative error of at most 109.

Sample Input 1 Sample Output 1
-5
-5
-11
-13
10.000000000000000
Sample Input 2 Sample Output 2
0
0
0
0
0.000000000000000
Sample Input 3 Sample Output 3
1
1
5
4
5.000000000000000
Sample Input 4 Sample Output 4
3
4
3
4
0.000000000000000
Sample Input 5 Sample Output 5
4
-3
-5
9
15.000000000000000
Sample Input 6 Sample Output 6
7
20
12
8
13.000000000000000
Hide

Please log in to submit a solution to this problem

Log in