Digit Sum of a Range

No attempts yetTime limit1sMemory limit128 MB

Problem

The digit sum of a range $[a, b]$ is the sum of every digit of every integer contained in that range. For example, the digit sum of the range $[28, 31]$ is:

$$2+8 + 2+9 + 3+0 + 3+1 = 28$$

Given two integers $a$ and $b$, write a program that computes the digit sum of the range $[a, b]$.

Input

The first line contains the number of test cases $T$. ($T \le 100$)

Each of the next $T$ lines contains one test case: two integers $a$ and $b$ separated by a space. ($0 \le a \le b \le 10^{15}$)

Output

For each test case, print the digit sum of the range $[a, b]$ on its own line.