Given a number N. You need to write a program to count the number of digits in N which evenly divides N.
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.
For each test case in a new line print the total number of digits of N which evenly divides N.