[프로그래머스] 모의고사 /Javascript
[문제 바로가기] 완전탐색 > 모의고사 (Lv.1) [ 문제 파악 ] 완전탐색 문제 [ 적용한 풀이 ] function solution(answers) { // 문제 이렇게 슬플일이냐 ㅠㅠ const 수포자들 = [[1, 2, 3, 4, 5], [2, 1, 2, 3, 2, 4, 2, 5], [3, 3, 1, 1, 2, 2, 4, 4, 5, 5]]; let count = Array(3).fill(0); 수포자들.map((수포자, index)=>{ let 묶음 = Math.ceil(answers.length/수포자.length); //올림 for(let 묶 = 0; 묶 { if(찍음 == answers[수포자.length*묶+idx]) count[ind..
2022. 4. 23.