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

~/algor $ cat problems/gipotenuza

Hypotenuse

Easy 1000 ms 64 MB 14%
Share

The legs $a$ and $b$ of a right triangle are given. Find the hypotenuse $c$:

$$c = \sqrt{a^{2} + b^{2}}$$

A right triangle: legs a and b, hypotenuse c

Input

One line with two positive integers: $a$ and $b$.

Output

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

Note

$1 \le a, b \le 10^{6}$

Examples

Input #1
3 4
Output #1
5.000
Input #2
1 1
Output #2
1.414

Sign in to submit a solution

Signing up is free and takes a minute.