#codeforcesP2009A. Minimize!
Minimize!
Problem
You are given two integers and . Over all possible integer values of , find the minimum value of .
Input
The first line contains — the number of test cases.
Each test case contains two integers and
Output
For each test case, output the minimum possible value of on a new line.
Example : in
3
1 2
3 10
5 5
Example : out
1
7
0
Note
In the first test case, you can choose and obtain an answer of . It can be shown this is the minimum value possible.
In the second test case, you can choose and obtain an answer of . It can be shown this is the minimum value possible.
相关
在下列比赛中: