본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬] 9723번 Right Triangle

by 현장 2022. 10. 14.

-Code

for i in range(int(input())):
    tri = sorted(list(map(int, input().split())))
    res = "NO"
    if tri[-1] ** 2 == tri[0] ** 2 + tri[1] ** 2:
        res = "YES"
    print(f"Case #{i + 1}: {res}")