This commit is contained in:
nim-ka
2022-11-25 23:12:04 +00:00
parent 7ec385d599
commit 1083edf807
13 changed files with 111 additions and 1278 deletions

View File

@@ -1,7 +1,6 @@
function day6(input, part2) {
input = input.split(",").num()
let counts = Array(9).fill().map((_, i) => input.count(i))
let fish = input.split(",").num()
let counts = Array(9).fill().map((_, i) => fish.count(i))
for (let i = 0; i < (part2 ? 256 : 80); i++) {
counts.push(counts.shift())