Logo
(追記) (追記ここまで)

33555번 - Hypotenuse 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB73403656.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}".

제한

예제 입력 1

6 5 ?

예제 출력 1

\sqrt{61}

예제 입력 2

? 4 5

예제 출력 2

3

예제 입력 3

3 9 ?

예제 출력 3

3 \cdot \sqrt{10}

힌트

출처

University > Delft University of Technology > Sjaars Kampioenschap Programmeren 2015 H번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /