From dd7eae1ba681ebb1673789a05c44b00a3d61fc43 Mon Sep 17 00:00:00 2001 From: Starnakin Date: Fri, 13 Dec 2024 11:12:23 +0100 Subject: [PATCH] fix: 2024/day13/part1 --- 2024/day13/part1.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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