This commit is contained in:
Sebastian Seedorf
2020-12-03 11:18:56 +01:00
parent c460fd9913
commit 13774dedbb
4 changed files with 363 additions and 1 deletions

12
day03/part1.py Normal file
View File

@@ -0,0 +1,12 @@
lines = (x.strip() for x in open("input.txt"))
pos = 0
count = 0
for line in lines:
pos = pos % len(line)
if line[pos] == '#':
count += 1
pos += 3
print(count)