Problem
You are given a range of integers . An integer is said to be reachable if it can be represented as a sum of two not necessarily distinct integers in this range. Find the number of distinct reachable integers.
Input
- The first line of the input contains a single integer denoting the number of test cases. The description of test cases follows.
- The first and only line of each test case contains two space-separated integers and .
Output
For each test case, print a single line containing one integer — the number of reachable integers.
Constraints
Sample 1:
Input
Output
2
2 2
2 3
1
3
Explanation:
Example case 1: The only reachable integer is .
Example case 2: , and are reachable, since , and .
ANSWER