Function that calculate the count of each prime factor of a number
def primeFactorize ( a ) : NEW_LINE INDENT sqt = int ( math . sqrt ( a ) ) NEW_LINE for i in range ( 2 , sqt , 2 ) : NEW_LINE INDENT cnt = 0 NEW_LINE while ( a % i == 0 ) : NEW_LINE INDENT cnt += 1 NEW_LINE a /= i NEW_LINE DEDENT ma [ i ] = cnt NEW_LINE DEDENT if ( a > 1 ) : NEW_LINE INDENT ma [ a ] = 1 NEW_LINE DEDENT DEDENT