Alice wrote an exam containing N true or false questions (i.e. questions whose answer is either true or false). Each question is worth 1 mark and there is no negative marking in the examination. Alice scored K marks out of N.

Bob wrote the same exam but he marked each and every question as the opposite of what Alice did, i.e, for whichever questions Alice marked true, Bob marked false and for whichever questions Alice marked false, Bob marked true.

Determine the score of Bob.

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

- The first line contains a single integer T — the number of test cases. Then the test cases follow.
- The first and only line of each test case contains two space-separated integers N and K — the total number of questions in the exam and the score of Alice.

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

For each test case, output on a new line the score of Bob.

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

$1 ≤ T ≤ 2000$
$1 ≤N ≤100$
$0 ≤K ≤N$

----- Sample Input 1 ------ 
3
1 1
50 0
100 76

----- Sample Output 1 ------ 
0
50
24

----- explanation 1 ------ 
Test case $1$: There was one question in the exam and Alice answered it correctly. This means that Bob will surely answer it incorrectly. Therefore Bob's score is zero.

Test case $2$: Alice answered all the questions incorrectly, and so Bob will surely answer all the questions correctly. Therefore Bob's score is $50$.

Difficulty: EASY

Solutions:
t = int(input())
for _ in range(t):
	(n, k) = map(int, input().split())
	b = n - k
	print(b)


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


t = int(input())
for i in range(t):
	(n, k) = map(int, input().split())
	print(n - k)


t = int(input())
for i in range(t):
	(n, k) = [int(x) for x in input().split()]
	print(n - k)


for i in range(int(input())):
	(a, b) = list(map(int, input().split()))
	print(a - b)


t = int(input())
for i in range(t):
	(a, b) = map(int, input().split())
	print(a - b)


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


n = int(input())
for i in range(n):
	(a, b) = map(int, input().split())
	print(a - b)


t = int(input())
for _ in range(t):
	(a, b) = map(int, input().split())
	print(a - b)


for _ in range(int(input())):
	(x, y) = map(int, input().split())
	print(x - y)


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


T = int(input())
for i in range(T):
	(a, b) = map(int, input().split())
	total = a - b
	print(total)


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


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


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


for _ in range(int(input())):
	(n, k) = map(int, input().split())
	print(n - k)


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


for i in range(int(input())):
	(a, b) = map(int, input().split())
	print(abs(a - b))


t = int(input())
while t:
	(n, k) = map(int, input().split())
	print(n - k)
	t -= 1


i = int(input(''))
j = 0
while j < i:
	(x, y) = map(int, input('').split())
	op = x - y
	j += 1
	print(op)


T = int(input())
for tc in range(T):
	(n, k) = map(int, input().split())
	print(n - k)


T = int(input())
for i in range(0, T):
	(N, K) = input().split()
	n = int(N)
	k = int(K)
	print(n - k)


T = int(input())
for i in range(T):
	(x, y) = input().split()
	A = int(x)
	B = int(y)
	print(A - B)


a = int(input())
while a != 0:
	(x, y) = map(int, input().split())
	print(x - y)
	a -= 1


T = int(input())
for i in range(T):
	(N, K) = map(int, input().split())
	print(N - K)


n = int(input())
for i in range(n):
	(n1, n2) = map(int, input().split())
	print(n1 - n2)


t = int(input())
for i in range(t):
	(k, n) = map(int, input().split())
	b = n - k
	if b >= 0:
		print(b)
	else:
		print(b * -1)


for _ in range(int(input())):
	(n, c) = [int(x) for x in input().split()]
	print(n - c)


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


for i in range(int(input())):
	(N, K) = map(int, input().split())
	alice_wrong_answers = N - K
	print(alice_wrong_answers)


number = int(input())
for i in range(number):
	(a, b) = map(int, input().split())
	print(a - b)


t = int(input())
for i in range(t):
	(N, K) = map(int, input().split(' '))
	b = N - K
	print(b)


T = int(input())
for i in range(T):
	(N, k) = map(int, input().split())
	n1 = N - k
	print(n1)


T = int(input())
for i in range(T):
	(n, k) = map(int, input().split())
	print(n - k)


t = int(input())
for i in range(t):
	(n, k) = list(map(int, input().split()))
	if n == k:
		print(0)
	else:
		print(n - k)


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


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


a = int(input())
for i in range(a):
	(b, c) = map(int, input().split())
	print(b - c)


test_cases = int(input())
holder = 0
for _ in range(test_cases):
	test_info = input()
	test_infoS = test_info.split(' ')
	bob_result = int(test_infoS[0]) - int(test_infoS[1])
	holder += bob_result
	print(holder)
	holder = 0


n = int(input())
for i in range(n):
	(x, y) = input().split()
	x = int(x)
	y = int(y)
	print(x - y)


n = int(input())
for i in range(n):
	lst = list(map(int, input().split()))[:2]
	print(lst[0] - lst[1])


p = int(input())
for i in range(0, p):
	(T, R) = map(int, input().split())
	print(T - R)