the-secret-code-1

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

Source: hackerearth | Difficulty: UNKNOWN_DIFFICULTY


Solutions: