1
0

aoc 2017 (day 1-6)

This commit is contained in:
2020-01-13 12:57:50 +01:00
parent 3968a11fa6
commit 4da4c47915
28 changed files with 2164 additions and 50 deletions

View File

@@ -0,0 +1,15 @@
#!/usr/bin/env python3
import aoc
rawinput = aoc.read_input(1)
rawinput = rawinput + rawinput[0]
digitsum = 0
for idx in range(1, len(rawinput)):
if rawinput[idx-1] == rawinput[idx]:
digitsum = digitsum + int(rawinput[idx])
print(digitsum)