day01: the "mid" part cancels out ...
This commit is contained in:
parent
d07daa6422
commit
fcfdcd220c
5
day01.py
5
day01.py
@ -22,10 +22,7 @@ class Day(AOCDay):
|
|||||||
depths = self.getInputListAsType(int)
|
depths = self.getInputListAsType(int)
|
||||||
|
|
||||||
for x in range(3, len(depths)):
|
for x in range(3, len(depths)):
|
||||||
mid = depths[x-2] + depths[x-1]
|
if depths[x] > depths[x-3]:
|
||||||
a = mid + depths[x-3]
|
|
||||||
b = mid + depths[x]
|
|
||||||
if a < b:
|
|
||||||
count += 1
|
count += 1
|
||||||
|
|
||||||
return count
|
return count
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user