day 7 tidiest

This commit is contained in:
Joshua Seigler 2024-12-08 13:25:43 -05:00
parent 433321cd50
commit 22ce365434

View file

@ -1,8 +1,5 @@
import run from "aocrunner"
const parseInput = (rawInput: string) =>
rawInput.split("\n").map((line) => line.split(/[: ]+/).map(Number))
const solve = (rawInput: string, isP2?: boolean) => {
const input = rawInput.split('\n').map(l => l.split(/[^\d]+/).map(Number))
return input.reduce((total, [target, ...values]) => {