신고 접수 받기


신고 접수 받기

def solution(id_list, report, k): answer = [] answer_first = [] answer_third = [] report = list(set(report)) for i in id_list: for j in range(len(report)): if i in report[j][:len(i)]: answer_first.append(report[j][len(i)+1:]) for h in id_list: if answer_first.count(h) >= k: for y in range(len(report)): if h in report[y][-len(h):]: answer_third.append(report[y][:-len(h)-1]) for n in id_list: answer.append(answer_third.count(n)) return answer 성공률 70%를 달성했다. for문이 너무 많은 것 같아 조금 수정해야겠다....



원문링크 : 신고 접수 받기