python-algorithm
[백준] 8723
무적김두칠
2021. 3. 4. 11:07
1
2
3
4
|
tmp=sorted(map(int, input().split()))
if tmp[0]== tmp[1] and tmp[1]==tmp[2]: print(2)
elif tmp[0]**2+tmp[1]**2==tmp[2]**2: print(1)
else: print(0)
|
cs |
주어진 세 숫자가 정삼각형인지 , 직각삼각형인지 구분하는 문제고
line 1에서 sorted를 쓴 이유는 세 숫자가 오름차순이거나 내림차순인지 모르기 때문에 씁니더
반응형