Chef rented a car for a day. 

Usually, the cost of the car is Rs 10 per km. However, since Chef has booked the car for the whole day, he needs to pay for at least 300 kms even if the car runs less than 300 kms.

If the car ran X kms, determine the cost Chef needs to pay.

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

- The first line of input will contain a single integer T, denoting the number of test cases.
- Each test case consists of a single integer X - denoting the number of kms Chef travelled.

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

For each test case, output the cost Chef needs to pay.

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

$1 ≤ T ≤ 100$
$1 ≤ X ≤ 1000$

----- Sample Input 1 ------ 
5
800
3
299
301
300

----- Sample Output 1 ------ 
8000
3000
3000
3010
3000

----- explanation 1 ------ 
Test case $1$: The car runs for $800$ kms. Thus, he needs to pay $800\cdot 10 = 8000$ rupees.

Test case $2$: The car runs for $3$ kms. However, since Chef booked the car for whole day, he needs to pay for at least $300$ kms. Thus, he needs to pay $300\cdot 10 = 3000$ rupees.

Test case $3$: The car runs for $299$ kms. However, since Chef booked the car for whole day, he needs to pay for at least $300$ kms. Thus, he needs to pay $300\cdot 10 = 3000$ rupees.

Test case $4$: The car runs for $301$ kms. Thus, he needs to pay $301\cdot 10 = 3010$ rupees.

Test case $5$: The car runs for $300$ kms. Thus, he needs to pay $300\cdot 10 = 3000$ rupees.

Difficulty: EASY
Tags: Mathematics

Starter code:

Solutions:
for i in range(int(input())):
	x = int(input())
	if x <= 300:
		print('3000')
	else:
		print(x * 10)


t = int(input())
for i in range(t):
	X = int(input())
	cost = X * 10
	if cost > 3000:
		print(cost)
	else:
		print('3000')


t = int(input())
for i in range(t):
	x = int(input())
	print(max(x * 10, 3000))


n = int(input())
for _ in range(n):
	x = int(input())
	if x > 300:
		print(x * 10)
	else:
		print('3000')


for i in range(int(input())):
	X = int(input())
	if X <= 300:
		print(300 * 10)
	else:
		print(X * 10)


n = int(input())
for i in range(n):
	p = int(input())
	print('3000') if p <= 300 else print(p * 10)


test = int(input())
for i in range(test):
	n = int(input())
	if n > 300:
		print(n * 10)
	else:
		print(300 * 10)


for _ in range(int(input())):
	km = int(input())
	if km <= 300:
		print(300 * 10)
	else:
		print(km * 10)


t = int(input())
for i in range(t):
	a = int(input())
	if a <= 300:
		print(3000)
	else:
		print(a * 10)


t = int(input())
for j in range(t):
	x = int(input())
	if x <= 300:
		print(3000)
	else:
		print(x * 10)


t = int(input())
for i in range(t):
	x = int(input())
	if x >= 300:
		cost = x * 10
	else:
		cost = 300 * 10
	print(cost)


for _ in range(int(input())):
	a = int(input())
	if a > 300:
		print(a * 10)
	else:
		print(3000)


for T in range(int(input())):
	X = int(input())
	if X <= 300:
		print(3000)
	else:
		print(X * 10)


for i in range(int(input())):
	m = int(input())
	if m < 300:
		print(300 * 10)
	else:
		print(m * 10)


T = int(input())
for i in range(T):
	n = int(input())
	if n <= 300:
		n = 300
		x = n * 10
		print(x)
	else:
		x = n * 10
		print(x)


t = int(input())
for i in range(t):
	r = int(input())
	if r < 300:
		r = 300
	print(r * 10)


n = int(input())
for i in range(0, n):
	d = int(input())
	if d > 300:
		print(d * 10)
	else:
		print(300 * 10)


T = int(input())
for _ in range(T):
	x = int(input())
	if x < 300:
		print(300 * 10)
	else:
		print(x * 10)


t = int(input())
while t:
	x = int(input())
	print(3000 if 3000 > x * 10 else x * 10)
	t -= 1


n = int(input())
while n > 0:
	a = int(input())
	if a <= 300:
		print(3000)
	else:
		print(a * 10)
	n -= 1


T = int(input())
for i in range(T):
	N = int(input())
	if N <= 300:
		print(3000)
	else:
		print(N * 10)


t = int(input())
for i in range(t):
	val = int(input())
	if val > 300:
		ans = val * 10
	else:
		ans = 3000
	print(ans)


T = int(input())
for i in range(0, T):
	X = int(input())
	if X > 300:
		print(X * 10)
	elif X <= 300:
		print(300 * 10)


t = int(input())
for i in range(0, t):
	x = int(input())
	if x < 300:
		print(3000)
	elif x >= 300:
		print(x * 10)