Algorithm/BAEKJOON

BOJ / Python / 🥉3 / 10817번 / 세 수

2023. 5. 15. 21:58

input_data = list(map(int, input().split(' ')))
input_data.sort()     # 정렬 (오름차순)
print(input_data[1])

20 30 10

{'20', '30', '10'}
➡ 각각의 원소가 문자열로 되어있다.

{20, 30, 10}
➡ map 함수를 이용하면 각각의 원소에 어떠한 처리(여기서는 int)를 해준다.