[파이썬🐍] 프로그래머스 : 모의고사
def solution(answers): answer_1=[1,2,3,4,5] answer_2=[2,1,2,3,2,4,2,5] answer_3=[3,3,1,1,2,2,4,4,5,5] score=[0,0,0] result=[] for idx,answer in enumerate(answers): if answer==answer_1[idx%len(answer_1)]: score[0]+=1 if answer==answer_2[idx%len(answer_2)]: score[1]+=1 if answer==answer_3[idx%len(answer_3)]: score[2]+=1 for idx,s in enumerate(score): if s==max(score): result.append(idx+1) return r..
2021. 4. 18.