Find the count of prime factors of b using distinct prime factors of a
for key , value in ma . items ( ) : NEW_LINE INDENT cnt = 0 NEW_LINE while ( b % key == 0 ) : NEW_LINE INDENT b /= key NEW_LINE cnt += 1 NEW_LINE DEDENT DEDENT