find-the-sum

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.

Source: hackerearth | Difficulty: UNKNOWN_DIFFICULTY


Solutions: