From c11a5ed460ece8faa5c7317a92b896006dfe9927 Mon Sep 17 00:00:00 2001 From: Dmitry Fedotov Date: Mon, 16 Dec 2024 00:02:33 +0300 Subject: [PATCH] fix bug in animate day6 --- day6/code.py | 5 ++++- day7/code.py | 1 - 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/day6/code.py b/day6/code.py index 9d1b224..ad4f8e9 100644 --- a/day6/code.py +++ b/day6/code.py @@ -137,7 +137,10 @@ class Lab(object): cls() print(self) - while self.next(): + while True: + ok, cyccled = self.next() + if not ok: + break cls() print(self) print(self.cycles) diff --git a/day7/code.py b/day7/code.py index 3b1ecb0..63b914e 100644 --- a/day7/code.py +++ b/day7/code.py @@ -23,7 +23,6 @@ def _concat2(l: list[int]) -> list[int]: def may_be_true(val: int, lst: list[int], funcs) -> bool: if len(lst) == 1: return lst[0] == val - return any([may_be_true(val, f(lst), funcs) for f in funcs]) def solve1(eqs):