Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Numbers Factory by mateusz.miekus
def checkio(number):
z=2
while number%z!=0:
z=z+1
if z==number:
return 0
else:
n=number
wyn=''
while n!=1:
i=2
x=1
while((i//10)==0):
if (n%i==0):
x=i
i=i+1
if x!=1:
wyn=str(x)+wyn
n=n//x
else:
return 0
return int(wyn)
if __name__ == '__main__':
#These "asserts" using only for self-checking and not necessary for auto-testing
assert checkio(20) == 45, "1st example"
assert checkio(21) == 37, "2nd example"
assert checkio(17) == 0, "3rd example"
assert checkio(33) == 0, "4th example"
assert checkio(3125) == 55555, "5th example"
assert checkio(9973) == 0, "6th example"
Dec. 2, 2016