#B2030. Compute the Length of a Line Segment
Compute the Length of a Line Segment
Compute the Length of a Line Segment
Given the coordinates of two endpoints of a line segment, A(Xa, Ya) and B(Xb, Yb), compute the length of the line segment AB.
The length is calculated using the formula:
$$d = \sqrt{(X_b - X_a)^2 + (Y_b - Y_a)^2}$$
inputFormat
The input consists of a single line containing four numbers: Xa, Ya, Xb, Yb.
outputFormat
Output the length of the line segment, formatted to six decimal places.
sample
0 0 3 4
5.000000