Skip to content

Commit eeafdf3

Browse files
committed
[level 1] Title: 완주하지 못한 선수, Time: 65.38 ms, Memory: 34.2 MB -BaekjoonHub
1 parent 640304b commit eeafdf3

2 files changed

Lines changed: 6 additions & 17 deletions

File tree

프로그래머스/1/42576. 완주하지 못한 선수/README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
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

@@ -16,7 +16,7 @@
1616

1717
### 제출 일자
1818

19-
2026년 05월 09일 00:53:37
19+
2026년 06월 30일 23:05:13
2020

2121
### 문제 설명
2222

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,4 @@
1+
from collections import Counter
2+
13
def 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]

0 commit comments

Comments
 (0)