From fcfdcd220ceebd2c1605b116511843d865dbeb86 Mon Sep 17 00:00:00 2001 From: Stefan Harmuth Date: Wed, 1 Dec 2021 06:36:34 +0100 Subject: [PATCH] day01: the "mid" part cancels out ... --- day01.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/day01.py b/day01.py index 319de44..6dda502 100644 --- a/day01.py +++ b/day01.py @@ -22,10 +22,7 @@ class Day(AOCDay): depths = self.getInputListAsType(int) for x in range(3, len(depths)): - mid = depths[x-2] + depths[x-1] - a = mid + depths[x-3] - b = mid + depths[x] - if a < b: + if depths[x] > depths[x-3]: count += 1 return count