Skip to content

Instantly share code, notes, and snippets.

@shieldsd
Created March 13, 2012 08:53
Show Gist options
  • Save shieldsd/2027676 to your computer and use it in GitHub Desktop.
Save shieldsd/2027676 to your computer and use it in GitHub Desktop.
Project Euler #3
def factorise(n):
result = []
check = 2
while (check * check <= n):
if n % check == 0:
result.append(check)
n /= check
else:
check += 1
if n != 1:
result.append(n)
return result
print max(factorise(600851475143))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment