diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2021-12-01 08:29:46 +0000 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2021-12-01 10:18:48 +0000 |
commit | 1f88313cc4ff52f06b5c99ff2364910d8bc10e1d (patch) | |
tree | 3fc0bf35e2bed217dbbbe9fc6de7a61132bafe1a /1.py | |
download | aoc2021-1f88313cc4ff52f06b5c99ff2364910d8bc10e1d.tar.gz aoc2021-1f88313cc4ff52f06b5c99ff2364910d8bc10e1d.tar.xz aoc2021-1f88313cc4ff52f06b5c99ff2364910d8bc10e1d.zip |
day 1
Diffstat (limited to '1.py')
-rw-r--r-- | 1.py | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -0,0 +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))) |