Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Clear and documented solution. solution in Clear category for Numbers Factory by bsquare
def checkio(number):
# Creates the list of factors, working descending from higher digit '9' to '2',
# and iterating till all possible division are done.
# This way, we are sure to get the minimal factored number.
factor_list = []
for factor in range(9, 1, -1):
while not number % factor:
factor_list.append(factor)
number //= factor
return 0 if number > 1 else int(''.join(map(str, sorted(factor_list))))
Sept. 18, 2019
Comments: