It's the sale season again and Chef bought items worth a total of X rupees. The sale season offer is as follows: 
if X ≤ 100, no discount.
if 100 < X ≤ 1000, discount is 25 rupees.
if 1000 < X ≤ 5000, discount is 100 rupees.
if X > 5000, discount is 500 rupees.

Find the final amount Chef needs to pay for his shopping.

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

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

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

For each test case, output on a new line the final amount Chef needs to pay for his shopping.

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

$1 ≤ T ≤ 100$
$1 ≤ X ≤ 10000$

----- Sample Input 1 ------ 
4
15
70
250
1000

----- Sample Output 1 ------ 
15
70
225
975

----- explanation 1 ------ 
Test case $1$: Since $X ≤ 100 $, there is no discount.

Test case $3$: Here, $X = 250$. Since $100 < 250 ≤ 1000$, discount is of $25$ rupees. Therefore, Chef needs to pay $250-25 = 225$ rupees.

Difficulty: EASY

Starter code:

Solutions:
for i in range(int(input())):
	x = int(input())
	if x <= 100:
		print(x)
	elif x > 100 and x <= 1000:
		print(x - 25)
	elif x > 100 and x <= 5000:
		print(x - 100)
	else:
		print(x - 500)


t = int(input())
for i in range(0, t):
	a = int(input())
	if a <= 100:
		print(a)
	elif 100 < a <= 1000:
		print(a - 25)
	elif 1000 < a <= 5000:
		print(a - 100)
	else:
		print(a - 500)


t = int(input())
for i in range(t):
	x = int(input())
	if x <= 100:
		print(x)
	if x > 100 and x <= 1000:
		print(x - 25)
	if x > 1000 and x <= 5000:
		print(x - 100)
	if x > 5000:
		print(x - 500)


for _ in range(int(input())):
	x = int(input())
	if x <= 100:
		print(x)
	elif x <= 1000 and x > 100:
		print(x - 25)
	elif x <= 5000 and x > 1000:
		print(x - 100)
	elif x > 5000:
		print(x - 500)


t = int(input())
for i in range(t):
	X = int(input())
	if X <= 100:
		print(X)
	elif 100 < X and X <= 1000:
		print(X - 25)
	elif 1000 < X and X <= 5000:
		print(X - 100)
	else:
		print(X - 500)


a = int(input())
for i in range(a):
	b = int(input())
	if b <= 100:
		print(b)
	elif 100 < b <= 1000:
		print(b - 25)
	elif 1000 < b <= 5000:
		print(b - 100)
	else:
		print(b - 500)


tc = int(input())
for i in range(tc):
	x = int(input())
	if x < 101:
		print(x)
	elif 100 < x < 1001:
		print(x - 25)
	elif 1001 < x < 5001:
		print(x - 100)
	else:
		print(x - 500)


t = int(input())
while t:
	x = int(input())
	if x <= 100:
		print(x)
	elif x > 100 and x <= 1000:
		print(x - 25)
	elif x > 1000 and x <= 5000:
		print(x - 100)
	elif x > 5000:
		print(x - 500)
	t -= 1


n = int(input())
for i in range(n):
	a = int(input())
	if a <= 100:
		print(a)
	if 100 < a <= 1000:
		print(a - 25)
	if 1000 < a <= 5000:
		print(a - 100)
	if a > 5000:
		print(a - 500)


for _ in range(int(input())):
	a = int(input())
	if a <= 100:
		print(a)
	elif 100 < a <= 1000:
		print(a - 25)
	elif 1000 < a < 5000:
		print(a - 100)
	elif a > 5000:
		print(a - 500)


for i in range(int(input())):
	X = int(input())
	if X <= 100:
		print(X)
	elif 100 < X <= 1000:
		print(X - 25)
	elif 1000 < X <= 5000:
		print(X - 100)
	elif X > 5000:
		print(X - 500)


T = int(input())
for i in range(T):
	M = int(input())
	if M <= 100:
		print(M)
	elif 100 < M <= 1000:
		print(M - 25)
	elif 1000 < M <= 5000:
		print(M - 100)
	else:
		print(M - 500)


t = int(input())
for i in range(t):
	n = int(input())
	if n <= 100:
		print(n)
	elif n > 100 and n <= 1000:
		print(n - 25)
	elif n > 1000 and n < 5000:
		print(n - 100)
	elif n > 5000:
		print(n - 500)


t = int(input(''))
counter = 0
if 1 <= t <= 100:
	while counter < t:
		x = int(input(''))
		if 1 <= x <= 10000:
			if x <= 100:
				print(x)
			elif 100 < x <= 1000:
				print(x - 25)
			elif 1000 < x <= 5000:
				print(x - 100)
			elif x > 5000:
				print(x - 500)
		counter += 1


t = int(input())
while t != 0:
	x = int(input())
	if x <= 100:
		print(x)
	elif x in range(100, 1001):
		print(x - 25)
	elif x in range(1000, 5000):
		print(x - 100)
	else:
		print(x - 500)
	t = t - 1


t = int(input())
for i in range(t):
	x = int(input())
	if x <= 100:
		discount = 0
	elif x <= 1000:
		discount = 25
	elif x <= 5000:
		discount = 100
	else:
		discount = 500
	final_amount = x - discount
	print(final_amount)


n = int(input())
for i in range(n):
	a = int(input())
	if a <= 100:
		print(a)
	elif a > 100 and a <= 1000:
		print(a - 25)
	elif a > 1000 and a <= 5000:
		print(a - 100)
	else:
		print(a - 500)


for i in range(0, int(input())):
	n = int(input())
	if n <= 100:
		print(n)
	elif n <= 1000:
		print(n - 25)
	elif n <= 5000:
		print(n - 100)
	else:
		print(n - 500)


def calculate_final_amount(x):
	if x <= 100:
		return x
	elif x <= 1000:
		return x - 25
	elif x <= 5000:
		return x - 100
	else:
		return x - 500
t = int(input())
for i in range(t):
	x = int(input())
	final_amount = calculate_final_amount(x)
	print(final_amount)


t = int(input())
for _ in range(t):
	a = int(input())
	if a <= 100:
		print(a)
	elif a > 100 and a <= 1000:
		print(a - 25)
	elif a > 1000 and a <= 5000:
		print(a - 100)
	elif a > 5000:
		print(a - 500)
	else:
		pass


T = int(input())
for t in range(T):
	X = int(input())
	if X <= 100:
		print(X)
	elif 100 < X <= 1000:
		print(X - 25)
	elif 1000 < X <= 5000:
		print(X - 100)
	elif X > 5000:
		print(X - 500)


t = int(input())
while t > 0:
	x = int(input())
	if x <= 100:
		print(x)
	elif 100 < x <= 1000:
		print(x - 25)
	elif 1000 < x <= 5000:
		print(x - 100)
	else:
		print(x - 500)
	t -= 1


for i in range(int(input())):
	a = int(input())
	if a > 100 and a <= 1000:
		a -= 25
	elif a > 1000 and a <= 5000:
		a -= 100
	elif a > 5000 and a <= 10000:
		a -= 500
	print(a)


d = int(input())
for l in range(d):
	x = int(input())
	if x < 100:
		print(x)
	elif x > 100 and x <= 1000:
		print(x - 25)
	elif x > 1000 and x < 5000:
		print(x - 100)
	else:
		print(x - 500)


T = int(input())
for num in range(0, T):
	x = int(input())
	if x <= 100:
		print(x)
	elif x > 100 and x <= 1000:
		print(x - 25)
	elif x > 1000 and x <= 5000:
		print(x - 100)
	else:
		print(x - 500)


T = int(input())
for _ in range(T):
	x = int(input())
	if x <= 100:
		print(x)
	elif x <= 1000:
		print(x - 25)
	elif x <= 5000:
		print(x - 100)
	else:
		print(x - 500)


t = int(input())
for tc in range(t):
	x = int(input())
	if x <= 100:
		print(x)
	elif 100 < x <= 1000:
		print(x - 25)
	elif 1000 < x <= 5000:
		print(x - 100)
	else:
		print(x - 500)


t = int(input())
for i in range(t):
	x = int(input())
	if x in range(100, 1001):
		print(x - 25)
	elif x in range(1000, 5001):
		print(x - 100)
	elif x > 5000:
		print(x - 500)
	else:
		print(x)