Function to increment the count for each factor of given val
def IncrementFactors ( count , val ) : NEW_LINE INDENT i = 1 NEW_LINE while ( i * i <= val ) : NEW_LINE INDENT if ( val % i == 0 ) : NEW_LINE INDENT if ( i == val // i ) : NEW_LINE INDENT count [ i ] += 1 NEW_LINE DEDENT else : NEW_LINE INDENT count [ i ] += 1 NEW_LINE count [ val // i ] += 1 NEW_LINE DEDENT DEDENT i += 1 NEW_LINE DEDENT DEDENT