This commit is contained in:
Sebastian Seedorf
2021-12-06 11:55:28 +01:00
parent aea44ca7aa
commit 5529f62ab6
3 changed files with 23 additions and 0 deletions

11
day06/part1.py Normal file
View File

@@ -0,0 +1,11 @@
#!/usr/bin/env python3
from collections import Counter
counter = Counter(map(int, [x for x in open("input.txt")][0].split(',')))
counter = [counter.get(idx, 0) for idx in range(0, 9)]
for day in range(80):
counter = counter[1:] + counter[:1]
counter[6] += counter[-1]
print(sum(counter))