SP10649 MYQ10 - Mirror Number

Description

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 Format

First line contains T, number of testcases

Output Format

For each test case print the number of mirror numbers between a and b in a single line.