Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Numbers Factory by PawelBubak
def liczba(number):
dzielnik = [9,8,7,6,5,4,3,2]
for i in dzielnik:
if number%i == 0:
number = number/i
return number
def wynik(number, i):
if number%i == 0:
result = i
return result
def checkio(number):
dzielnik = [9,8,7,6,5,4,3,2,]
pierwsza = []
result = []
for i in dzielnik:
while number%i == 0:
y = wynik(number, i)
number = liczba(number)
result.append(str(y))
if len(result) == 0 or number != 1:
return 0
else:
result.sort()
x = "".join(result)
return int(x)
Nov. 25, 2016