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
PostgreSQLv16

Hier erscheint das Ergebnis der Codeausführung

Visible tests
1
Input
12
Expected2
2
Input
1012
Expected3
3
Input
123456789
Expected3
4
Input
9
Expected1
5
Input
10
Expected1
6
Input
2
Expected1
Focus radio
Paused · SomaFM · Fluid