Problem1218--A hard problem

1218: A hard problem

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 31  Solved: 5
[Submit] [Status] [Web Board] [Creator:]

Description

Now PIPI have a function f(x):
int f ( int x ) {
    if ( x == 0 ) return 0;
    return f ( x / 10 ) + x % 10;
}
For a given interval [A, B] (1 <= A <= B <= 10^9), calculate how many integer x that mod f(x) equal to 0.

Input

There are multiple test cases.
Next T lines, Each line has one test case that has two integers A and B, separated by one blank space.

Output

For each test case, output only one line containing the case number and an integer indicated the number of x.

Sample Input

1 10
11 20

Sample Output

Case 1: 10
Case 2: 3

Source/Category

困难