File tree Expand file tree Collapse file tree
프로그래머스/1/42576. 완주하지 못한 선수 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# [ level 1] 완주하지 못한 선수 - 42576
22
3- [ 문제 링크] ( https://school.programmers.co.kr/learn/courses/30/lessons/42576 )
3+ [ 문제 링크] ( https://school.programmers.co.kr/learn/courses/30/lessons/42576?language=python3 )
44
55### 성능 요약
66
7- 메모리: 102 MB, 시간: 38.17 ms
7+ 메모리: 34.2 MB, 시간: 65.38 ms
88
99### 구분
1010
1616
1717### 제출 일자
1818
19- 2026년 05월 09일 00:53:37
19+ 2026년 06월 30일 23:05:13
2020
2121### 문제 설명
2222
Original file line number Diff line number Diff line change 1+ from collections import Counter
2+
13def solution (participant , completion ):
2- p = {}
3- for i in participant :
4- if i not in p :
5- p [i ] = 1
6- else :
7- p [i ] += 1
8- c = {}
9- for i in completion :
10- if i not in c :
11- c [i ] = 1
12- else :
13- c [i ] += 1
14- for i in dict (set (p .items ()) - set (c .items ())).keys ():
15- return i
4+ return list ((Counter (participant ) - Counter (completion )))[0 ]
You can’t perform that action at this time.
0 commit comments