OOFDH7WWWYN2RIHGBJM2WNEMQOZ4CBQHMZXMGNJ4GJO4QLH2XG2AC
J2BO5KKRVOBEWEXXU326CTSFNT6RZOCYFUKPMKTW6XB4QMB24YPAC
I3IUWAWDYM3GYQ636JURRPXBEX2T6IHDDSFXUZDTCBOONJXHX4DAC
74RGK6PLB6R2TGMCGHGIDSYUKV3X6ZB2ERMJBO25QP4JLU2Z2UXAC
UYQEOS47K5MIDKYFEDGWRKASVSOJP5RF7DN6YRVQFNOHAUCXTYXAC
YMJ5N5BCSNUEITM56ZVBNFYNPCOLXKYRMTHXWP4RMCBAZCP2VW6QC
let prevLen = -1;
let prevLen = 0;
let x = contents(bag); if (x.length == 0) return 1;
let x = contents(bag);
if (x.length == 0) return 1;
for (let pair of x) { count += pair[0] * recurse(pair[1]);
for (let pair of x) {
count += pair[0] * recurse(pair[1]);
for (let pair of contents(bag)) { count += pair[0] * (1 + recurse(pair[1]));
for (let pair of contents(bag)) {
count += pair[0] * (1 + recurse(pair[1]));
return count + 1;
return count;
console.log(recurse("shiny gold") - 1);
console.log(recurse("shiny gold") - 0);
const list = [1470,
const list = new Set([1470,
1306];
1306]);
for (let k of list) { if (i + j + k == 2020) { console.log(i * j * k); break outer; }
for (let k of list) {
if (i + j + k == 2020) {
console.log(i * j * k);
break outer;
}
if (list.has(2020 - i - j)) { console.log(i * j * (2020 - i - j)); break outer;
if (list.has(2020 - i - j)) {
console.log(i * j * (2020 - i - j));