Skip to content

Commit

Permalink
tidy day6
Browse files Browse the repository at this point in the history
  • Loading branch information
wbh1 committed Dec 6, 2021
1 parent f3de0cd commit df9bf45
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions solutions/day6.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ def simulate_growth(self, rounds):
# Fish at 0 reset to 6; newly spawned start at 8
new_fishes.update({6: value, 8: value})
else:
k = key - 1
new_fishes.update({k: value})
new_fishes.update({key-1: value})

fishes = new_fishes.copy()
fishes = new_fishes

return sum(fishes.values())

0 comments on commit df9bf45

Please sign in to comment.