def solution(nums):
answer = 0
if len(set(nums))<=len(nums)/2:
answer = len(set(nums))
else:
answer = len(nums)/2
return answer
'코딩테스트 | python > 프로그래머스' 카테고리의 다른 글
| [프로그래머스 | python] 체육복 (0) | 2024.02.15 |
|---|---|
| [프로그래머스 | python] 전화번호 목록 (2회차) (0) | 2024.02.15 |
| [프로그래머스 | python] 기능개발 >> 다시 풀어보기 (0) | 2024.02.06 |
| [프로그래머스 | python] 같은 숫자는 싫어 (0) | 2024.02.06 |
| [프로그래머스 | python] 전화번호 목록 (0) | 2024.02.06 |