There were initially X million people in a town, out of which Y million people left the town and Z million people immigrated to this town. 

Determine the final population of town in millions.

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

- The first line of input will contain a single integer T, denoting the number of test cases.
- The first and only line of each test case consists of three integers X, Y and Z.

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

For each test case, output the final population of the town in millions.

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

$1 ≤ T ≤ 100$
$1 ≤ X, Y, Z ≤ 10$
$Y ≤ X$

----- Sample Input 1 ------ 
4
3 1 2
2 2 2
4 1 8
10 1 10

----- Sample Output 1 ------ 
4
2
11
19

----- explanation 1 ------ 
Test case $1$: The initial population of the town was $3$ million, out of which $1$ million people left and $2$ million people entered the town. So, final population $= 3 - 1 + 2 = 4$ million.

Test case $2$: The initial population of the town was $2$ million, out of which $2$ million left and $2$ million immigrated. The final population is thus $2+2-2 = 2$ million.

Difficulty: EASY
Tags: Mathematics

Starter code:

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


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


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


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


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


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


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


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


T = int(input())
for i in range(T):
	(N, M, L) = map(int, input().split())
	A = N - M + L
	print(A)


T = int(input())
for t in range(T):
	(X, Y, Z) = map(int, input().split())
	f = X - Y + Z
	print(f)


T = int(input())
while T in range(1, 101):
	T -= 1
	(x, y, z) = input().split()
	x = int(x)
	y = int(y)
	z = int(z)
	c = x - y + z
	print(c)


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


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


i = int(input())
for j in range(i):
	m = input().split()
	print(int(m[0]) - int(m[1]) + int(m[2]))


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


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


try:
	for _ in range(int(input())):
		(x, y, z) = map(int, input().split())
		print(x - y + z)
except:
	print(0)


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


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


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


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


T = int(input())
for i in range(0, T):
	(X, Y, Z) = input().split()
	x = int(X)
	y = int(Y)
	z = int(Z)
	print(x - y + z)


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


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


tc = int(input())
while tc:
	(x, y, z) = map(int, input().split(' '))
	print(x + z - y)
	tc = tc - 1