본문 바로가기
python-algorithm

[백준] 7510

by 무적김두칠 2020. 12. 24.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
import sys
def isRAT(a):
    if  a[2]**2==a[1]**2+a[0]**2 : return 1
    elsereturn 0
 
for i in range(1,int(sys.stdin.readline())+1):
    a=sorted(map(int, sys.stdin.readline().split()))
    print("Scenario #%d:"%i)
    if isRAT(a)==1:
        print("yes",'\n')
 
    else:
        print("no",'\n')
 
cs
반응형

'python-algorithm' 카테고리의 다른 글

[백준] 8932  (0) 2020.12.24
[백준] 7770  (0) 2020.12.24
[백준] 6378  (0) 2020.12.24
[백준] 6322  (0) 2020.12.24
[백준] 6131  (0) 2020.12.24

댓글