Last active
August 29, 2015 14:17
-
-
Save rHermes/c8637f350bc9c939a16b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def HMP(n): | |
x = 2 | |
z = [] | |
while x <= n//2: | |
while n % x == 0: | |
n //= x | |
z.append(x) | |
x += 1 | |
if n is not 1: | |
z.append(n); | |
return z |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment