CF55D Beautiful numbers
Description
Volodya is an odd boy and his taste is strange as well. It seems to him that a positive integer number is beautiful if and only if it is divisible by each of its nonzero digits. We will not argue with this and just count the quantity of beautiful numbers in given ranges.
Input Format
The first line of the input contains the number of cases $ t $ ( $ 1
Output Format
Output should contain $ t $ numbers — answers to the queries, one number per line — quantities of beautiful numbers in given intervals (from $ l_{i} $ to $ r_{i} $ , inclusively).