https://www.acmicpc.net/problem/10101
10101번: 삼각형 외우기
문제의 설명에 따라 Equilateral, Isosceles, Scalene, Error 중 하나를 출력한다.
www.acmicpc.net
# 10101 - Python 3
import sys
input =sys.stdin.readline
arr = []
for i in range(3):
arr.append(int(input()))
if len(set(arr)) == 1: # set 함수를 이용하여 중복되는 수의 개수를 찾음
print("Equilateral")
elif sum(arr) == 180 and len(set(arr)) == 2:
print("Isosceles")
elif sum(arr) == 180 and len(set(arr)) == 3:
print("Scalene")
else:
print("Error")'코딩' 카테고리의 다른 글
| [Python] 백준 #14215. 세 막대 (0) | 2023.03.22 |
|---|---|
| [Python] 백준 #5073. 삼각형과 세 변 (0) | 2023.03.22 |
| [Python] 백준 #9063. 대지 (0) | 2023.03.22 |
| [Python] 백준 #3009. 네 번째 점 (0) | 2023.03.22 |
| [Python] 백준 #15894. 수학은 체육과목 입니다 (0) | 2023.03.22 |