Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: c7350e7c46
Fetching contributors…

Octocat-spinner-32-eaf2f5

Cannot retrieve contributors at this time

file 22 lines (16 sloc) 0.307 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
import math

def is_prime(n):
    if n < 0:
        return False
    for j in range(2, math.sqrt(n)+1):
        if n%j == 0:
            return False
    return True

big = 600851475143

i = 1

while i*i <= big:
    i += 2
    if big % i == 0:
        if is_prime(i):
            maximum = i

print maximum
Something went wrong with that request. Please try again.