소스 검색

Fix Day23 solve

Roman Hergenreder 4 달 전
부모
커밋
bfa7d360fb
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  1. 2 2
      Day 23/decrypt.sage

+ 2 - 2
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])