Check for factors of 2
while ( N % 2 == 0 ) : NEW_LINE INDENT if 2 in Map : NEW_LINE INDENT Map [ 2 ] += 1 NEW_LINE DEDENT else : NEW_LINE INDENT Map [ 2 ] = 1 NEW_LINE DEDENT N = N // 2 NEW_LINE DEDENT