BETA
Successful submissions of School Problems are not counted in user ratings.

Submissions : 1141 Accuracy :

35.41

Count Digits
     

Given a number N. You need to write a program to count the number of digits in N which evenly divides N.

Input:
First line of input contains an integer T which denotes the number of test cases. T test cases follows. First line of each test case contains a single integer N.

Output:
For each test case in a new line print the total number of digits of N which evenly divides N.

Constraints:
1<=T<=200
1<=N<=105

Example:
Input:

3
12
1012
23
Output:
2
3
0

**For More Examples Use Expected Output**


Contributor: Harsh Agarwal

Set Default Code

					   
Result:
It is recommended to test your code before clicking 'Submit' button!



                   



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.