aboutsummaryrefslogtreecommitdiff
path: root/python/FindDigits.py
blob: 6bdfebf2c274c41c617d40e1715896df44cd979b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env python3


def find_digit(n):
    count = 0
    list = [int(i) for i in n]
    for i in range(len(n)):
        if list[i] == 0:
            continue
        if int(n) % list[i] == 0:
            count = count + 1
    return count

t = int(input())

while(t):
    t = t - 1;
    n = input()
    print(find_digit(n))