This commit is contained in:
Peter Hudec
2023-12-01 09:05:08 +01:00
commit 47ada5671b
5 changed files with 1065 additions and 0 deletions

16
01/part01.py Normal file
View File

@ -0,0 +1,16 @@
#!/usr/bin/env python
from sys import stdin
import re
def read_line():
for line in stdin:
yield line
sum = 0
for line in read_line():
digits = re.sub("[^\d]", "", line)
sum += int(digits[0] + digits[-1])
print(sum)