Skip to content

Commit

Permalink
20.py
Browse files Browse the repository at this point in the history
  • Loading branch information
huisuu committed Aug 12, 2024
1 parent d9fffaa commit 530df69
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions HSKIM/11to20/20.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
def solution(participant, completion):
h = {}

for p in participant:
if p in h:
h[p] += 1
else:
h[p] = 1

for c in completion:
h[p] -= 1

# .keys()는 딕셔너리의 모든 키(key)를 반환
for key in h.keys():
if h[key] > 0:
return key

0 comments on commit 530df69

Please sign in to comment.