MYQ10  Mirror Number
A number is called a Mirror number if on lateral inversion, it gives the same number i.e it looks the same in a mirror. For example 101 is a mirror number while 100 is not.
Given two numbers a and b, find the number of mirror numbers in between them (inclusive of a and b).
Input
First line contains T, number of testcases <= 10^5.
Each testcase is described in a single line containing two numbers a and b.
0 <= a<=b <= 10^44
Output
For each test case print the number of mirror numbers between a and b in a single line.
Example
Input: 3
0 10
10 20
1 4 Output: 3
1
1
hide comments
darryl:
20130920 14:16:42
I learned that checking for 0 to 10^44 is not all that reliable. Brute force check for small numbers is the best. 

Aastha Dua:
20130825 09:44:45
can anyone plz post some test cases.. i m getting WA again and again..but i think my code is giving correct outputs.. even for 0 to 10^44 also, i am getting 62762119217..plz reply asap. 

Ashish Lavania:
20121219 19:04:21
@Jack


Ehor Nechiporenko:
20120816 09:26:45
Is the solution for


(Tjandra Satria Gunawan)(æ›¾æ¯…æ˜†):
20120721 18:03:05
first step: bruteforce it > TLE


:D:
20120524 18:52:48
Is it like a led display?


Mitch Schwartz:
20120301 23:15:12
Notice that these are not the same as palindromes. I think it's easy to miss if you don't read carefully. 
Added by:  jack(chakradarraju) 
Date:  20120214 
Time limit:  0.112s1.829s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Resource:  Bytecode 2012 