Skip to content

Instantly share code, notes, and snippets.

@matthewraaff
Created February 26, 2024 23:29
Show Gist options
  • Save matthewraaff/58dab8faee8eaf3d066057fd3d01a8cb to your computer and use it in GitHub Desktop.
Save matthewraaff/58dab8faee8eaf3d066057fd3d01a8cb to your computer and use it in GitHub Desktop.
find multiple quick (solve Jevons's number) - python
def findMulti(num: int) -> tuple:
limit = int(num ** 0.5) + 1
for a in range(1, limit):
if num % a == 0:
b = num // a
if not 1 in (a, b):
return a, b
return False
print(findMulti(8616460799))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment