#C13368. Calculate the Hypotenuse

    ID: 42898 Type: Default 1000ms 256MiB

Calculate the Hypotenuse

Calculate the Hypotenuse

Given the lengths of the two perpendicular sides of a right-angled triangle, your task is to compute the length of the hypotenuse. According to the Pythagorean theorem, the relationship between the sides is defined as (a^2 + b^2 = c^2), where (c) represents the hypotenuse. If either of the two side lengths is not a positive number, output the error message: "Both side lengths must be positive numbers."

Compute and output the result with standard input and output.

inputFormat

The input consists of two space-separated floating-point numbers (a) and (b) on a single line, representing the lengths of the two perpendicular sides of a right-angled triangle.

outputFormat

If both (a) and (b) are positive, output the length of the hypotenuse computed using (c = \sqrt{a^2 + b^2}). Otherwise, output the error message: "Both side lengths must be positive numbers." The output should be printed to stdout.## sample

3 4
5.0

</p>