반응형
문제
https://school.programmers.co.kr/learn/courses/30/lessons/1845
해설
def solution(nums):
select_cnt = len(nums)//2
diff_cnt = len(set(nums))
if select_cnt < diff_cnt:
return select_cnt
return diff_cnt
반응형