aoc2023/solve.py

14 lines
191 B
Python
Raw Normal View History

2023-12-01 09:29:09 -05:00
import sys
import re
sum = 0
for line in sys.stdin:
line = re.sub(r'[^\d]', '', line)
first = line[0]
last = line[-1]
value = int(first + last)
sum += value
print(sum)