dict1 프로그래머스 - 신고 결과 받기 (Python) (2022 KAKAO BLIND RECRUITMENT) 코드 def solution(id_list, report, k): answer = [] block_id = [] set_report = set(report) # 1 report_cnt = {id: 0 for id in id_list} # 2 mail_cnts = {id: 0 for id in id_list} # 3 for id in set_report: # 4 report_cnt[id.split()[1]] += 1 for i in report_cnt: # 5 if report_cnt.get(i) >= k: block_id.append(i) for i in set_report: # 6 if i.split()[1] in block_id: mail_cnts[i.split()[0]] += 1 answer = l.. 2022. 5. 22. 이전 1 다음