P16015 [HackerEarth] SKIT's HackerEarth Club students went on to create a special digital safe to keep their special & worthy Algorithms.
普及
题目描述

SKIT's HackerEarth Club students went on to create a special digital safe to keep their special & worthy Algorithms.
This digital safe need to be unlocked with a special secret code which can be made up through two special digits.

Students from Hacking Club tried to hack the digital safe by phishing the HackerEarth Club members and out of that they were able to find those two special digits which were 3 and 5.

Now, these Hackers also went to get knowledge about the range of the secret code through phishing but they are still unable to guess the actual secret code.

You have to determine the total number of possible secret code in the given range L and R (both inclusive).

Input:

First line of input contains an integer T denoting the number of test cases.
Each test contains two space separated integers L and R.

Output:

Output the number of possible secret code as an integer on each line.

Constraints:
1 ≤ T ≤ 5
1 ≤ L ≤ R ≤ 10^9

SAMPLE INPUT
2
1 10
11 20

SAMPLE OUTPUT
2
0

Explanation

Test Case #1:

There are two possible secret codes 3 and 5 itself.

Test Case #2:

No possible secret code in the given range

输入格式

见题面

输出格式

见题面

样例输入
5 11479 900029358 1 1000000000 335535333 335535333 62419 987654321 4 1000000000
样例输出
1016 490 754 171 510