14 lines
261 B
Python
14 lines
261 B
Python
with open("input.txt") as f:
|
|
lines = [int(i) for i in f.readlines()]
|
|
|
|
hits = 0
|
|
winsize = 3
|
|
last = sum([lines[0], lines[1], lines[2]])
|
|
|
|
for i in range(3, len(lines)):
|
|
now = last - lines[i - 3] + lines[i]
|
|
if now > last:
|
|
hits += 1
|
|
|
|
print(hits)
|