[프로그래머스] Python / 삼각형의 완성조건(1)
2024. 3. 22. 15:06ㆍCoding/프로그래머스-Python
문제 링크
https://school.programmers.co.kr/learn/courses/30/lessons/120889
문제
코드
def solution(sides):
sides.sort(reverse=True)
if sides[0] < sides[1] + sides[2]:
return 1
else:
return 2
'Coding > 프로그래머스-Python' 카테고리의 다른 글
[프로그래머스] Python / 아이스 아메리카노 (0) | 2024.03.22 |
---|---|
[프로그래머스] Python / 배열 자르기 (0) | 2024.03.22 |
[프로그래머스] Python / 특정 문자 제거하기 (0) | 2024.03.22 |
[프로그래머스] Python / 배열 두 배 만들기 (0) | 2024.03.22 |
[프로그래머스] Python / 짝수 홀수 개수 (0) | 2024.03.22 |