From d75a9d510ced0a29ad2fe7ebc247dc7b0766320c Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Fri, 3 Dec 2021 16:56:16 +0000 Subject: Implement open_day utility function --- 1.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '1.py') diff --git a/1.py b/1.py index 2cc64a1..afd445d 100644 --- a/1.py +++ b/1.py @@ -1,5 +1,5 @@ -from utils import sliding_window +from utils import open_day, sliding_window -inp: list[int] = list(map(int, open('1.in'))) +inp: list[int] = list(map(int, open_day(1))) 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))) -- cgit v1.2.3-54-g00ecf