On a digital display, digits 0,1,2,5,8 are mirror images of 0,1,5,2,8.
A vertical number is one for which its mirror image is the same as the original number. Given two integers(A and B), find the number of vertical numbers between the two numbers (inclusive).
Mirror Images are taken about a vertical axis.
First line of input contains T,the number of test cases. The next T lines contain two integers A and B in each line.
Print the number of vertical numbers between A and B .
A will represent an integer between 0 and 10^18, inclusive.
B will represent an integer between A and 10^18, inclusive.
Both A and B will have no extra leading zeros.
Problem Setter: Anjali Singh