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

9723번 - Right Triangle 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB95676771181.257%

문제

A right triangle or right-angled triangle is a triangle in which one angle is a
right angle (that is, at 90 degrees angle). The largest side of such a triangle is called hypotenuse. The relation between the sides of the triangle is

c2=a2+b2, Where c is the hypotenuse

Given 3 sides of a triangle, your task is to determine whether the given triangle is a right triangle or not.

입력

The first line has a positive integer T, T <= 100000, denoting the number of test cases. This is followed by each test case per line.

Each test case consists of a line containing 3 integers a,b and c denoting the sides of a triangle. All of these sides will be between 1 and 100, inclusive. The sides a,b and c can be given in any order.

출력

For each test case, the output contains a line in the format Case #x: M, where x is the case number (starting from 1) and M is “YES” when the given triangle is a right triangle or “NO” otherwise. Note that the quotes are not required to be outputted.

제한

예제 입력 1

10
20 16 12
5 3 4
15 12 9
12 5 13
12 13 5
28 82 46
43 96 92
3 4 5
13 5 12
6 10 8

예제 출력 1

Case #1: YES
Case #2: YES
Case #3: YES
Case #4: YES
Case #5: YES
Case #6: NO
Case #7: NO
Case #8: YES
Case #9: YES
Case #10: YES

힌트

출처

ICPC > Regionals > Asia Pacific > Malaysia > Malaysia National Programming Contest > Al-Khawarizmi National Programming Contest 2010 A번

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

출처

대학교 대회

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

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