407035: GYM102697 006 Distance
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
006. Distancetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output
Find the distance between two 2D points. Remember that the distance formula is
$$$d = \sqrt{(x_{2} - x_{1})^2 + (y_{2}-y_{1})^2}$$$
math.sqrt will calculate the square root of a number. Also, you also have to add the line import math at the top of the program.
InputThe first two lines contain the X and Y coordinates of the first point respectively. The second two lines contain the X and Y coordinates of the second point respectively. Each coordinate will have an integer value between -1000 and 1000, inclusive.
OutputA double N representing the distance between the two points
ExamplesInput1 1 2 2Output
1.4142135623730951Input
1 1 1 1Output
0.0