Some time ago, Chef bought X stocks at the cost of Rs. Y each. Today, Chef is going to sell all these X stocks at Rs. Z each. What is Chef's total profit after he sells them?

Chef's profit equals the total amount he received by selling the stocks, minus the total amount he spent buying them.

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

- The first line of input contains an integer T, denoting the number of test cases. The description of T test cases follows.
- The first and only line of each test case contains three space-separated integers X, Y and Z — the number of stocks, the price they were bought at, and the price they can be sold at, respectively.

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

For each test case print on a new line a single integer — Chef's profit after selling all the stocks he has.

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

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

----- Sample Input 1 ------ 
3
2 5 20
3 1 2
4 5 6
----- Sample Output 1 ------ 
30
3
4

----- explanation 1 ------ 

Test Case 1: Chef bought $X = 2$ stocks for $Y = 5$ each, making the total amount spent by Chef $ = 2 \cdot 5 = 10$.

Chef can sell this stock today for $Z = 20$, making the total amount received by Chef $ =  2 \cdot 20 = 40$.

The total profit is then the amount received minus the amount spent, which equals $40 - 10 = 30$.

Test Case 2: Chef bought $X = 3$ stocks for $Y = 1$ each, making the total amount spent by Chef $ = 3 \cdot 1 = 3$.

Chef can sell this stock today for $Z = 2$, making the total amount received by Chef $ =  3 \cdot 2 = 6$.

The total profit is then the amount received minus the amount spent, which equals $6 - 3 = 3$.

Test Case 3: Chef bought $X = 4$ stocks for $Y = 5$ each, making the total amount spent by Chef $ = 4 \cdot 5 = 20$.

Chef can sell this stock today for $Z = 6$, making the total amount received by Chef $ =  4 \cdot 6 = 24$.

The total profit is then the amount received minus the amount spent, which equals $24 - 20 = 4$

Source: codechef | Difficulty: EASY


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


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


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


n = int(input())
for i in range(n):
	(x, y, z) = list(map(int, input().split()))
	hihi = x * y
	huhu = x * z
	print(huhu - hihi)


T = int(input())
for _ in range(T):
	(X, Y, Z) = map(int, input().split())
	buying_price = X * Y
	selling_price = X * Z
	print(selling_price - buying_price)


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


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


def code():
	cases = int(input())
	for _ in range(cases):
		(X, Y, Z) = map(int, input().split(' '))
		buy_amount = X * Y
		sell_amount = X * Z
		profit = sell_amount - buy_amount
		print(profit)
code()


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


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


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


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


T = int(input())
for i in range(T):
	(x, y, z) = map(int, input().split())
	n1 = x * y
	n2 = x * z
	n3 = n2 - n1
	print(n3)


for i in range(int(input())):
	data = input().split()
	x = int(data[0])
	y = int(data[1])
	z = int(data[2])
	print((z - y) * x)


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


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


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


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	g = x * y
	f = x * z
	j = f - g
	print(j)


a = int(input())
for i in range(a):
	(b, c, d) = map(int, input().split())
	v = b * c
	u = d * b
	print(abs(v - u))


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


T = int(input())
for t in range(0, T):
	(N, B, S) = map(int, input().split())
	profit = N * (S - B)
	print(profit)


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	a = x * y
	b = x * z
	if b > a:
		print(b - a)
	else:
		print(a - b)


try:
	t = int(input())
	for r in range(t):
		(x, y, z) = map(int, input().split())
		a = x * y
		s = z * x
		p = abs(s - a)
		print(p)
except:
	pass


for i in range(int(input())):
	(bought, each, sold) = map(int, input().split())
	print(sold * bought - bought * each)


n = int(input())
for _ in range(n):
	(x, y, z) = map(int, input().split())
	s = x * y
	h = x * z
	k = abs(h - s)
	print(k)


T = int(input())
while T > 0:
	(X, Y, Z) = map(int, input().split())
	profit = X * Z - X * Y
	print(profit)
	T -= 1


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


inp = int(input())
for i in range(inp):
	(a, b, c) = map(int, input().split())
	newa = a * b
	newc = a * c
	newprofit = newc - newa
	print(newprofit)


goals = int(input())
for distractions in range(goals):
	(life, wife, aim) = map(int, input().split())
	print(life * aim - life * wife)


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


for t in range(int(input())):
	(stocks, cost, sell) = map(int, input().split())
	print(abs(sell * stocks - cost * stocks))


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split(' '))
	buy = x * y
	sell = z * x
	profit = sell - buy
	print(profit)


for i in range(int(input())):
	(X, Y, Z) = map(int, input().split())
	x = X * Y
	y = X * Z
	print(y - x)