# Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Limits
1s, 512 MB

Most of us were introduced with Pythagoras’s theorem back at the high school. It states a simple yet fascinating fact about right triangles. A right triangle is a triangle, in which one of the angles is **90** degrees. Pythagoras’s theorem says, for right triangle, the following formula holds:

Here, **c** is the length of the hypotenuse and **a** and **b** are the length of the other two sides. If **a**, **b** and **c** are all **integers**, then together they are called a **Pythagorean triple**.

In this problem, you will be given a Pythagorean triple, you will have to answer the length of the **hypotenuse** from the given triple.

The only input line contains **three** integers **X**, **Y** and **Z** **( 1 ≤ X,Y,Z ≤ 10 ^{9} )**, the three sides of a Pythagorean triangle.

The output contains one integer, the length of the hypotenuse of the given triangle.

Input | Output |
---|---|

3 4 5 | 5 |

Input | Output |
---|---|

5 12 13 | 13 |

93% Solution Ratio

fsshakkhorEarliest,

Mr.adnanFastest, 0.0s

nishat19Lightest, 0 B

touhidurShortest, 36B

Login to submit