function solution(users, emoticons) { const answer = []; const permutations = []; const discounts = [10, 20, 30, 40]; const leng = emoticons.length - 1; // 중복순열을 통한 모든 경우의 수 수집 const getPermutations = function (discounts, depth, state) { if (depth > leng) { permutations.push([...state]); return; } for (var i = 0; i < discounts.length; i++) { const discount = discounts[i]; getPermutations(discoun..