알고리즘

[프로그래머스] 폰켓몬

HHB 2023. 10. 7. 18:57
def solution(nums):
    answer = 0
    lens = len(nums)/2
    uq = set(nums)
    
    if lens >= len(uq):
        answer = len(uq)
    elif lens < len(uq):
        answer = lens
    
    return int(answer)
728x90
반응형
LIST