spoj#IGAME. Interesting Game
Interesting Game
Alice and Bob play an interesting game and the game is played on a number.
So a player, on his chance, can choose any non zero digit of the number and decrease the digit by any non zero amount such that the resulting digit remains non-negative. The player who gets all the digits of the number 0 wins. Both play optimally and Alice starts first. Now tell how many numbers are there between A and B on which if the game is played Alice wins and also find how many numbers are there where Bob wins. On every number between A and B, Alice plays first on that number .
Input Format
The Input line consists of T test cases. On each line there are two numbers A and B.
Output Format
The Output line consists of T lines each having two numbers.
Constraints:
1 ≤ T ≤ 10000
1 ≤ A ≤ B ≤ 1018
Sample Input
2
1 10
101 110
Sample Output
10 0
8 2
Explanation
In the first case the first player Alice will always win because she can reduce any digit to 0.
In the second case the second player Bob will win on 2 numbers 101 and 110. Rest Alice will win.