The working hours of Chef’s kitchen are from X pm to Y pm (1 ≤ X < Y ≤ 12). 

Find the number of hours Chef works.

------ 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 X and Y — the starting and ending time of working hours respectively.

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

For each test case, output on a new line, the number of hours Chef works.

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

$1 ≤ T ≤ 100$
$1 ≤ X < Y ≤ 12$

----- Sample Input 1 ------ 
4
1 2
3 7
9 11
2 10

----- Sample Output 1 ------ 
1
4
2
8

----- explanation 1 ------ 
Test case $1$: Chef starts working at $1$ pm and works till $2$ pm. Thus, he works for $1$ hour.

Test case $2$: Chef starts working at $3$ pm and works till $7$ pm. Thus, he works for $4$ hours.

Test case $3$: Chef starts working at $9$ pm and works till $11$ pm. Thus, he works for $2$ hours.

Test case $4$: Chef starts working at $2$ pm and works till $10$ pm. Thus, he works for $8$ hours.

Source: codechef | Difficulty: EASY
Tags: Mathematics


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


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


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


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


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


t = int(input())
for _ in range(t):
	(x, y) = map(int, input().split())
	if x >= 1 and y <= 12:
		print(y - x)


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


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


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


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


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


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


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


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


t = int(input())
while t >= 1:
	(x, y) = [int(x) for x in input().split()]
	print(y - x)
	t -= 1


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


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


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


T = int(input())
for i in range(T):
	(start, end) = map(int, input().split())
	print(abs(end - start))


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


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


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


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


t = int(input())
res = []
for i in range(t):
	inpt = [int(x) for x in input().split()]
	res.append(inpt[1] - inpt[0])
for ele in res:
	print(ele)


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


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


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


t = int(input())

def hours(t):
	x = []
	for i in range(1, t + 1):
		a = list(map(int, input().split()))
		x.append(a)
	for num in x:
		print(num[1] - num[0])
hours(t)


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


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


import math
test_cases = int(input())
for i in range(test_cases):
	num = list(map(int, input().split()))
	print(int(math.fabs(num[0] - num[-1])))


c = int(input())
for i in range(c):
	(s, e) = map(int, input().split(' '))
	print(e - s)


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


l = []
n = int(input())
for i in range(n):
	(x, y) = map(int, input().split())
	if x < y:
		l.append(y - x)
	else:
		l.append(x - y)
print(*l, sep='\n')


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


n = int(input())
for i in range(n):
	(start, end) = map(int, input().split(' '))
	print(end - start)


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


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


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


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


T = int(input())
if 1 <= T and T <= 100:
	for i in range(T):
		(X, Y) = map(int, input().split())
		if 1 <= X and X <= 12 and (1 <= Y) and (Y <= 12) and (X < Y):
			d = Y - X
			print(d)