While Alice was drinking sugarcane juice, she started wondering about the following facts:
The juicer sells each glass of sugarcane juice for 50 coins.
He spends 20\% of his total income on buying sugarcane.
He spends 20\% of his total income on buying salt and mint leaves.
He spends 30\% of his total income on shop rent.

Alice wonders, what is the juicer's profit (in coins) when he sells N glasses of sugarcane juice?  

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

- The first line of input will contain an integer T — the number of test cases. The description of T test cases follows.
- The first and only line of each test case contains an integer N, as described in the problem statement. 

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

For each test case, output on a new line the juicer's profit when he sells N glasses of juice. 

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

$1 ≤ T ≤ 1000$
$1 ≤ N ≤ 10^{6}$

----- Sample Input 1 ------ 
4
2
4
5
10

----- Sample Output 1 ------ 
30
60
75
150

----- explanation 1 ------ 
Test case $1$: The total income is $50\times 2 = 100$ coins. The juicer spends $20$ coins on sugarcane, $20$ coins on  salt and mint leaves and $30$ coins on rent. Thus, the profit is $100-(20+20+30) = 30$ coins. 

Test case $2$: The total income is $50\times 4 = 200$ coins. The juicer spends $40$ coins on sugarcane, $40$ coins on  salt and mint leaves and $60$ coins on rent. Thus, the profit is $200-(40+40+60) = 60$ coins. 

Test case $3$: The total income is $50\times 5 = 250$ coins. The juicer spends $50$ coins on sugarcane, $50$ coins on  salt and mint leaves and $75$ coins on rent. Thus, the profit is $250-(50+50+75) = 75$ coins. 

Test case $4$: The total income is $50\times 10 = 500$ coins. The juicer spends $100$ coins on sugarcane, $100$ coins on  salt and mint leaves and $150$ coins on rent. Thus, the profit is $500-(100+100+150) = 150$ coins.

Difficulty: EASY
Tags: Mathematics

Starter code:

Solutions:
a = int(input())
for i in range(a):
	k = int(input())
	print(k * 15)


t = int(input())
for i in range(t):
	n = int(input())
	print(n * 5 * 3)


for i in range(int(input())):
	n = int(input())
	print(50 * n - 10 * n - 10 * n - 15 * n)


for _ in range(int(input())):
	n = int(input())
	print(15 * n)


for _ in range(int(input())):
	x = int(input())
	x = x * 50
	p = x * 0.2 + x * 0.2 + x * 0.3
	print(int(x - p))


x = int(input())
for i in range(x):
	a = int(input())
	coins = a * 50
	sugarcane = int(20 / 100 * coins)
	salt_mint = int(20 / 100 * coins)
	rent = int(30 / 100 * coins)
	print(coins - (sugarcane + salt_mint + rent))


t = int(input())
for i in range(t):
	n = int(input())
	glasses = n * 50
	sc = glasses * 20 / 100
	sm = glasses * 20 / 100
	rent = glasses * 30 / 100
	print(int(glasses - (sc + sm + rent)))


t = int(input())
while t:
	n = int(input())
	print(15 * n)
	t -= 1


for i in range(int(input())):
	n = int(input())
	print(15 * n)


f = int(input())
for i in range(f):
	n = int(input())
	a = n * (50 - (20 / 100 * 50 + 20 / 100 * 50 + 30 / 100 * 50))
	print(int(a))


T = int(input())
for i in range(T):
	N = int(input())
	p = N * 50
	print(int(p - (p * 0.2 + p * 0.2 + p * 0.3)))


for t in range(int(input())):
	x = int(input())
	print(3 * x * 5)


T = int(input())
for i in range(T):
	n = int(input())
	c = n * 50
	d = c * 0.2 + c * 0.2 + c * 0.3
	print(int(c - d))


T = int(input())
for t in range(T):
	N = int(input())
	a = 50 * N
	print(int(0.3 * a))


for _ in range(int(input())):
	n = int(input())
	a = 10
	b = 15
	c = 2 * a + b
	d = 50 - c
	print(n * d)


for i in range(int(input())):
	N = int(input())
	totalIncome = N * 50
	totalIncome = totalIncome - 2 * int(20 / 100 * totalIncome) - int(30 / 100 * totalIncome)
	print(totalIncome)


T = int(input())
for i in range(T):
	N = int(input())
	profit = 0.7 * (50 * N)
	print(int(N * 50 - profit))


t = int(input())
for i in range(t):
	a = int(input())
	b = a * 50
	c = b * 20 // 100
	d = b * 30 // 100
	print(b - c * 2 - d)


for i in range(int(input())):
	n = int(input())
	c = 50 * n
	d = 10 * n
	f = 15 * n
	g = d + d + f
	print(c - g)


t = int(input())
for i in range(t):
	n = int(input())
	ti = n * 50
	bs = 1 / 5 * ti
	bsm = 1 / 5 * ti
	r = 3 / 10 * ti
	profit = ti - (bs + bsm + r)
	print(int(profit))


for _ in range(int(input())):
	a = int(input())
	print(15 * a)


for i in range(int(input())):
	n = int(input())
	a = n * 50
	s = int(a * (20 / 100))
	m = int(a * (20 / 100))
	r = int(a * (30 / 100))
	print(a - (s + m + r))


t = int(input())
for i in range(t):
	n = int(input())
	tp = 50 * n
	sc = 0.2 * tp
	sml = 0.2 * tp
	sr = 0.3 * tp
	p = tp - (sc + sml + sr)
	print(int(p))


T = int(input())
for tc in range(T):
	n = int(input())
	print(15 * n)


n = int(input())
for i in range(n):
	a = int(input())
	x = a * 50
	y = x * 0.7
	print('%.0f' % (x - y))


for i in range(0, int(input())):
	n = int(input())
	print(n * 50 * 30 // 100)


t = int(input())
for i in range(t):
	n = int(input())
	a = n * 50
	b = a * 20 / 100
	c = a * 30 / 100
	s = b + b + c
	print(int(a - s))


a = int(input())
for i in range(a):
	b = int(input())
	print(b * 15)


t = int(input())
for i in range(t):
	n = int(input())
	print(int(n * 50 * 0.3))


for i in range(int(input())):
	a = int(input())
	a *= 50
	a *= 0.3
	print(round(a))


T = int(input())
for t in range(T):
	N = int(input())
	a = N * 50
	b = a * 0.2
	c = a * 0.2
	d = a * 0.3
	print(int(a - (b + c + d)))


t = int(input())
for i in range(t):
	x = int(input())
	print(15 * x)


t = int(input())
for _ in range(t):
	n = int(input())
	total_income = n * 50
	sugarcane_cost = total_income * 0.2
	salt_and_mint_cost = total_income * 0.2
	rent_cost = total_income * 0.3
	profit = total_income - sugarcane_cost - salt_and_mint_cost - rent_cost
	print(int(profit))


T = int(input())
for i in range(T):
	N = int(input())
	print(int(N * 50 - int(N * 50) / 100 * 70))


for _ in range(int(input())):
	n = int(input())
	print(int(50 * n * 0.3))


for i in range(int(input())):
	n = int(input())
	a = 50 * n
	sugar = 0.2 * a
	mint = 0.2 * a
	rent = 0.3 * a
	print(int(a - (sugar + mint + rent)))


n = int(input())
for _ in range(n):
	a = int(input())
	tot = a * 50
	sur = 0.2 * tot
	mint = 0.2 * tot
	rent = 0.3 * tot
	print(int(tot - (sur + mint + rent)))


t = int(input())
for i in range(t):
	N = int(input())
	a = N * 15
	print(a)


for i in range(int(input())):
	x = int(input())
	a = 50 - 35
	print(x * a)


for i in range(int(input())):
	n = int(input())
	p = n * 50
	print(int(p - 70 / 100 * p))


t = int(input())
while t > 0:
	n = int(input())
	totalIncome = n * 50
	profit = totalIncome - 0.7 * totalIncome
	print(int(profit))
	t -= 1


t = int(input())
for i in range(t):
	n = int(input())
	a = n * 50
	b = n * 10
	c = n * 15
	print(a - (b + b + c))


t = int(input())
for i in range(t):
	n = int(input())
	print(int(3 / 10 * 50 * n))


t = int(input())
for tc in range(t):
	n = int(input())
	cost = n * 50
	x = cost * 0.2
	y = cost * 0.2
	z = cost * 0.3
	print(int(cost - x - y - z))


T = int(input())
for i in range(T):
	n = int(input())
	t = n * 50
	s = 20 / 100 * t
	m = 20 / 100 * t
	r = 30 / 100 * t
	p = t - (s + m + r)
	print(int(p))


for i in range(int(input())):
	N = int(input())
	print(N * 15)


for l in range(int(input())):
	n = int(input())
	print(15 * n)


for i in range(int(input())):
	n = int(input())
	x = 50 * n
	print(x - int(x * 0.2 + x * 0.2 + x * 0.3))


T = int(input())
for i in range(T):
	a = int(input())
	p = a * 50
	x = p * 0.2 + p * 0.2 + p * 0.3
	y = p - x
	print(int(y))


t = int(input())
for i in range(0, t):
	n = int(input())
	print(n * 50 - n * 50 * 70 // 100)


t = int(input())
for i in range(t):
	n = int(input())
	t = 50 * n
	s = 0.2 * t
	sa = 0.2 * t
	r = 0.3 * t
	sum1 = t - s - sa - r
	print(int(sum1))


n = int(input())
for i in range(n):
	a = int(input())
	print(int(a * 50 * 0.3))


for i in range(int(input())):
	n = int(input())
	first = 0.2 * (n * 50)
	second = 0.3 * (n * 50)
	prof = n * 50 - int(2 * first + second)
	print(prof)


t = int(input())
for tc in range(t):
	n = int(input())
	print(n * 15)


for k in range(int(input())):
	n = int(input())
	a = 50 * n
	b = 10 * n
	c = 10 * n
	d = 15 * n
	print(int(a - (b + c + d)))


t = int(input())
for i in range(t):
	x = int(input())
	a = x * 50
	b = a * (1 / 5)
	c = a * (1 / 5)
	d = a * (3 / 10)
	print(int(a - (b + c + d)))


for i in range(int(input())):
	n = int(input())
	a = n * 50
	x = 20 * a // 100
	y = 20 * a // 100
	z = 30 * a // 100
	print(a - (x + y + z))


t = int(input())
for _ in range(t):
	n = int(input())
	income = n * 50
	ans = income - 0.7 * income
	print(int(ans))


n = int(input())
for i in range(n):
	n = int(input())
	k = n * 50 * 70 // 100
	print(n * 50 - k)


T = int(input())
for i in range(T):
	n = int(input())
	print(50 * n - 2 * n * 5 - 2 * n * 5 - 3 * n * 5)


t = int(input())
for _ in range(t):
	n = int(input())
	c = n * 50
	s = c - (20 * c // 100 + 20 * c // 100 + 30 * c // 100)
	print(s)


t = int(input())
for _ in range(t):
	x = int(input())
	total = 50 * x
	total = int(total - 0.2 * total * 2 - 0.3 * total)
	print(total)


for _ in range(int(input())):
	n = int(input()) * 50
	print(n - n * 40 // 100 - n * 30 // 100)