You are given two integer and . You have to find the summation of digit product of all number from to (inclusive).
Example of digit product:
The digit product of .
The digit product of .
The first line contains an integer (), number of test cases.
Next T lines contain two integer and ().
For each test case print the case number and result mod .
Input | Output |
---|---|
2 12 14 8 10 | Case 1: 9 Case 2: 17 |