BETA
School Problem's Submission isn't counted in score!

Total Submissions: 2145 Accuracy:

38.46%

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 Input/Output Examples Use 'Expected Output' option **

Contributor: Harsh Agarwal

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

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