From 90ef6af6e2b73be0c482a39af4f10a327539030b Mon Sep 17 00:00:00 2001 From: Ryan Reed Date: Mon, 6 Dec 2021 18:34:08 -0500 Subject: [PATCH] Cleanup --- puzzles/day06.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/puzzles/day06.py b/puzzles/day06.py index 62eccef..85c9fe0 100644 --- a/puzzles/day06.py +++ b/puzzles/day06.py @@ -20,13 +20,13 @@ class Reproduce: def start(self, days: int = 80) -> None: counts = Counter(self.times) - for day in range(days): + for _ in range(days): next_counts = Counter() # Can't modify while iterating for count_key, count in counts.items(): if count_key == 0: - next_counts[6] += count # Move the parents back to 6 days next_counts[8] += count # Add the new fish + next_counts[6] += count # Move the parents back to 6 days else: next_counts[count_key - 1] += count # Move count to next day count