For the upcoming semester, the admins of your university decided to keep a total of X seats for the MATH-1 course. A student interest survey was conducted by the admins and it was found that Y students were interested in taking up the MATH-1 course.

Find the minimum number of extra seats that the admins need to add into the MATH-1 course to make sure that every student who is interested in taking the course would be able to do so.

------ Input Format ------ 

- The first line of input will contain a single integer T, denoting the number of test cases.
- Each test case consists of two-space separated integers on a single line, X and Y — the current number of seats up for enrolment and the number of students interested in taking up the course in the upcoming semester, respectively.

------ Output Format ------ 

For each test case, output on a new line the minimum number of seats required to be added.

------ Constraints ------ 

$1 ≤ T ≤ 100$
$1 ≤ X, Y ≤ 10^{5}$

----- Sample Input 1 ------ 
4
1 1
12 34
50 49
49 50

----- Sample Output 1 ------ 
0
22
0
1
----- explanation 1 ------ 
Test case $1$: Exactly $1$ seat is available for enrolment, and exactly $1$ student is interested in taking up the course, hence addition of more seats is not required.

Test case $2$: $12$ seats are available for enrolment but $34$ students are interested in taking up the course, hence the admins would have to add $34-12=22$ more seats to make sure that every student interested in the course gets a seat.

Test case $3$: $50$ seats are available for enrolment and $49$ students are interested in taking up the course, hence addition of more seats is not required.

Test case $4$: $49$ seats are available for enrolment, but $50$ students are interested in taking up the course, hence the admins would have to add $50-49=1$ more seat to make sure that every student interested in the course gets a seat.

Source: codechef | Difficulty: EASY
Tags: Mathematics


Solutions:
t = int(input())
for i in range(t):
	(x, y) = map(int, input().split(' '))
	if x < y:
		print(y - x)
	else:
		print(0)


n = int(input())
for i in range(n):
	(s, r) = map(int, input().split())
	if r > s:
		print(r - s)
	else:
		print(0)


t = int(input())
for i in range(t):
	(X, Y) = map(int, input().split())
	if Y > X:
		print(Y - X)
	else:
		print(0)


T = int(input())
for CRICKETER in range(T):
	(X, Y) = map(int, input().split())
	if X >= Y:
		print('0')
	else:
		print(Y - X)


t = int(input())
for i in range(t):
	(m, n) = map(int, input().split())
	c = abs(m - n)
	if m > n:
		print('0')
	else:
		print(c)


t = int(input())
for u in range(t):
	(X, Y) = list(map(int, input().split()))
	if Y > X:
		print(Y - X)
	else:
		print(0)


for _ in range(int(input())):
	(x, y) = map(int, input().split())
	if x >= y:
		print('0')
	else:
		print(y - x)


test = int(input())
ans = []
while test:
	test = test - 1
	(X, Y) = [int(x) for x in input().split()]
	if Y - X > 0:
		ans.append(Y - X)
	else:
		ans.append(0)
for i in ans:
	print(i)


t = int(input())
for i in range(t):
	(x, y) = map(int, input().split())
	print(max(0, y - x))


for _ in range(int(input())):
	(a, b) = map(int, input().split())
	if a == b or a > b:
		print(0)
	elif b > a:
		print(b - a)


x = int(input())
for i in range(x):
	(a, b) = map(int, input().split())
	if a > b:
		print('0')
	else:
		print(b - a)


a = int(input())
for i in range(a):
	(x, y) = map(int, input().split())
	if x >= y:
		print('0')
	else:
		print(abs(x - y))


T = int(input())
for t in range(T):
	(X, Y) = map(int, input().split())
	q = Y - X
	if q >= 0:
		print(q)
	else:
		print(0)


n = int(input())
for i in range(n):
	(a, b) = list(map(int, input().split()))
	if b - a < 0:
		print('0')
	else:
		print(b - a)


T = int(input())
for i in range(T):
	(X, Y) = map(int, input().split())
	seats = Y - X
	if X < Y:
		print(seats)
	else:
		print(0)


T = int(input())
for i in range(T):
	(X, Y) = map(int, input().split())
	extra_seats = max(0, Y - X)
	print(extra_seats)


T = int(input())
for i in range(T):
	(x, y) = map(int, input().split())
	if x == y:
		print(0)
	elif x < y:
		print(y - x)
	else:
		print(0)


t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	if b > a:
		print(b - a)
	else:
		print('0')


T = int(input())
for t in range(T):
	(x, y) = map(int, input().split())
	if x >= y:
		print(0)
	elif x < y:
		print(y - x)


m = int(input())
for i in range(m):
	n = input().split()
	if int(n[0]) > int(n[1]):
		print('0')
	else:
		print(abs(int(n[0]) - int(n[1])))


t = int(input())
for i in range(0, t):
	l = list(map(int, input().strip().split()))
	if l[0] <= l[1]:
		print(l[1] - l[0])
	else:
		print('0')


t = int(input())
for ts in range(t):
	(x, y) = map(int, input().split(' '))
	seats = y - x
	if seats < 0:
		seats = 0
	print(seats)


cases = int(input())
for case in range(cases):
	(x, y) = map(int, input().split())
	if x >= y:
		print(0)
	else:
		print(y - x)


t = int(input())
while t:
	(x, y) = map(int, input().split())
	print(y - x if y > x else 0)
	t -= 1


n = int(input())
for i in range(n):
	(x, y) = list(map(int, input().split()))
	if x >= y:
		print('0')
	else:
		print(y - x)


T = int(input())
for i in range(0, T):
	(X, Y) = input().split()
	x = int(X)
	y = int(Y)
	if y > x:
		print(y - x)
	elif y <= x:
		print(0)


n = int(input())
for i in range(n):
	(a, b) = map(int, input().split())
	if a == b:
		print(0)
	elif a < b:
		print(b - a)
	elif a > b:
		print(0)


x = int(input())
while x != 0:
	(a, b) = map(int, input().split())
	if a >= b:
		print('0')
	else:
		print(b - a)
	x -= 1


t = int(input())
for i in range(t):
	(A, B) = map(int, input().split())
	if A < B:
		print(B - A)
	else:
		print('0')