aoc2023/solve.py
2023-12-01 09:29:09 -05:00

13 lines
191 B
Python

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)