백준 17599번: Bags #Python

ColorlessDia·2024년 6월 4일

algorithm/baekjoon

목록 보기
197/808
n = int(input())
a = map(int, input().split())

count_dict = dict()

for id in a:
    if id in count_dict:
        count_dict[id] += 1
    else:
        count_dict[id] = 1

print(len(count_dict.keys()))

0개의 댓글