diff --git a/2024/day13/part1.py b/2024/day13/part1.py index a49f2fd..ab9753f 100644 --- a/2024/day13/part1.py +++ b/2024/day13/part1.py @@ -13,7 +13,7 @@ exp: str = r"Button A: X([+-]\d+), Y([+-]\d+)\nButton B: X([+-]\d+), Y([+-]\d+)\ def resolv(Ax, Ay, Bx, By, goal_x, goal_y): for press_b in range(101): press_a = (goal_x - (press_b * Bx)) / Ax - if press_a * Ay + press_b * By > goal_y: + if press_a * Ay + press_b * By != goal_y: continue if (press_a // 1 != press_a): continue