From bfa7d360fb460213d67802285b931027755ceeb8 Mon Sep 17 00:00:00 2001 From: Roman Hergenreder Date: Tue, 26 Dec 2023 15:33:18 +0100 Subject: [PATCH] Fix Day23 solve --- Day 23/decrypt.sage | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Day 23/decrypt.sage b/Day 23/decrypt.sage index 50a56b2..36c4836 100644 --- a/Day 23/decrypt.sage +++ b/Day 23/decrypt.sage @@ -38,10 +38,10 @@ N = values["N"] hint = values["hint"] p = None -q = var("q", domain="integer") +q = var("q") for x in range(0,1000+1): eq = (N/q)^3 - q^8 + y_x(x=x) == hint - solution = solve([eq], q, solution_dict=True) + solution = solve(eq, q, solution_dict=True) if solution and q in solution[0]: print("[+] Found x:", x) q = int(solution[0][q])