| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 2048 MB | 73 | 40 | 36 | 56.250% |
Martijn is a math teacher and next weeks class is about geometry. He would like to have some tools for his pupils to practice the course material. One of his ideas is to have a program that can solve calculate the unknown length of one side of a right angled triangle, given the other two sides. Pythagorean theorem states that, in a right angled triangle, the square of the hypotenuse is equal to sum of the squares of the other two sides. Your task is to make a solver that uses Pythagorean theorem.
\begin{align*} &\text{AB}^2 + \text{AC}^2 = \text{BC}^2\\ \\ &a^2 + b^2 = c^2 \end{align*}
The input consists out of two integers (0ドル < x, y \leq 2.3 \cdot 10^4$) and a question mark ('?'), in any order. The order of the three parts of the input match with $a,ドル $b$ and $c$.
The solution to '?' in its most simple form and in LaTeX notation. For example: $\sqrt{20}$ needs to be simplified to 2ドル \cdot \sqrt{5}$. The formula 2ドル \cdot \sqrt{5}$ is in LaTeX written as "2 \cdot \sqrt{5}".
6 5 ?
\sqrt{61}
? 4 5
3
3 9 ?
3 \cdot \sqrt{10}