Navigation Menu

Skip to content

Commit

Permalink
three
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Tribone committed Oct 25, 2011
1 parent 9c0cc71 commit fc0106a
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions three/three.py
@@ -0,0 +1,18 @@
def isprime(n):
n = abs(int(n))
if n == 2:
return True
if not n & 1:
return False
for x in range(3, int(n**0.5+1), 2):
if n % x == 0:
return False
return True

n = 600851475143

for x in range(3, int(n**0.5+1), 2):
if n % x == 0:
if isprime(x) is True:
print x

0 comments on commit fc0106a

Please sign in to comment.