题目描述
f(x) is series 1,2,-2,3,-3,3,4,-4,4,-4. Given two positions l and r, find the sum of all elements from l to r(l and r inclusive).
Input :
First line of the input contains a single integer T denoting number of test cases.
For each test case, two integers l and r are given.
Output:
Print the answer in a single line.
Constraints
1 ≤ T ≤ 10, 1 ≤ l,r ≤ 10^12
SAMPLE INPUT
3
1 1
1 3
1 4
SAMPLE OUTPUT
1
1
4
Explanation
Explanation : For the 3rd case, the series is 1,2,-2,3. Therefore the sum will be 4.
输入格式
见题面
输出格式
见题面
样例输入
10
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
10 10
样例输出
3
7
-3
0
27
-4
4
320
60
14