Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- 수학
- Web Hacking
- Digital Forensics
- 그리디 알고리즘
- MySQL
- cryptography
- Incognito
- misc
- 인코그니토
- Python
- N0Named
- xcz.kr
- php
- 문자열
- SuNiNaTas
- CTF
- wargame
- Text
- Network
- 써니나타스
- C
- 백준
- 구현
- 사칙연산
- 정렬
- writeup
- Forensics
- Web
- Database
- HackCTF
Archives
- Today
- Total
보안을 그리다, 훈이
[Baekjoon/Python3] 9366번 삼각형 분류 본문
[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!')
'Programming > Python & Data Structures' 카테고리의 다른 글
[Baekjoon/Python3] 9501번 꿍의 우주여행 (0) | 2020.12.05 |
---|---|
[Baekjoon/Python3] 9498번 시험 성적 (0) | 2020.12.05 |
(추가예정) [Baekjoon/Python3] 9339번 마라토너 (0) | 2020.12.05 |
[Baekjoon/Python3] 9325번 얼마? (0) | 2020.12.05 |
[Baekjoon/Python3] 9316번 Hello Judge (0) | 2020.12.05 |
Comments