프로그래머스 스쿨 - 신고 결과 받기(Python)(복습)
# id_list = ["muzi", "frodo", "apeach", "neo"] # reported = {x: 0 for x in id_list} # print(reported["muzi"]) def solution(id_list, report, k): answer = [0] * len(id_list) reported = {x: 0 for x in id_list} # dictionary, key - x, value - 0 for r in set(report): # set method - 순서가 없고, 집합안에서는 unique한 값 출력 a,b = r.split() reported[b] += 1 for r in set(report): a,b = r.split() if reported[b] >= k: a..
2023. 10. 6.