Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
"Digits Multiplication" solution in Uncategorized category for Digits Multiplication by Mateusz_Wryszcz
def checkio(number: int) -> int:
result = 1
for digit in str(number):
if digit != '0':
result *= int(digit)
return result
print("Example:")
print(checkio(123405))
# These "asserts" are used for self-checking
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!")
Dec. 30, 2022