You are given a range L to R. You are required to find the number of k-special numbers in this range. A k-special number is a number whose all digits are a multiple of k.
For example:
26 is a 2-special number. Digits 2 and 6 are multiples of 2.
63 is a 3-special number. Digits 6 and 3 are multiples of 3.
Input format
Output format
For each test case, print an integer in a separate line denoting the count of k-special integers in range L to R (both inclusive).
Constraints
1≤T≤1000001≤L≤R≤10181≤k≤9
1st test case
only 5 is the number that is 5-special in 5 - 10
2st test case
{20, 22, 24, 26, 28, 40} are the number that is 2-special in 20 - 40