day01: the "mid" part cancels out ...

This commit is contained in:
Stefan Harmuth 2021-12-01 06:36:34 +01:00
parent d07daa6422
commit fcfdcd220c

View File

@ -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