diff --git a/day01.py b/day01.py index 6dda502..ec5df61 100644 --- a/day01.py +++ b/day01.py @@ -8,11 +8,8 @@ class Day(AOCDay): def part1(self): count = 0 depths = self.getInputListAsType(int) - for i, x in enumerate(depths): - if i == 0: - continue - - if x > depths[i-1]: + for x in range(1, len(depths)): + if depths[x] > depths[x-1]: count += 1 return count