Skip to content

Instantly share code, notes, and snippets.

@jepler
Created July 31, 2025 18:21
Show Gist options
  • Save jepler/f99eb8f9a43221b4d6689010b95928c2 to your computer and use it in GitHub Desktop.
Save jepler/f99eb8f9a43221b4d6689010b95928c2 to your computer and use it in GitHub Desktop.
import math
N = 23442210895296466551510681543619831978102581799736611246976521590191893224135789025070678051976867349306593332331728775086731364111282889875974451560408740146015934986990476214270640086817425581538170373870259313066583768903697048280641467367411589939100414611356011513397978038218669709747247868727724676001584905770525234976669382895464232871732123454572174833964467804115311936850586791492844973560905229429892438926204188174490543755080972621652831650930277431113028745929593171025639518249955921255776393078247519734666509055776152948501360345202224227559964438653352949732541506721438058592990053089448078211591
sqrt_n = math.isqrt(N)
for p in range(sqrt_n - 10, sqrt_n):
if N % p == 0:
q = N // p
print(p)
print(q)
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment