aoc2021/d01/d01_2.py

4 lines
110 B
Python
Raw Normal View History

2021-12-01 23:22:53 +00:00
import sys
2021-12-02 00:23:47 +00:00
L = [int(l[:-1]) for l in sys.stdin.readlines()]
print(sum([0,1][a<b] for (a,b) in zip(L, L[3:])))