RANGZER2 - ZEROES IN RANGE V2

You are given two integers a and b. Find the number of zeroes in the digits of all the numbers in the range [a, b] inclusive.

Input

The first line consists of an integer t, the number of test cases. For each test case you will be given two integers a and b (a <= b).

Output

For each test case print the required answer.

Constraints

1<=t<=1000

1<=a<=b<=10^9

Example

Input:
2
1 10
1 100

Sample Output:
1
11

Added by:cegprakash
Date:2013-02-27
Time limit:2s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: BF

hide comments
2013-07-17 19:45:03 Bharat Jain
@Hariharan
2
1 999
1000 1234

o/p
189
154
2013-03-11 17:35:53 mehmetin
Which one is the other similar problem?
--ans--> This one is in tutorial. ;-)

Last edit: 2013-03-11 17:41:53
2013-03-08 11:32:03 Francky
We yet have such problem (or very near), and here constraints are too weak. Should be moved to tutorial.
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.