[pro]ポンキモン


質問リンク


https://programmers.co.kr/learn/courses/30/lessons/1845?language=python3

に答える

def solution(nums):
    n = len(nums) // 2
    t = len(set(nums))
    answer = 0
    
    if t <= n :
        answer = t
    else :
        answer = n
    
    return answer