Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/masofa

Distance between two points

Easy 1000 ms 64 MB 14%
Share

Two points on the plane are given: $(x_{1}; y_{1})$ and $(x_{2}; y_{2})$. Find the distance $d$ between them:

$$d = \sqrt{(x_{2} - x_{1})^{2} + (y_{2} - y_{1})^{2}}$$

Two points on the coordinate plane and the distance d between them

Input

One line with four integers: $x_{1}$, $y_{1}$, $x_{2}$ and $y_{2}$.

Output

One number — $d$, with exactly 3 digits after the decimal point (for example, 5.000).

Note

$-10^{4} \le x_{1}, y_{1}, x_{2}, y_{2} \le 10^{4}$

Examples

Input #1
0 0 3 4
Output #1
5.000
Input #2
1 1 1 1
Output #2
0.000

Sign in to submit a solution

Signing up is free and takes a minute.