문제 링크 - https://school.programmers.co.kr/learn/courses/30/lessons/42576
def solution(participant, completion):
racer = {}
for i in participant:
if i not in racer:
racer[i] = 1
else:
racer[i] += 1
for j in completion:
if j in racer:
racer[j] += 1
for key, value in racer.items():
if value%2 != 0:
return key
from collections import defaultdict as dd
def solution(participant, completion):
racer = dd(int)
for i in participant:
racer[i]+=1
for j in completion:
racer[j]+=1
for key, value in racer.items():
if value % 2 != 0:
return key