알고리즘/소스코드
PROGRAMMERS 42576: 완주하지 못한 선수
cjw.git
2020. 12. 18. 12:28
Link : programmers.co.kr/learn/courses/30/lessons/42576
Python
더보기
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | def solution(participant, completion): data = dict() for i in participant: if i not in data: data[i] = 1 else: data[i] += 1 for i in completion: if i not in data: return i else: data[i] -= 1 for i in data: if data[i] >= 1: return i | cs |
FeedBack
cjw.git@gmail.com