Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 |
Tags
- AWS
- Unit Testing
- combinations
- codecov
- Q objects
- ORM
- Git
- Python
- utils
- TDD
- stack&que
- stateless
- HTTP 완벽 가이드
- Stack
- stateful
- Bruteforce
- postreSQL
- 백준
- greedy
- ws
- Query
- was
- pytest
- permutations
- dictionary
- Programmers
- SQL
- algorithm
- Gunicorn
- Django
Archives
- Today
- Total
해피 코딩!
[프로그래머스] 완주하지 못한 선수 본문
link
def solution(participant, completion):
from collections import defaultdict
dic = defaultdict(int)
for part in participant:
dic[part] += 1
for comp in completion:
dic[comp] -= 1
return max(dic, key=dic.get)
'알고리즘' 카테고리의 다른 글
[프로그래머스] 프린터 (0) | 2020.12.12 |
---|---|
[프로그래머스] 주식가격 (0) | 2020.12.12 |
[프로그래머스] 모의고사 (0) | 2020.12.12 |
[프로그래머스] 두 개 뽑아서 더하기 (0) | 2020.12.12 |
[프로그래머스] 다리를 지나는 트럭 (0) | 2020.12.12 |
Comments