The first line contains one integer T — the number of test cases.For each test cases, the first line contains two integers .
For each test cases, output one number - the number of solutions.
3 1 10 2 100 3 100
3 4 8