걍.. 쉽다. 피타고라스 정리 때려보기.
while True:
lst = list(map(int, input().split()))
lst.sort()
if lst[0] == lst[1] == lst[2] == 0:
break
if lst[0]**2 + lst[1]**2 == lst[2]**2:
print("right")
else:
print("wrong")

사진 설명을 입력하세요.
'Algorithms' 카테고리의 다른 글
백준 2477. 참외밭 (0) | 2022.06.09 |
---|---|
백준 3034. 앵그리 창영 (0) | 2022.06.09 |
백준 3009. 네 번째 점 (0) | 2022.06.09 |
백준 1085. 직사각형에서 탈출 (0) | 2022.06.09 |
백준 11478. 서로 다른 부분 문자열의 개수 (0) | 2022.06.09 |
댓글