In the current semester, you have taken X RTP courses, Y Audit courses and Z Non-RTP courses. 

The credit distribution for the courses are:
4 credits for clearing each RTP course.
2 credits for clearing each Audit course.
No credits for clearing a Non-RTP course. 

Assuming that you cleared all your courses, report the number of credits you obtain this semester.

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

The first line contains a single integer T, the number of test cases. T test cases follow. Each test case consists of one line, containing 3 integers separated by spaces.
- The first integer is X, the number of RTP courses.
- The second integer is Y, the number of Audit courses.
- The third integer is Z, the number of non-RTP courses.

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

The output must consist of T lines. The i^{th} should consist of a single integer: the number of credits one gets for the i^{th} test case.

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

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

----- Sample Input 1 ------ 
4
6 6 5
8 7 2
9 3 8
9 2 4

----- Sample Output 1 ------ 
36
46
42
40

----- explanation 1 ------ 
Test case $1$: You obtain $4$ credits for each of the RTP courses, accounting for $4 \cdot 6 = 24$ credits. You also obtain $2$ credits for each audit course, accounting for $2 \cdot 6 = 12$ credits. Finally, you get $0$ credits for each of the non-RTP courses, accounting for $0 \cdot 5 = 0$ credits. This accounts for a total of $24 + 12 + 0 = 36$ credits.

Test case $2$: You obtain $4$ credits for each of the RTP courses, accounting for $4 \cdot 8 = 32$ credits. You also obtain $2$ credits for each audit course, accounting for $2 \cdot 7 = 14$ credits. Finally, you get $0$ credits for each of the non-RTP courses, accounting for $0 \cdot 2 = 0$ credits. This accounts for a total of $32 + 14 + 0 = 46$ credits.

Test case $3$: You obtain $4$ credits for each of the RTP courses, accounting for $4 \cdot 9 = 36$ credits. You also obtain $2$ credits for each audit course, accounting for $2 \cdot 3 = 6$ credits. Finally, you get $0$ credits for each of the non-RTP courses, accounting for $0 \cdot 8 = 0$ credits. This accounts for a total of $36 + 6 + 0 = 42$ credits.

Test case $4$: You obtain $4$ credits for each of the RTP courses, accounting for $4 \cdot 9 = 36$ credits. You also obtain $2$ credits for each audit course, accounting for $2 \cdot 2 = 4$ credits. Finally, you get $0$ credits for each of the non-RTP courses, accounting for $0 \cdot 4 = 0$ credits. This accounts for a total of $36 + 4 + 0 = 40$ credits.

Source: codechef | Difficulty: EASY
Tags: Mathematics


Solutions:
t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	sum = 0
	x *= 4
	y *= 2
	z *= 0
	sum = x + y + z
	print(sum)


t = int(input())
for _ in range(t):
	(x, y, z) = map(int, input().split())
	print(x * 4 + y * 2 + z * 0)


T = int(input())
for _ in range(T):
	(X, Y, Z) = map(int, input().split())
	print(4 * X + 2 * Y)


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


t = int(input())
for i in range(t):
	(n, m, l) = map(int, input().split())
	print(n * 4 + 2 * m + 0 * l)


t = int(input())
for _ in range(t):
	(a, b, _) = input().split()
	print(int(a) * 4 + int(b) * 2)


t = int(input())
for u in range(t):
	(X, Y, Z) = list(map(int, input().split()))
	print(X * 4 + Y * 2)


for t in range(int(input())):
	(i, j, k) = map(int, input().split(' '))
	p = i * 4 + 2 * j + 0 * k
	print(p)


T = int(input())
for i in range(T):
	(X, Y, Z) = map(int, input().split())
	print(X * 4 + Y * 2 + 0 * Z)


test = int(input())
ans = []
while test:
	test = test - 1
	(X, Y, Z) = [int(x) for x in input().split()]
	ans.append(X * 4 + Y * 2 + Z * 0)
for i in ans:
	print(i)


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


for i in range(int(input())):
	(x, y, z) = map(int, input().split())
	a = x * 4 + y * 2 + z * 0
	print(a)


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split(' '))
	a = x * 4
	b = y * 2
	c = z * 0
	print(a + b + c)


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


for _ in range(int(input())):
	(x, y, z) = map(int, input().split())
	A = x * 4 + y * 2
	print(A)


test_cases = int(input())
for i in range(test_cases):
	credits = list(map(int, input().split()))
	print(credits[0] * 4 + credits[1] * 2)


t = int(input())
for i in range(t):
	(X, Y, Z) = map(int, input().split())
	credits = X * 4 + Y * 2 + Z * 0
	print(credits)


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


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	credits = 4 * x + 2 * y
	print(credits)


n = int(input())
for _ in range(n):
	(x, y, z) = list(map(int, input().split()))
	print(4 * x + 2 * y)


for i in range(int(input())):
	(a, b, c) = map(int, input().split())
	print(4 * a + 2 * b + 0 * 5)


T = int(input())
for i in range(0, T):
	(X, Y, Z) = input().split()
	x = int(X)
	y = int(Y)
	z = int(Z)
	r = x * 4
	a = y * 2
	n = z * 0
	print(r + a + n)


t = int(input())
for i in range(t):
	(X, Y, Z) = map(int, input().split())
	A = 4 * X
	B = 2 * Y
	C = 0 * Z
	D = A + B + C
	print(D)


n = int(input())
while n > 0:
	(a, b, c) = map(int, input().split())
	print(a * 4 + b * 2 + c * 0)
	n -= 1


t = int(input())
for i in range(t):
	(m, n, o) = map(int, input().split())
	k = m * 4
	l = n * 2
	print(k + l)


T = int(input())
for i in range(T):
	(x, y, z) = map(int, input().split())
	RT_cr = 4 * x
	Ad_cr = 2 * y
	NRT_cr = 0
	print(RT_cr + Ad_cr)


t = int(input())
while t > 0:
	(x, y, z) = map(int, input().split())
	print(4 * x + 2 * y)
	t -= 1


n = int(input())
for i in range(n):
	sum = 0
	a = list(map(int, input().split(' ')))
	sum += a[0] * 4 + a[1] * 2
	print(sum)


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	if (x, y, z >= 1 and x, y, z <= 10):
		print(x * 4 + y * 2 + z * 0)


t = int(input())
for ts in range(t):
	(x, y, z) = map(int, input().split(' '))
	print(4 * x + 2 * y)


t = int(input())
for i in range(t):
	(x, y, z) = map(int, input().split())
	n = 4 * x
	m = 2 * y
	a = 0 * z
	print(n + m + a)


t = int(input())
for i in range(t):
	(a, b, c) = map(int, input().split())
	n = a * 4
	m = b * 2
	x = c * 0
	print(n + m + x)


t = int(input())
for i in range(t):
	l = list(map(int, input().split(' ')))
	print(4 * l[0] + 2 * l[1])


t = int(input())
for _ in range(t):
	(a, b, c) = map(int, input().split())
	print(a * 4 + b * 2 + c * 0)