Logo Universal Online Judge

UOJ

时间限制:2 s 空间限制:1024 MB

#2281. 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).

输入格式

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}$

输出格式

For each test case print the number of mirror numbers between a and b in a single line.
译题: 一个数在镜子里看起来跟它一模一样的回文数,叫回文镜像数,求[L,R]内有多少个回文镜像数

输入输出样例 #1

输入 #1

3
0 10
10 20
1 4

输出 #1

3
1
1