Question
Test Case 1
Shell
복사
Test Case 2
Shell
복사
Solve
def solution(participant, completion):
d = {}
for x in participant:
d[x] = d.get(x, 0) + 1
for y in completion:
d[y] -= 1
dnf = [k for k, v in d.items() if v > 0]
answer = dnf[0]
return answer
Python
복사
실행시간 : ms