committing everything squashed
This commit is contained in:
4
02/part2.py
Normal file
4
02/part2.py
Normal 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()))
|
Reference in New Issue
Block a user