traversing the count array to calculate the maximum number
for i in range ( 10 ) : NEW_LINE INDENT while count [ i ] > 0 : NEW_LINE INDENT result = result + ( i * multiplier ) NEW_LINE count [ i ] = count [ i ] - 1 NEW_LINE multiplier = multiplier * 10 NEW_LINE DEDENT DEDENT