committing everything squashed

This commit is contained in:
2023-12-03 01:12:13 -08:00
commit 92caa0f5c4
15 changed files with 1587 additions and 0 deletions

4
02/part2.py Normal file
View File

@@ -0,0 +1,4 @@
import math, re, sys
print(sum(math.prod(max(int(n) for n in re.findall(f"[0-9]+(?= {color})", line))
for color in ("red", "green", "blue"))
for line in open("input.txt", "rt").readlines()))