Digits That Divide
A number can be split into its digits so you can check which of them actually divide it evenly. The function find_digits receives a positive integer n. Count how many digits of n divide the original number with no remainder. Skip the digit 0, because division by zero is not allowed.
Примеры
Ввод
12Вывод
2Ввод
1012Вывод
3Ввод
123456789Вывод
3Нужно реализовать
def find_digits(n: int) -> int:
Теги
math
Melde dich an, um den Einreichungsverlauf zu sehen
AnmeldenMelde dich an, um den KI-Mentor zu nutzen
AnmeldenVisible tests
1
Input
12Expected
22
Input
1012Expected
33
Input
123456789Expected
34
Input
9Expected
15
Input
10Expected
16
Input
2Expected
1Focus radio
Paused · SomaFM · Fluid