Juan José Gutiérrez de Quevedo Pérez
a58e31c982
2.py missing because it's very ugly and probably broken just now
13 lines
249 B
Python
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)
|