Skip to content

Instantly share code, notes, and snippets.

@yuvipanda
Forked from russelnickson/projecteuler_prob_3.py
Created December 1, 2009 19:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuvipanda/246573 to your computer and use it in GitHub Desktop.
Save yuvipanda/246573 to your computer and use it in GitHub Desktop.
a=600851475143
i=2
while i<a :
if a%i==0:
a1=a/i
else :
i+=1
continue
n=2
while n<a1:
if a1%n==0 :
break
n+=1
if n==a1:
break
i+=1
print a1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment