Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Leave strings alone!) solution in Clear category for Digits Multiplication by freeman_lex
def checkio(number: int) -> int:
res = 1
while number > 1:
a, b = divmod(number, 10)
number, res = a, res * (1, b)[bool(b)]
return res
print("Example:")
print(checkio(123405))
assert checkio(123405) == 120
assert checkio(999) == 729
assert checkio(1000) == 1
assert checkio(1111) == 1
print("The mission is done! Click 'Check Solution' to earn rewards!")
Sept. 1, 2022
Comments: