There are only 2 type of denominations in Chefland:

Coins worth 1 rupee each
Notes worth 10 rupees each

Chef wants to pay his friend exactly X rupees. 
What is the minimum number of coins Chef needs to pay exactly X rupees?

------ 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 line of input containing a single integer X.

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

For each test case, output on a new line the minimum number of coins Chef needs to pay exactly X rupees.

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

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

----- Sample Input 1 ------ 
4
53
100
9
11

----- Sample Output 1 ------ 
3
0
9
1

----- explanation 1 ------ 
Test case $1$: Chef can use $5$ notes and $3$ coins in the optimal case.

Test case $2$: Chef can use $10$ notes and $0$ coins in the optimal case.

Test case $3$: Chef can only use $9$ coins.

Test case $4$: Chef can use $1$ note and $1$ coin in the optimal case.

Source: codechef | Difficulty: EASY
Tags: Mathematics


Solutions:
t = int(input())
for i in range(t):
	x = int(input())
	print(x % 10)


T = int(input())
for i in range(T):
	X = int(input())
	if X >= 10:
		print(X % 10)
	else:
		print(X * 1)


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


n = int(input())
for _ in range(n):
	x = int(input())
	c1 = int(x % 10)
	print(c1)


n = int(input())
for i in range(n):
	k = int(input())
	print(k % 10)


t = int(input())
for i in range(t):
	x = input()
	print(x[len(x) - 1:])


for i in range(int(input())):
	print(int(input()) % 10)


for i in range(int(input())):
	p = int(input())
	z = p % 10
	print(z)


t = int(input())
for i in range(t):
	a = int(input())
	print(a % 10)


a = int(input())
for i in range(a):
	x = int(input())
	x = str(x)
	for i in x[::-1]:
		print(i)
		break


a = int(input())
for i in range(a):
	b = int(input())
	print(b % 10)


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


T = int(input())
for i in range(T):
	x = int(input())
	print(x % 10)


n = int(input())
for i in range(n):
	x = int(input())
	print(x % 10)


t = int(input())
for _ in range(t):
	n = int(input())
	print(n % 10)


T = int(input())
for i in range(T):
	X = int(input())
	print(X % 10)


for _ in range(int(input())):
	a = int(input())
	print(a % 10)


for i in range(int(input())):
	x = int(input())
	note = 10
	coin = 1
	print(x % note)


n = int(input())
for i in range(n):
	m = int(input()) % 10
	print(m)


def minCoins(X):
	notes = X // 10
	coins = X % 10
	return coins
T = int(input())
for i in range(T):
	X = int(input())
	print(minCoins(X))


t = int(input())
for i in range(t):
	X = int(input())
	print(X % 10)


for _ in range(int(input())):
	x = int(input())
	print(x % 10)


n = int(input())
for i in range(0, n):
	a = int(input())
	print(a % 10)


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


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


T = int(input())
for i in range(T):
	A = int(input())
	if A % 10 == 0:
		print(0)
	else:
		print(A % 10)


T = int(input())
for i in range(0, T):
	X = int(input())
	c = X % 10
	print(c)


i = int(input(''))
j = 0
while j < i:
	x = int(input(''))
	op = x % 10
	j += 1
	print(op)


a = int(input())
while a != 0:
	m = int(input())
	if m >= 10:
		print(m % 10)
	else:
		print(m)
	a -= 1


t = int(input())
while t > 0:
	x = int(input())
	print(x % 10)
	t = t - 1


n = int(input())
for i in range(n):
	r = int(input())
	print(r % 10)


tc = int(input())
for i in range(tc):
	x = int(input())
	print(x % 10)


for i in range(int(input())):
	X = int(input())
	if X >= 10:
		print(X % 10)
	else:
		print(X)


for i in range(int(input())):
	x = int(input())
	if x % 10 == 0:
		print(0)
	else:
		print(x % 10)


number = int(input())
for i in range(number):
	n = int(input())
	print(n % 10)


t = int(input())
while t > 0:
	notes = 10
	coins = 1
	x = int(input())
	print(x % 10)
	t = t - 1


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


t = int(input())
for i in range(t):
	X = int(input())
	if X < 10:
		print(X)
	elif X >= 10:
		print(X % 10)


T = int(input())
for i in range(T):
	n = int(input())
	if n >= 10:
		n1 = n % 10
		print(n1)
	else:
		print(n)


T = int(input())
for i in range(T):
	X = int(input())
	coin = 1
	note = 10
	print(X % note)


a = int(input())
for i in range(a):
	b = int(input())
	c = b % 10
	if c < 10 and c != 0:
		print(c)
	else:
		print('0')


for i in range(int(input())):
	x = int(input())
	if x >= 10:
		s = int(x % 10)
		print(s)
	else:
		print(x)


n = int(input())
for i in range(n):
	num = int(input())
	print(num % 10)