Chef has opened a new airline. Chef has 10 airplanes where each airplane has a capacity of X passengers.  
On the first day itself, Y people are willing to book a seat in any one of Chef's airplanes. 

Given that Chef charges Z rupees for each ticket, find the maximum amount he can earn on the first day.

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

- The first line of input will contain a single integer T, denoting the number of test cases.
- Each test case consists of three space-separated integers X, Y, and Z — the capacity of each airplane, the number of people willing to book a seat in any one of Chef's airplanes on the first day, and the cost of each seat respectively.

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

For each test case, output on a new line, the maximum amount Chef can earn on the first day.

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

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

----- Sample Input 1 ------ 
4
2 15 10
1 10 1
5 60 100
1 11 7

----- Sample Output 1 ------ 
150
10
5000
70

----- explanation 1 ------ 
Test case $1$: Chef has $10$ airplanes and each airplane has a capacity of $2$ passengers. Thus, there are $20$ seats available in total.  
There are $15$ people who want to book a seat. Since we have enough seats for everyone, all $15$ people can book their seats and pay $10$ rupees each. The total money Chef earns is $15\cdot 10 = 150$.

Test case $2$: Chef has $10$ airplanes and each airplane has a capacity of $1$ passenger. Thus, there are $10$ seats available in total.  
There are $10$ people who want to book a seat. Since we have enough seats for everyone, all $10$ people can book their seats and pay $1$ rupee each. The total money Chef earns is $10\cdot 1 = 10$.

Test case $3$: Chef has $10$ airplanes and each airplane has a capacity of $5$ passengers. Thus, there are $50$ seats available in total.  
There are $60$ people who want to book a seat. Since we have only $50$ seats, only $50$ people can book their seats and pay $100$ rupees each. The total money Chef earns is $50\cdot 100 = 5000$.

Test case $4$: Chef has $10$ airplanes and each airplane has a capacity of $1$ passenger. Thus, there are $10$ seats available in total.  
There are $11$ people who want to book a seat. Since we have only $10$ seats, only $10$ people can book their seats and pay $7$ rupees each. The total money Chef earns is $10\cdot 7 = 70$.

Source: codechef | Difficulty: EASY
Tags: Mathematics


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


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	total_seats = x * 10
	if total_seats >= y:
		print(y * z)
	elif total_seats <= y:
		max_amount = total_seats * z
		print(max_amount)


a = int(input())
for i in range(a):
	(b, c, d) = [int(x) for x in input().split()]
	e = 10 * b
	if e > c:
		print(c * d)
	else:
		print(e * d)


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	if x * 10 >= y:
		print(y * z)
	else:
		print(x * 10 * z)


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


for m in range(int(input())):
	(x, y, z) = map(int, input().split())
	m = min(x * 10, y)
	print(m * z)


n = int(input())
for i in range(n):
	(a, b, c) = map(int, input().split())
	if a * 10 >= b:
		print(b * c)
	else:
		print(a * 10 * c)


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


t = int(input())
for i in range(t):
	(a, b, c) = map(int, input().split())
	d = a * 10
	if d >= b:
		print(b * c)
	else:
		print(d * c)


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


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


n = int(input())
while n > 0:
	(a, b, c) = list(map(int, input().split()))
	if a * 10 >= b:
		print(b * c)
	else:
		print(a * 10 * c)
	n -= 1


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


for i in range(int(input())):
	(x, y, z) = map(int, input().split())
	tp = 10 * x
	if tp < y:
		y = tp
	print(y * z)


t = int(input())
for i in range(t):
	(x, y, z) = input().split()
	(x, y, z) = (10 * int(x), int(y), int(z))
	p = x
	if y < x:
		p = y
	print(p * z)


t = int(input())
while t > 0:
	(x, y, z) = [int(x) for x in input().split()]
	s = x * 10
	if y <= s:
		print(y * z)
	else:
		print(s * z)
	t -= 1


for _ in range(int(input())):
	(X, Y, Z) = map(int, input().split())
	if Y > 10 * X:
		print(10 * X * Z)
	else:
		print(Y * Z)


T = int(input())
for tc in range(T):
	(X, Y, Z) = map(int, input().split())
	if Y > 10 * X:
		print(10 * X * Z)
	else:
		print(Y * Z)


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


for i in range(int(input())):
	(a, b, c) = map(int, input().split())
	m = min(10 * a, b)
	print(m * c)


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


C = int(input())
for i in range(0, C):
	(X, Y, Z) = map(int, input().split())
	n = X * 10
	if Y <= n:
		print(Y * Z)
	else:
		print(n * Z)


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


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	a = 10
	s = a * x
	if y < s:
		m = y * z
		print(m)
	else:
		n = z * s
		print(n)


test = int(input())
for i in range(test):
	(x, y, z) = list(map(int, input().split()))
	if x * 10 >= y:
		print(y * z)
	else:
		print(x * 10 * z)


a = int(input())
for i in range(a):
	(x, y, z) = map(int, input().split())
	seats = x * 10
	if y > seats:
		y = seats
	price = y * z
	print(price)


a = int(input())
for i in range(a):
	(a, b, c) = map(int, input().split())
	seats = a * 10
	if b > seats:
		b = seats
	price = b * c
	print(price)


N = int(input())
for i in range(N):
	(X, Y, Z) = map(int, input().split())
	capacity = X * 10
	if capacity >= Y:
		print(Y * Z)
	elif capacity < Y:
		print(capacity * Z)


for T in range(int(input())):
	(x, y, z) = map(int, input().split())
	x1 = x * 10
	if y <= x1:
		print(y * z)
	else:
		print(x1 * z)


n = int(input())
for i in range(n):
	(x, y, z) = map(int, input().split())
	k = min(x * 10, y)
	print(k * z)


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


t = int(input())
while t != 0:
	(a, b, c) = map(int, input().split())
	s = a * 10
	if b <= s:
		print(b * c)
	else:
		print(s * c)
	t = t - 1


t = int(input())
for i in range(t):
	(xpas, ypeo, zru) = map(int, input().split())
	m = 10 * xpas
	if ypeo <= m:
		print(ypeo * zru)
	else:
		print(m * zru)


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	total_seats = 10 * x
	seats_sold = min(y, total_seats)
	revenue = seats_sold * z
	print(revenue)


T = int(input())
for i in range(T):
	(X, Y, Z) = map(int, input().split(' '))
	totalCapacity = 10 * X
	if totalCapacity > Y:
		totalIncome = Y * Z
	else:
		totalIncome = totalCapacity * Z
	print(totalIncome)