@@ -0,0 +1,510 @@
+def lpf(num):%0A  i = 3%0A  result = set(%5B1%5D)%0A  if not num %25 2:%0A    result.add(2)%0A  while i %3C ((num/2)+1):%0A    if not num %25 i and is_prime(i):%0A      num = num/i%0A      result.add(i)%0A      i = 3%0A    else :%0A      i += 2%0A  result.add(num)%0A  return max(result)%0A%0Adef is_prime(num):%0A  if num == 2:%0A    return True%0A  if not num %25 2:%0A    return False%0A  i = 3%0A  while i %3C (num/2 + 1):%0A    if not num %25 i:%0A      return False%0A    i += 2%0A  return True%0A%0Aimport time%0As = time.time()%0Aprint lpf(600851475143)%0Aprint time.time() - s%0A

Create lpf.py