day01: and p1 is the same as p2, btw ...
This commit is contained in:
parent
fcfdcd220c
commit
abe1fc1532
7
day01.py
7
day01.py
@ -8,11 +8,8 @@ class Day(AOCDay):
|
|||||||
def part1(self):
|
def part1(self):
|
||||||
count = 0
|
count = 0
|
||||||
depths = self.getInputListAsType(int)
|
depths = self.getInputListAsType(int)
|
||||||
for i, x in enumerate(depths):
|
for x in range(1, len(depths)):
|
||||||
if i == 0:
|
if depths[x] > depths[x-1]:
|
||||||
continue
|
|
||||||
|
|
||||||
if x > depths[i-1]:
|
|
||||||
count += 1
|
count += 1
|
||||||
|
|
||||||
return count
|
return count
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user