Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Numbers Factory by flpo
def factors(n):
if n == 1:
yield ''
else:
yield from (str(i) + f for i in range(9, 1, -1) if n % i == 0 for f in factors(n//i))
def checkio(n):
return min((int(''.join(sorted(s))) for s in factors(n)), default=0)
Aug. 18, 2017
Comments: