add to gothib
This commit is contained in:
commit
523f45b46a
28 changed files with 419 additions and 0 deletions
13
aoc/day3.py
Normal file
13
aoc/day3.py
Normal file
|
@ -0,0 +1,13 @@
|
|||
import re
|
||||
|
||||
instruction = re.compile(r"mul\((\d+),(\d+)\)")
|
||||
|
||||
re.
|
||||
data = re.findall(instruction, open("aoc/input.txt", "r").read())
|
||||
|
||||
total = 0
|
||||
|
||||
for n1, n2 in data:
|
||||
total += int(n1) * int(n2)
|
||||
|
||||
print(total)
|
Loading…
Add table
Add a link
Reference in a new issue