Programming/Python & Data Structures
[Baekjoon/Python3] 9366번 삼각형 분류
HooNeee
2020. 12. 5. 22:17
[Baekjoon/Python3] 9366번 삼각형 분류
9366번: 삼각형 분류
입력의 첫 줄에는 테스트케이스의 개수 T(1 <= T <= 100)가 주어진다. 다음 T줄에는 각 줄에 삼각형의 세 변을 나타내는 3개의 정수 A,B,C(1 <= A,B,C <= 1,000,000)가 주어진다.
www.acmicpc.net
t = int(input())
for i in range(t):
a, b, c = list(map(int, input().split()))
nums = sorted([a, b, c]) # for list
if nums[2] < sum(nums[:2]):
if a == b == c:
print('Case #' + str(i + 1) + ': equilateral')
elif a == b or b == c or c == a:
print('Case #' + str(i + 1) + ': isosceles')
elif a != b or b != c or c != a:
print('Case #' + str(i + 1) + ': scalene')
else:
print('Case #' + str(i + 1) + ': invalid!')