Programmers-LeetCode/프로그래머스/1/42576. 완주하지 못한 선수 at main · crystal397/Programmers-LeetCode
This is an auto push repository for Baekjoon Online Judge created with [BaekjoonHub](https://github.com/BaekjoonHub/BaekjoonHub). - crystal397/Programmers-LeetCode
github.com
1차 풀이
from collections import Counter
def solution(participant, completion):
answer = ''
p = Counter(participant)
c = Counter(completion)
i = p - c
for a in i.keys():
answer = a
return answer
2차 풀이
from collections import Counter
def solution(participant, completion):
counter_p = Counter(participant)
counter_c = Counter(completion)
counter_i = counter_p - counter_c
return next(iter(counter_i))