diff options
Diffstat (limited to '1.py')
-rw-r--r-- | 1.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ from utils import sliding_window -inp: list[int] = [int(l.strip()) for l in open('1.in')] -print(sum(s[1] > s[0] for s in sliding_window(inp, 2))) -print(sum(s[3] > s[0] for s in sliding_window(inp, 4))) +inp: list[int] = list(map(int, open('1.in'))) +print(sum(s[0] < s[1] for s in sliding_window(inp, 2))) +print(sum(s[0] < s[3] for s in sliding_window(inp, 4))) |