[프로그래머스] 신고 결과 받기
def solution(id_list, report, k): answer = [] id_dict = {} result = {} report = set(report) for i in id_list: id_dict[i] = 0 result[i] = 0 for i in report: report_ = i.split(" ") id_dict[report_[1]] += 1 blacklist = [] for key, value in id_dict.items(): if value >= k: blacklist.append(key) for i in report: report_ = i.split(" ") if report_[1] in blacklist: result[report_[0]] += 1 for _, value in..
코딩테스트 대비
2022. 2. 5. 18:08
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- 파이썬
- version
- 이것이코딩테스트다
- notfound
- BFS
- shellscript
- 코딩테스트
- docker
- matplotlib
- tensorflow
- 동적프로그래밍
- 다익스트라
- LGSVL
- 설치하기
- CUDA
- torchscript
- 카카오
- torch
- pytorch
- 백준
- 설치
- numpy
- n과m
- dfs
- 프로그래머스
- Python
- 백트래킹
- PIP
- error
- 최소신장트리
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 31 |
글 보관함