You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
measures = [int(i) for i in open("input.txt", 'r').read().splitlines()]
|
|
|
|
increases = 0
|
|
old = measures[0]+measures[1]+measures[2]
|
|
for i in range(3,len(measures)):
|
|
new = measures[i] + measures[i-1] + measures[i-2]
|
|
if new > old:
|
|
increases += 1
|
|
old = new
|
|
|
|
print(increases)
|
|
|