You are given two integers and . You have to calculate
The first line contains a single integer (1 \leq t \leq 10^4).
Each of the next lines contains two integers (1 \leq n \leq 10^9) and (1 \leq m \leq n).
For each test case, output the value of the expression.
Example 1
Subtask 1 ( points): 1 \leq m \leq n \leq 2000.
Subtask 2 ( points): No additional constraints.