aoc2020/10/1.py
Juan José Gutiérrez de Quevedo Pérez a58e31c982 missing day 10 programs
2.py missing because it's very ugly and probably broken just now
2020-12-11 14:53:05 +01:00

13 lines
249 B
Python

with open("input") as f:
content = [int(x.strip()) for x in f]
content.sort()
diffs = []
for i in range(len(content) -1 ):
diffs.append(content[i+1] - content[i])
ones = diffs.count(1) + 1
threes = diffs.count(3) + 1
print(ones * threes)