[백준] - 4153 직각삼각형 (Python)

밀루·2023년 8월 19일
0

BOJ

목록 보기
24/43

문제 링크

코드

while True:
    a,b,c=map(int, input().split())
    max1=max(a,b,c)
    if max1==0:
        break

    if a==max1:
        n3=max1**2
        n1=b**2+c**2
    elif b==max1:
        n3=max1**2
        n1=a**2+c**2
    else:
        n3=max1**2
        n1=a**2+b**2

    if n3==n1:
        print("right")
    else:
        print("wrong")
profile
이밀루의 도전

0개의 댓글