[프로그래머스/Lv.1/Python] 모의고사
def solution(answers): answer = [] supoja1 = [1, 2, 3, 4, 5] supoja2 = [2, 1, 2, 3, 2, 4, 2, 5] supoja3 = [3, 3, 1, 1, 2, 2, 4, 4, 5, 5] score = [0, 0, 0] for idx, value in enumerate(answers) : if value == supoja1[idx % len(supoja1)]: score[0] += 1 if value == supoja2[idx % len(supoja2)]: score[1] += 1 if value == supoja3[idx % len(supoja3)]: score[2] += 1 for idx, s in enumerate(score): if s ==..
2024. 1. 26.