Mishka wants to buy some food in the nearby shop. Initially, he has $s$ burles on his card. 

Mishka can perform the following operation any number of times (possibly, zero): choose some positive integer number $1 \le x \le s$, buy food that costs exactly $x$ burles and obtain $\lfloor\frac{x}{10}\rfloor$ burles as a cashback (in other words, Mishka spends $x$ burles and obtains $\lfloor\frac{x}{10}\rfloor$ back). The operation $\lfloor\frac{a}{b}\rfloor$ means $a$ divided by $b$ rounded down.

It is guaranteed that you can always buy some food that costs $x$ for any possible value of $x$.

Your task is to say the maximum number of burles Mishka can spend if he buys food optimally.

For example, if Mishka has $s=19$ burles then the maximum number of burles he can spend is $21$. Firstly, he can spend $x=10$ burles, obtain $1$ burle as a cashback. Now he has $s=10$ burles, so can spend $x=10$ burles, obtain $1$ burle as a cashback and spend it too.

You have to answer $t$ independent test cases.


-----Input-----

The first line of the input contains one integer $t$ ($1 \le t \le 10^4$) — the number of test cases.

The next $t$ lines describe test cases. Each test case is given on a separate line and consists of one integer $s$ ($1 \le s \le 10^9$) — the number of burles Mishka initially has.


-----Output-----

For each test case print the answer on it — the maximum number of burles Mishka can spend if he buys food optimally.


-----Example-----
Input
6
1
10
19
9876
12345
1000000000

Output
1
11
21
10973
13716
1111111111

Difficulty: EASY
Tags: Mathematics

Starter code:

Solutions:
t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	s = 0
	while n > 9:
		q = n // 10
		s = s + q * 10
		n = n % 10 + q
	s = s + n
	print(s)


t = int(input())
for i in range(t):
	s = int(input())
	s_total = s
	while s > 0:
		if s < 10:
			s = 0
		else:
			s_temp = s // 10
			s_total += s_temp
			s -= s_temp * 10 - s_temp
	print(s_total)


for _ in range(int(input())):
	n = int(input())
	if n < 10:
		print(n)
	else:
		c = 0
		while n // 10 > 0:
			k = n // 10
			c += 10 * k
			n = n - k * 10 + k
			if n < 10:
				c += n % 10
		print(c)


for i in range(int(input())):
	n = int(input())
	count = 0
	while n > 9:
		c = n % 10
		n = n - c
		count = count + n
		n = n // 10 + c
	print(count + n)


t = int(input())
for _ in range(t):
	s = int(input())
	d = 0
	while s >= 10:
		v = s - s % 10
		s -= v
		d += v
		s += v // 10
	print(d + s)


def solve():
	n = int(input())
	m = n
	res = 0
	while n >= 10:
		(u, v) = divmod(n, 10)
		n = u + v
		res += u
	print(m + res)
	return

def main():
	t = int(input())
	for i in range(t):
		solve()
	return
main()


t = int(input())
while t > 0:
	t = t - 1
	ans = 0
	n = int(input())
	while n >= 10:
		x = n // 10
		n = n % 10 + x
		ans = ans + x * 10
	print(ans + n)


import math
for _ in range(int(input())):
	s = int(input())
	(ans, b) = (0, 0)
	reminders = s
	while s >= 10:
		reminders = s % 10
		s -= reminders
		ans += s
		s = math.floor(s / 10) + reminders
	print(ans + s)


for t in range(int(input())):
	print(int(int(input()) // 0.9))


from sys import stdin
from collections import deque
from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin

def ii():
	return int(stdin.readline())

def fi():
	return float(stdin.readline())

def mi():
	return map(int, stdin.readline().split())

def fmi():
	return map(float, stdin.readline().split())

def li():
	return list(mi())

def lsi():
	x = list(stdin.readline())
	x.pop()
	return x

def si():
	return stdin.readline()

def sieve(x):
	a = [True] * (x + 1)
	sq = floor(sqrt(x))
	for i in range(3, sq + 1, 2):
		if a[i]:
			for j in range(i * i, x + 1, i):
				a[j] = False
	if x > 1:
		p = [2]
	else:
		p = []
	for i in range(3, x + 1, 2):
		if a[i]:
			p.append(i)
	return p
res = ['YES', 'NO']
for _ in range(ii()):
	n = ii()
	x = n
	while n > 9:
		d = n // 10
		x += d
		n %= 10
		n += d
	print(x)


t = int(input())
while t:
	n = int(input())
	print(int(n // 0.9))
	t = t - 1


t = int(input())
while t > 0:
	n = int(input())
	res = 0
	buf = 0
	while n > 9:
		buf += n % 10
		res += n - n % 10
		n //= 10
		n += buf
		buf = 0
	print(res + n)
	t -= 1


t = int(input())
for i in range(t):
	s = int(input())
	n = s
	c = 0
	while n >= 10:
		p = n // 10
		c += n // 10
		n = p + n % 10
	print(s + c)


t = int(input())
for i in range(t):
	s = int(input())
	if s < 10:
		print(s)
	else:
		spend = 0
		while s // 10 > 0:
			cashback = s // 10
			current = cashback * 10
			spend += current
			s = s - current
			s += cashback
		spend += s
		print(spend)


t = int(input())
for _ in range(t):
	s = int(input())
	res = 0
	while s != 0:
		k = str(s)
		n = len(k) - 1
		sth = s // 10 ** n * 10 ** n
		res += sth
		s = s - sth + sth // 10
	print(res)


def fun(n):
	if n < 10:
		return n
	else:
		k = []
		s = 0
		while n != 0:
			k.append(n % 10)
			s += n
			n = n // 10
		s += fun(sum(k)) - sum(k)
		return s
for i in range(int(input())):
	n = int(input())
	print(fun(n))


def f(s):
	if s < 10:
		return s
	else:
		return 10 * (s // 10) + f(s - 9 * (s // 10))
T = int(input())
for _ in range(T):
	n = int(input())
	print(f(n))


t = int(input())
for i in range(t):
	s = int(input())
	_sum = 0
	while s >= 10:
		rem = s % 10
		_sum += s - rem
		s = s // 10 + rem
	_sum += s
	print(_sum)


t = int(input())
for i in range(t):
	n = int(input())
	f = n
	p = str(n)
	p1 = len(p)
	c = 0
	while n // 10 > 0:
		po1 = n // 10
		po = n % 10
		c += po1
		n = po1 + po
	print(f + c)


for _ in range(int(input())):
	n = int(input())
	g = str(n)
	sod = 0
	for i in g:
		sod += int(i)
	su = n
	b = n
	j = 1
	l = 0
	while b // 10 > 0:
		su += b // 10
		l = b % 10
		b = b // 10
		b += l
	print(su)


import sys

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def input():
	return sys.stdin.readline().strip()
t = int(input())
for ttt in range(t):
	n = int(input())
	ans = int(n / 0.9)
	if ans % 10 == 0:
		ans -= 1
	print(ans)


t = int(input())
ans = []
for i in range(t):
	n = int(input())
	sm = n
	while int(n / 10) != 0:
		tmp = int(n / 10)
		sm = sm + tmp
		n = tmp + int(n % 10)
	ans.append(int(sm))
for i in range(t):
	print(ans[i])


import math
t = int(input())
for test in range(t):
	s = int(input())
	ans = 0
	cb = 0
	while s >= 10:
		g = s // 10 * 10
		ans += g
		s = s - g + g // 10
	print(ans + s)


t = int(input(''))
for i in range(0, t):
	s = int(input(''))
	sum = 0
	while s >= 10:
		sum += s // 10 * 10
		s = s % 10 + s // 10
	print(sum + s)


t = int(input())
for i in range(t):
	s = int(input())
	m = s
	a = m // 9
	m += a
	if s % 9 == 0:
		print(m - 1)
	else:
		print(m)


n = int(input())
for i in range(n):
	q = int(input())
	ans = 0
	while q >= 10:
		ans += q // 10 * 10
		q = q // 10 + q % 10
	print(ans + q)


import sys
import math
firstLine = True
for line in sys.stdin:
	if firstLine:
		numTests = int(line)
		firstLine = False
		continue
	n = int(line.strip())
	totalSpent = 0
	while n > 0:
		if n < 10:
			totalSpent += n
			n = 0
			break
		spent = n // 10 * 10
		totalSpent += spent
		n -= spent
		change = int(spent / 10)
		if change >= 1:
			n += change
	print(totalSpent)


t = int(input())
for _ in range(t):
	n = int(input())
	total = 0
	while n // 10 != 0:
		total += n - n % 10
		left = n % 10
		cashback = n // 10
		n = cashback + left
	total += n
	print(total)


for i in range(int(input())):
	b = int(input())
	c = b // 10
	rem = b - c * 10
	d = c + rem
	while d >= 10:
		x = d // 10
		y = d - x * 10
		d = d // 10
		d = d + y
		c = c + d - y
	print(b + c)


for _ in range(int(input())):
	n = int(input())
	k = len(str(n))
	ans = 0
	while n > 0:
		d = n // 10 ** (k - 1)
		ans += d * 10 ** (k - 1)
		n = n % 10 ** (k - 1) + d * 10 ** (k - 1) // 10
		k = len(str(n))
	print(ans)


class Solution:

	def __init__(self):
		self.s = int(input())

	def solveAndPrint(self):
		maxBurlesSpend = 0
		while self.s >= 10:
			spend = 10 * (self.s // 10)
			maxBurlesSpend += spend
			self.s = self.s - spend + spend // 10
		maxBurlesSpend += self.s
		print(maxBurlesSpend)
for _ in range(int(input())):
	Solution().solveAndPrint()


import math

def main():
	n = int(input())
	for i in range(n):
		money = int(input())
		total = money
		while money // 10 > 0:
			cashback = money // 10
			money = money % 10 + cashback
			total += cashback
		print(total)
main()


import sys
import math

def scan(input_type='int'):
	if input_type == 'int':
		return list(map(int, sys.stdin.readline().strip().split()))
	else:
		return list(map(str, sys.stdin.readline().strip()))

def solution():
	for _ in range(int(input())):
		s = int(input())
		a = 0
		b = 0
		while s >= 10:
			b = s // 10
			a += b * 10
			s %= 10
			s += b
		a += s
		print(a)
solution()


t = int(input())
while t:
	t -= 1
	n = int(input())
	n1 = n
	s = 0
	if n // 10 == 0:
		print(n)
		continue
	while n // 10 != 0:
		q = n // 10
		s += q
		n = n - q * 10 + q
	print(s + n1)


n = int(input())
for i in range(n):
	k = int(input())
	res = 0
	while True:
		if k < 10:
			res += k
			break
		res += k // 10 * 10
		k = k // 10 + k % 10
	print(res)


t = int(input())
for i in range(t):
	n = int(input())
	res = n // 10 * 10
	ost = n % 10 + n // 10
	while ost > 9:
		res += ost // 10 * 10
		ost = ost % 10 + ost // 10
	print(res + ost)


n = int(input())
u_list = [int(input()) for _ in range(n)]
for el in u_list:
	s_el = el
	while el > 9:
		x = el // 10
		s_el += x
		el = el % 10 + x
	print(s_el)


import math
import functools

def test(money):
	spent = 0
	for i in range(10, -1, -1):
		cost = pow(10, i)
		number = money // cost
		spent += number * cost
		money += math.floor(number * cost / 10)
		money -= number * cost
		number = money // cost
		spent += number * cost
		money += math.floor(number * cost / 10)
		money -= number * cost
	return spent
T = int(input())
for i in range(T):
	money = int(input())
	print(test(money))


t = int(input())
for _ in range(t):
	s = int(input())
	ans = s
	while s >= 10:
		inc = s // 10
		ans += inc
		s -= inc * 10
		s += inc
	print(ans)


for i in range(int(input())):
	n = int(input())
	t = n
	while n >= 10:
		t += n // 10
		n = n // 10 + n % 10
	print(t)


t = int(input())
for _ in range(t):
	s = int(input())
	ans = 0
	while s >= 10:
		use_money = s - s % 10
		ans += use_money
		s -= use_money
		s += use_money // 10
	ans += s
	print(ans)


t = int(input())
for i in range(t):
	n = int(input())
	s = 0
	while n >= 10:
		k = n // 10
		s = s + k * 10
		n = n - k * 10 + k
	print(s + n)


whatever = int(input())
for i in range(whatever):
	n = int(input())
	spent = 0
	while n > 0:
		if n >= 10:
			k = n - n % 10
			spent += k
			n = n - k + k / 10
		else:
			spent += n
			n = 0
	print(int(spent))


a = int(input())
for i in range(a):
	n = int(input())
	ans = 0
	while 1:
		temp = n - n % 10
		ans += temp
		temp1 = n - temp
		n = temp1 + n // 10
		if n < 10:
			ans += n
			break
	print(ans)


for t in range(int(input())):
	n = int(input())
	Sum = 0
	while n != 0:
		nn = n
		p = 1
		while nn > 9:
			nn //= 10
			p *= 10
		Sum += nn * p
		n %= p
		n += p * nn // 10
	print(Sum)


for _ in range(int(input())):
	n = int(input())
	if n < 10:
		print(n)
	else:
		n -= 10
		ans = n // 9 * 10 + n % 9 + 11
		print(ans)


import math
t = int(input())

def buy(b):
	cb = int(math.floor(b / 10))
	rem = b - cb * 10
	if rem + cb < 10:
		return cb
	return cb + buy(rem + cb)
for i in range(t):
	b = int(input())
	if b < 10:
		print(b)
		continue
	print(b + buy(b))


from math import floor
t = int(input())
for _ in range(t):
	n = int(input())
	ans = 0
	kesh = 0
	while n // 10 >= 10 or n >= 10:
		ans += n // 10 * 10
		kesh = n // 10 * 10 // 10
		n = n % 10 + kesh
	else:
		ans += n % 10
	print(ans)


for _ in range(int(input())):
	n = int(input())
	s = str(n)
	p = 0
	while True:
		if len(s) == 1:
			break
		p += int(s[:-1] + '0')
		n = int(s[:-1]) + int(s[-1])
		s = str(n)
	p = p + int(s)
	print(p)


t = int(input())
for i in range(t):
	k = int(input())
	count = 0
	while k > 0:
		if k >= 10:
			count += k - k % 10
			k = k // 10 + k % 10
		else:
			count += k
			k = 0
	print(count)


n = int(input())
p = 0
p = int(p)

def count(n, sum):
	if n < 10:
		print(int(sum + n))
	else:
		r = n % 10
		n = n - r
		sum += n
		n = n / 10
		n += r
		count(n, sum)
for i in range(n):
	s = int(input())
	count(s, 0)


for p in range(int(input())):
	n = int(input())
	if n < 10:
		print(n)
	elif n % 9 != 0:
		print(n + n // 9)
	else:
		print(n - 1 + n // 9)


n = int(input())
for i in range(n):
	m = int(input())
	t = 0
	t += m
	r = m % 10
	q = m // 10
	t += q
	q += r
	while q >= 10:
		r = q % 10
		q = q // 10
		t += q
		q += r
	print(t)


a = int(input())
p = range(a)
import array
b = array.array('I', [])
c = array.array('I', [])
for x in p:
	b.append(int(input()))
	c.append(int(0))
for y in p:
	while b[y] >= 10:
		c[y] = c[y] + b[y] - b[y] % 10
		b[y] = int(b[y] / 10) + b[y] % 10
for y in p:
	c[y] = c[y] + b[y]
for z in p:
	print(c[z])


t = int(input())
for i in range(t):
	n = int(input())
	if n % 9 == 0:
		print(10 * (n // 9) + n % 9 - 1)
	else:
		print(10 * (n // 9) + n % 9)


for i in range(int(input())):
	n = int(input())
	s = 0
	while n != 0:
		s += n // 10 * 10
		n = n // 10 + (n - n // 10 * 10)
		if n < 10:
			s += n
			break
	print(s)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7
Ri = lambda : [int(x) for x in sys.stdin.readline().split()]
ri = lambda : sys.stdin.readline().strip()
for _ in range(int(ri())):
	n = int(ri())
	summ = 0
	while n // 10 > 0:
		summ += n // 10 * 10
		n = n % 10 + n // 10
	summ += n
	print(summ)


x = input()
T = int(x)
while T > 0:
	s = input()
	n = int(s)
	sum = 0
	while len(s) > 1:
		length = len(s)
		d_len = len(s) - 1
		least_sig_digit = 0
		while d_len >= 1:
			mul = 10 ** d_len
			least_sig_digit = int(s[0])
			sum = sum + least_sig_digit * mul
			d_len = d_len - 1
		s = s[1:length]
		n = int(s)
		n = n + least_sig_digit
		s = str(n)
	print(sum + n)
	T = T - 1


import math
line = int(input())
while line > 0:
	j = int(input())
	if j < 10:
		print(j)
	else:
		dop = '1.'
		for i in range(len(str(j))):
			dop += '1'
		dopInt = float(dop)
		res = math.trunc(j * dopInt)
		print(res)
	line -= 1


t = int(input())
for i in range(0, t):
	n = int(input())
	sum = 0
	if n <= 9:
		print(n)
	else:
		while n > 9:
			k = n // 10
			r = k * 10
			sum = sum + r
			p = n - r
			n = k + p
			if n <= 9:
				sum = sum + n
		print(sum)


T = int(input())
for _ in range(0, T):
	n = int(input())
	sum_ = 0
	b = 0
	while n // 10 > 0:
		b = n // 10 * 10
		sum_ += b
		n -= b
		n += b // 10
	sum_ += n
	print(sum_)


for _ in range(int(input())):
	n = int(input())
	ans = 0
	while n > 9:
		ans += n - n % 10
		n = n // 10 + n % 10
	ans += n
	print(ans)


def solve():
	b_init = int(input())
	b_extra = 0
	b = b_init
	while b >= 10:
		b_extra_i = b // 10
		b = b % 10
		b += b_extra_i
		b_extra += b_extra_i
	print(b_init + b_extra)

def main():
	t = int(input())
	for _ in range(t):
		solve()
main()


t = int(input())
for i in range(t):
	x = int(input())
	a = 0
	while x:
		if x >= 10:
			a += x - x % 10
			x = x // 10 + x % 10
		else:
			a += x
			x = 0
	print(a)


t = int(input())
for i in range(t):
	n = int(input())
	result = 0
	m = 0
	while n // 10 > 0:
		if n % 10 != 0:
			ultimo_digito = n % 10
			falta = 10 - ultimo_digito
			m = n
			n = n - falta * 10 + falta
			if n > 0:
				result = result + falta * 10
			else:
				result = result + m + m // 10
		else:
			result = result + n
			n = n // 10
	if n > 0:
		result = result + n
	print(result)


a = int(input())
for i in range(a):
	x = int(input())
	if x < 10:
		print(x)
	elif x == 10:
		print(11)
	else:
		total = 0
		while x >= 10:
			total = total + (x - x % 10)
			x = x // 10 + x % 10
		total = total + x
		print(total)


t = int(input())
for _ in range(t):
	n = int(input())
	c = 0
	while n > 9:
		x = n % 10
		n = n // 10
		c += n * 10
		n += x
	c += n
	print(c)


t = int(input())
for _ in range(t):
	I_will_total_pay = 0
	n = int(input())
	I_get_return = True
	while I_get_return:
		xtra = n % 10
		if n < 10:
			xtra = 0
			I_get_return = False
		I_will_pay = n - xtra
		They_will_return = I_will_pay / 10
		I_will_total_pay = I_will_total_pay + I_will_pay
		n = They_will_return + xtra
	print(int(I_will_total_pay))


for _ in [0] * int(input()):
	n = int(input())
	r = 0
	while n > 9:
		k = n // 10
		n = n % 10 + k
		r += k * 10
	print(r + n)


import itertools
import math
import sys
import heapq
from collections import Counter
from collections import deque
from fractions import gcd
from functools import reduce
INF = 1 << 60
sys.setrecursionlimit(10 ** 6)
t = int(input())
for i in range(t):
	s = int(input())
	ans = 0
	while s >= 10:
		ans += s - s % 10
		s = s % 10 + s // 10
	ans += s
	print(ans)


t = int(input())
for _ in range(t):
	m = int(input())
	exp = 0
	while m >= 10:
		exp += 10 * (m // 10)
		m = m % 10 + m // 10
	print(exp + m)


from collections import defaultdict as dd
from collections import Counter as ccd
from itertools import permutations as pp
from itertools import combinations as cc
from random import randint as rd
from bisect import bisect_left as bl
from bisect import bisect_right as br
import heapq as hq
import math
mod = pow(10, 9) + 7

def inp(flag=0):
	if flag == 0:
		return list(map(int, input().strip().split(' ')))
	else:
		return int(input())
t = inp(1)
while t:
	t -= 1
	n = inp(1)
	ans = 0
	cashback = 0
	power = 1000000000
	while n > 0:
		while n < power:
			power //= 10
		spend = power
		ans += spend
		cashback = spend // 10
		n = n - spend + cashback
	print(ans)


t = int(input())
while t:
	n = int(input())
	s = 0
	while n:
		k = n // 10
		n = n % 10
		s += k * 10
		n = n + k
		if n // 10 == 0:
			s += n
			n = 0
	print(s)
	t -= 1


for ttt in range(int(input())):
	s = int(input())
	add = 0
	while s >= 10:
		r = s % 10
		add += s - r
		s = s // 10 + r
	add += s
	print(add)


q = int(input())
for i in range(q):
	X = int(input())
	S = 0
	R = X % 10
	while X >= 10:
		S += 10 * (X // 10)
		X = X // 10 + R
		R = X % 10
	print(S + R)


t = int(input())
for _ in range(t):
	c = int(input())
	cnt = 0
	while c // 10 != 0:
		d = c // 10
		cnt = cnt + d
		c = c % 10 + d
	print(cnt * 10 + c % 10)


t = int(input())
for I in range(t):
	s = int(input())
	ans = 0
	while s:
		left = s % 10
		spent = s // 10 * 10
		ans += spent
		cashback = spent // 10
		s = cashback + left
		if s < 10:
			ans += s
			s = 0
			break
	print(ans)


c = int(input())
for i in range(c):
	a = int(input())
	q = 0
	while a >= 10:
		q += a // 10
		a = a // 10 + a % 10
	print(q * 10 + a)


t = int(input())
for i in range(t):
	num = int(input())
	n = 0
	while num // 10 != 0:
		o = num // 10
		n += num // 10
		num = num % 10 + o
	print(n * 10 + num % 10)


for _ in range(int(input())):
	s = int(input())
	ans = 0
	while s >= 10:
		r = s // 10
		ans += r * 10
		s = s - r * 10 + r
	ans += s
	print(ans)


from math import factorial
from collections import Counter
from heapq import heapify, heappop, heappush
from sys import stdin

def RL():
	return map(int, stdin.readline().rstrip().split())

def comb(n, m):
	return factorial(n) / (factorial(m) * factorial(n - m)) if n >= m else 0

def perm(n, m):
	return factorial(n) // factorial(n - m) if n >= m else 0

def mdis(x1, y1, x2, y2):
	return abs(x1 - x2) + abs(y1 - y2)
mod = 1000000007
from math import ceil
N = int(input())
for _ in range(N):
	n = int(input())
	res = 0
	while n > 0:
		if n // 10 == 0:
			res += n
			n = 0
		res += n - n % 10
		n = n % 10 + (n - n % 10) // 10
	print(res)


import sys
input = sys.stdin.readline
t = int(input())
for tests in range(t):
	n = int(input())
	ANS = 0
	while n >= 10:
		back = n // 10
		buy = back * 10
		ANS += buy
		n -= buy
		n += back
	print(ANS + n)


t = int(input())
for i in range(t):
	burles = int(input())
	price = burles
	while burles >= 10:
		price += burles // 10
		burles = burles - burles // 10 * 10 + burles // 10
	print(price)


t = int(input())
for i in range(t):
	n = int(input())
	c = 0
	while n != 0:
		if n >= 10:
			c += 10 * (n // 10)
			n = n - 10 * (n // 10) + n // 10
		else:
			c = c + n
			n = 0
	print(c)


def func(n, s):
	if n // 10 == 0:
		s = s + n
		return s
	else:
		a = n // 10
		s = s + a * 10
		r = n % 10
		n = a + r
		return func(n, s)
t = int(input())
for i in range(t):
	n = int(input())
	s = 0
	ans = func(n, s)
	print(ans)


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	ans = 0
	while n >= 10:
		z = int(n / 10) * 10
		ans += z
		n = n - z + int(z / 10)
	print(ans + n)


def solve(s):
	total_spent = 0
	while s > 0:
		cacheback = s // 10
		spent = max(cacheback * 10, 1)
		s = s - spent + cacheback
		total_spent += spent
	return total_spent
n = int(input())
for _ in range(n):
	s = int(input())
	print(solve(s))


for _ in range(int(input())):
	n = int(input())
	t = n
	sm = n
	if n < 10:
		print(n)
	elif n % 9 == 0:
		print(n + int(t / 9) - 1)
	else:
		print(n + int(t / 9))


t = int(input())
import math
for i in range(t):
	n = int(input())
	sum = 0
	while n >= 10:
		v = n // 10 * 10
		l = n % 10
		sum += v
		n = l + math.floor(v / 10)
	print(sum + n)


def line():
	return map(int, input().split())

def num():
	return int(input())
from itertools import repeat
t = num()
for _ in repeat(None, t):
	s = num()
	q = 0
	while s >= 10:
		v = s // 10
		q += 10 * v
		s = s % 10 + v
	print(q + s)


t = int(input())
for _ in range(t):
	n = int(input())
	k = n
	p = 0
	while n >= 10:
		p += n // 10
		n = n // 10 + n % 10
	print(k + p)


t = int(input())
for q in range(t):
	n = int(input())
	answ = 0
	while n > 0:
		x = 10 ** 9
		while x > n:
			x = x // 10
		n = n - x + x // 10
		answ += x
	print(answ)


for i in range(int(input())):
	n = int(input())
	c = 0
	res = 0
	while n >= 10:
		c += n // 10 * 10
		re = n // 10
		n = n - n // 10 * 10 + re
	print(c + n)


t = int(input())
for _ in range(t):
	n = input()
	c = len(n)
	left = 0
	total = 0
	while len(n) > 0:
		if len(n) == 1:
			total += int(n)
			n = ''
		else:
			cb = int(n[:-1])
			total += cb * 10
			last = int(n[-1])
			n = str(cb + last)
	print(total)


ans = []

def solve(x):
	if x < 10:
		return x
	rem = x % 10
	ans = x - rem
	x = rem + x // 10
	return solve(x) + ans
for t in range(int(input())):
	ans.append(str(solve(int(input()))))
print('\n'.join(ans))


a = int(input())
for _ in range(a):
	sum1 = 0
	x = int(input())
	while x > 9:
		a = x % 10
		b = x // 10
		sum1 += b * 10
		x = a + b
	a = x % 10
	sum1 += a
	print(sum1)


T = int(input())
t = 0
while t < T:
	s = int(input())
	sp = 0
	x = 0
	while True:
		x = s // 10 * 10
		sp += x
		s = s - x * 9 / 10
		if x < 10:
			sp += s
			sumx = int(sp)
			break
	print(sumx)
	t = t + 1


for _ in range(int(input())):
	n = int(input())
	ans = 0
	while 1:
		ans += n - n % 10
		n = n - (n - n % 10) + n // 10
		if n < 10:
			ans += n
			break
	print(ans)


t = int(input())
for _ in range(t):
	s = int(input())
	tm = 0
	while s != s % 10:
		tm += s - s % 10
		s = (s - s % 10) // 10 + s % 10
	tm += s
	print(tm)


t = int(input())
for T in range(t):
	s = int(input())
	somma = 0
	while s != 0:
		x = s - s % 10
		if x >= 10:
			s -= 0.9 * x
			somma += x
		else:
			x = s
			somma += x
			s = 0
	print(int(somma))


t = int(input())
for _ in range(t):
	n = int(input())
	print(n + (n - 1) // 9)


from array import *
arrinput = array('I', [])
arroutput = array('I', [])
n = int(input())
for i in range(n):
	x = int(input())
	arrinput.append(x)
arb = 0
while arb < n:
	p = arrinput[arb]
	temp = arrinput[arb]
	while True:
		q = int(p / 10)
		r = p % 10
		temp = temp + q
		p = q + r
		if q == 0:
			arroutput.append(temp)
			break
	arb += 1
c = 0
while c < n:
	print(arroutput[c])
	c += 1


t = int(input())
for i in range(t):
	n = int(input())
	m = n
	c = 0
	while n > 0:
		rem = n % 10
		n = n - rem
		c = c + n
		n = n / 10 + rem
		if n >= 0 and n < 10:
			c = c + n
			break
	print(int(c))


for _ in range(int(input())):
	n = int(input())
	khoroch = 0
	while n // 10 > 0:
		temp = n // 10
		khoroch += temp * 10
		n = temp + n % 10
	khoroch += n
	print(khoroch)


for _ in range(int(input())):
	n = int(input())
	k = n
	while n >= 10:
		g = n // 10
		k += g
		n %= 10
		n += g
	print(k)


N = int(input())

def red(money):
	if money < 10:
		return money
	else:
		return red(money - (money - money % 10) + int(money / 10)) + money - money % 10
for _ in range(N):
	t = int(input())
	print(red(t))


for i in range(int(input())):
	a = int(input())
	r = a % 10
	d = a - r
	k = 1
	while a >= 10:
		a = a // 10 + r
		r = a % 10
		d += a - r
	print(d + a)


n = int(input())
for i in range(n):
	b = int(input())
	sum = b
	while b >= 10:
		s = int(b / 10 * 10)
		r = b % 10
		cash = s // 10
		b = r + cash
		sum += cash
	print(sum)


for j in range(int(input(''))):
	print(int(10 / 9 * (float(input()) - 1)) + 1)


t = int(input())
for i in range(t):
	s = int(input())
	spent = 0
	while s >= 10:
		tens = s // 10 * 10
		s -= tens
		spent += tens
		s += int(tens / 10)
	spent += s
	print(spent)


for _ in range(int(input())):
	n = int(input())
	val = 0
	while 1:
		r = n % 10
		n -= r
		if n == 0:
			break
		val += n
		n = n // 10 + r
	print(val + r)


import math
test_cases = int(input())
for test_case in range(test_cases):
	burles = int(input())
	burles_spent = 0
	while burles:
		optimal_to_spend = burles - burles % 10
		burles_spent += optimal_to_spend
		if not optimal_to_spend or optimal_to_spend % 10 != 0:
			burles_spent += burles
			break
		burles -= optimal_to_spend
		burles += math.floor(optimal_to_spend / 10)
	print(burles_spent)


n = int(input())
l1 = []
for i in range(n):
	l1.append(int(input()))

def ans(n, a):
	if n < 10:
		print(a + n)
	else:
		return ans(n - n // 10 * 9, a + n // 10 * 10)
for i in l1:
	ans(i, 0)
print()


import os
import sys
from io import BytesIO, IOBase

def main():
	t = int(input())
	while t:
		t -= 1
		n = int(input())
		ans = int(0)
		while n >= 10:
			val = n // 10
			ans += val * 10
			n -= val * 10
			n += val
		ans += n
		print(ans)
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())

def f(s):
	ans = 0
	while s >= 10:
		ans += s // 10 * 10
		s = s - s // 10 * 10 + s // 10
	return ans + s
for i in range(t):
	s = int(input())
	print(f(s))


def f(x):
	if n % 9 != 0:
		return int(x + x / 9)
	else:
		return int(x + x / 9) - 1
t = int(input())
for i in range(0, t):
	n = int(input())
	print(f(n))


n = int(input())
for i in range(n):
	total = int(input())
	if total % 9 == 0 and total != 9:
		print(total // 9 * 10 + total % 9 - 1)
		continue
	elif total == 9:
		print(9)
		continue
	print(total // 9 * 10 + total % 9)


test_cases = int(input())
for _ in range(test_cases):
	value = input()
	new_ones = 0
	total = int(value)
	for i in range(len(value)):
		new_ones = int(value) // 10
		total += new_ones
		value = new_ones + int(value) % 10
	print(total)


import sys, os.path
if os.path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
sys.setrecursionlimit(10 ** 5)

def i():
	return sys.stdin.readline().strip()

def ii():
	return int(sys.stdin.readline())

def li():
	return list(sys.stdin.readline().strip())

def mii():
	return map(int, sys.stdin.readline().split())

def lii():
	return list(map(int, sys.stdin.readline().strip().split()))

def amt(a):
	if a < 10:
		return a
	else:
		return a - a % 10 + amt(a // 10 + a % 10)

def solve():
	a = ii()
	if a < 10:
		print(a)
	else:
		print(amt(a))
for _ in range(ii()):
	solve()


import sys
read = lambda : list(map(int, sys.stdin.readline().strip().split()))
for _ in range(int(input())):
	n = int(input())
	count = 0
	while n >= 10:
		(div, mod) = divmod(n, 10)
		count += div * 10
		n = mod + div
	count += n
	print(count)


t = int(input())
while t:
	t -= 1
	s = int(input())
	ans = s
	while s >= 10:
		tmp = s // 10
		ans += tmp
		s = s - tmp * 10 + tmp
	print(ans)


import sys
import os
from io import IOBase, BytesIO
import math
mod = 10 ** 9 + 7
pie = 3.1415926536

def modinv(n, p):
	return pow(n, p - 2, p)

def ncr(n, r, p):
	t = fact[n] * (ifact[r] * ifact[n - r] % p) % p
	return t

def ain():
	return list(map(int, sin().split()))

def sin():
	return input().strip()

def GCD(x, y):
	while y:
		(x, y) = (y, x % y)
	return x

def read2DIntArray(row, col):
	arr = []
	for i in range(0, row):
		temp = list(map(int, sin().split()))
		arr.append(temp)
	return arr

def read2DCharArray(row, col):
	arr = []
	for i in range(0, row):
		temp = str(sin())
		arr.append(temp)
	return arr

def smallestNumber(n):
	lst = list(str(n))
	lst.sort()
	tmp = ''
	for (i, n) in enumerate(lst):
		if n != '0':
			tmp = lst.pop(i)
			break
	return str(tmp) + ''.join(lst)

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 1
	prime[0] = False
	prime[1] = False
	lst = []
	for p in range(n + 1):
		if prime[p]:
			lst.append(p)
	return lst

def nCr(n, r):
	a = 1
	b = 1
	c = 1
	for i in range(1, n + 1):
		c *= i
	for i in range(1, r + 1):
		b *= i
	for i in range(1, n - r + 1):
		a *= i
	return c // (a * b)

def sieveOfEratosthenes1(N, s):
	prime = [False] * (N + 1)
	for i in range(2, N + 1, 2):
		s[i] = 2
	for i in range(3, N + 1, 2):
		if prime[i] == False:
			s[i] = i
			for j in range(i, int(N / i) + 1, 2):
				if prime[i * j] == False:
					prime[i * j] = True
					s[i * j] = i

def generatePrimeFactors(N):
	s = [0] * (N + 1)
	sieveOfEratosthenes1(N, s)
	curr = s[N]
	cnt = 1
	factors = []
	power = []
	while N > 1:
		N //= s[N]
		if curr == s[N]:
			cnt += 1
			continue
		factors.append(curr)
		power.append(cnt)
		curr = s[N]
		cnt = 1
	return (factors, power)

def main():
	for _ in range(int(sin())):
		s = int(sin())
		ans = s
		d = 1
		while d != 0:
			d = s // 10
			ans += d
			s = d + s % 10
		print(ans)
py2 = round(0.5)
if py2:
	from future_builtins import ascii, filter, hex, map, oct, zip
	range = xrange
BUFSIZE = 8192

class FastIO(BytesIO):
	newlines = 0

	def __init__(self, file):
		self._file = file
		self._fd = file.fileno()
		self.writable = 'x' in file.mode or 'w' in file.mode
		self.write = super(FastIO, self).write if self.writable else None

	def _fill(self):
		s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
		self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
		return s

	def read(self):
		while self._fill():
			pass
		return super(FastIO, self).read()

	def readline(self):
		while self.newlines == 0:
			s = self._fill()
			self.newlines = s.count(b'\n') + (not s)
		self.newlines -= 1
		return super(FastIO, self).readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.getvalue())
			(self.truncate(0), self.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		if py2:
			self.write = self.buffer.write
			self.read = self.buffer.read
			self.readline = self.buffer.readline
		else:
			self.write = lambda s: self.buffer.write(s.encode('ascii'))
			self.read = lambda : self.buffer.read().decode('ascii')
			self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))

def input():
	return sys.stdin.readline().rstrip('\r\n')
main()


t = int(input())
for i in range(t):
	s = int(input())
	cashback = int(s / 10)
	cash = s % 10
	addmoney = cashback
	while cashback >= 1:
		cashback = cash + cashback
		cash = cashback % 10
		addmoney += int(cashback / 10)
		cashback //= 10
	if 10 <= s < 100:
		addmoney += int((cash + cashback) / 10)
	print(s + addmoney)


a = int(input())
r = 0
c1 = list()
while r < a:
	b = int(input())
	d = b
	q = b // 10
	rem = b % 10
	d = d + q
	while True:
		if q + rem < 10:
			break
		else:
			c = q + rem
			rem = c % 10
			q = c // 10
			d = d + q
			continue
	c1.append(d)
	r = r + 1
r = 0
while r < a:
	print(c1[r])
	r = r + 1


for cases in range(int(input())):
	k = int(input())
	count = k
	if k < 10:
		print(k)
	else:
		while k != 0:
			value = k // 10
			count += value
			k = value + k % 10
			if k < 10:
				break
			else:
				continue
		print(count)


import math as mt
for _ in range(int(input())):
	n = int(input())
	s = 0
	while n >= 10:
		k = n // 10
		s += k * 10
		n -= k * 10
		n += k
	s += n
	print(s)


for _ in range(int(input())):
	nn = int(input())
	if nn < 10:
		print(int(nn))
		continue
	n = nn
	while True:
		n_core = n - n % 10
		n_left = n % 10
		n_left += n_core / 10
		nn += n_core / 10
		n = n_left
		if n_left < 10:
			print(int(nn))
			break


import math
t = int(input())
while t:
	n = int(input())
	print(int(n // 0.9))
	t = t - 1


test = int(input())
for i in range(test):
	x = int(input())
	count = 0
	while x >= 10:
		count = count + x // 10 * 10
		x = x - x // 10 * 10 + x // 10
	print(count + x)


t = int(input())
for i in range(t):
	s = int(input())
	answer = 0
	while s // 10 > 0:
		answer += s // 10 * 10
		cashback = s // 10
		s -= s // 10 * 10
		s += cashback
	print(answer + s)


for i in range(int(input())):
	n = input()
	b = 0
	z = 0
	while len(n) > 1:
		b = int(n[0]) * 10 ** (len(n) - 1)
		z += b
		n = str(int(n[1:]) + b // 10)
	z += int(n)
	print(z)


for i in range(int(input())):
	x = int(input())
	y = 0
	s = 0
	while x > 9:
		y = x // 10
		s += y
		x = x - 9 * y
	print(s * 10 + x)


from sys import stdin, stdout
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	ans = 0
	while 1:
		mul_of10 = n // 10 * 10
		if mul_of10 == 0:
			mul_of10 = n
		cshbk = mul_of10 // 10
		n = n - mul_of10 + cshbk
		ans += mul_of10
		if n < 10:
			ans += n
			break
	print(ans)


x = eval(input())
for i in range(1, x + 1):
	num = int(input())
	z = 0
	while num >= 10:
		z = z + num // 10 * 10
		y = num // 10
		num = num % 10 + y
	print(z + num % 10)


t = int(input())
for i in range(t):
	s = int(input())
	cashback = 0
	spent = 0
	while s > 0:
		now_spent = s // 10 * 10
		cashback = now_spent // 10
		if now_spent == 0:
			spent += s
			s = 0
		else:
			s = s + cashback - now_spent
			spent += now_spent
	print(spent)


from bisect import bisect_left as bl
from bisect import bisect_right as br
import heapq
import math
from collections import *
from functools import reduce, cmp_to_key
import sys
input = sys.stdin.readline

def factors(n):
	return sorted(set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0))))

def li():
	return [int(i) for i in input().rstrip('\n').split()]

def st():
	return input().rstrip('\n')

def val():
	return int(input().rstrip('\n'))

def li2():
	return [i for i in input().rstrip('\n').split(' ')]

def li3():
	return [int(i) for i in input().rstrip('\n')]
for _ in range(val()):
	s = val()
	tot = 0
	while len(str(s)) > 1:
		tot += s - s % 10
		curr = 0
		for (ind, i) in enumerate(str(s)[::-1][1:]):
			curr += 10 ** ind * int(i)
		s = curr + s % 10
	tot += s
	print(tot)


t = int(input())
for _ in range(t):
	s = int(input())
	spent = 0
	while s >= 10:
		amt = s // 10 * 10
		spent += amt
		s -= amt
		s += amt // 10
	spent += s
	print(spent)


for t in range(int(input())):
	s = int(input())
	result = 0
	d = 10 ** 9
	while s > 0:
		if s // d > 0:
			result += d
			s -= d - d // 10
		else:
			d //= 10
	print(result)


for i in range(int(input())):
	s = int(input())
	c = s // 10
	x = c + s % 10
	s += c
	while x >= 10:
		a = x // 10
		b = a + x % 10
		s += a
		x = b
	print(s)


from math import floor

def food_buying():
	for i in range(int(input())):
		x = int(input())
		counter = 0
		while True:
			if x <= 9:
				break
			y = x // 10
			counter = y * 10 + counter
			x = x % 10 + y
		counter += x
		print(counter)
food_buying()


num = 0
a = int(input())
for i in range(a):
	b = int(input())
	while b >= 10:
		z = b // 10
		num += z * 10
		b = b % 10
		b += z
	if b >= 10:
		print()
	else:
		num += b
	print(num)
	num = 0


t = int(input())
while t > 0:
	t = t - 1
	n = int(input())
	if n % 9 == 0:
		print(n + (n - 1) // 9)
	else:
		print(n + n // 9)


def process(n):
	ans = 0
	while n >= 10:
		tmp = n // 10
		cur_spending = tmp * 10
		ans += cur_spending
		n = n % 10 + tmp
	ans += n
	return ans
T = int(input())
for t in range(T):
	print(process(int(input())))


t = int(input())

def main():
	s = int(input())
	ans = (s - 1) // 9 * 10 + (s - 1) % 9 + 1
	print(ans)
for i in range(t):
	main()


for t in range(int(input())):
	n = int(input())
	spent = 0
	while n > 9:
		spent = spent + n // 10 * 10
		n = n // 10 + n % 10
	print(spent + n)


for i in range(int(input())):
	n = int(input())
	x = n // 9
	if n % 9 == 0:
		print(n + x - 1)
	else:
		print(n + x)


t = int(input())
while t:
	x = int(input())
	total = x
	n = x
	while n >= 10:
		total = total + n // 10
		n = n // 10 + n % 10
	print(total)
	t -= 1


def r(t=int):
	return list(map(t, input().split()))

def ri(t=int):
	return t(input())

def cd(it):
	ret_val = dict()
	for v in it:
		ret_val[v] = ret_val.get(v, 0) + 1
	return ret_val
for _ in range(ri()):
	n = ri()
	ans = 0
	while n >= 10:
		ans += n // 10 * 10
		n = n // 10 + n % 10
	ans += n
	print(ans)


def getFreq(s):
	cnt = [0] * 256
	for x in s:
		cnt[ord(x)] += 1
	return cnt

def main():
	for _ in range(int(input())):
		n = int(input())
		cnt = 0
		while n >= 10:
			cnt += n - n % 10
			n = n % 10 + n // 10
		cnt += n
		print(cnt)
main()


n = int(input())
for dhhdhdhd in range(n):
	num = int(input())
	total = 0
	remainder = 0
	while num >= 10:
		remainder = num % 10
		portion = num // 10
		total += portion * 10
		cashback = num // 10
		if cashback == 0:
			break
		num = cashback + remainder
	total += num
	print(total)


t = int(input())
for _ in range(t):
	aps = 0
	n = int(input())
	while n >= 10:
		x = n // 10
		n %= 10
		aps += x * 10
		n += x
	aps += n
	print(aps)


t = int(input())
for w in range(t):
	n = int(input())
	s = 0
	while 1:
		if n < 10:
			s += n
			break
		r = n % 10
		s += n // 10 * 10
		n = n // 10 + r
	print(s)


t = int(input())
for _ in range(t):
	n = int(input())
	spend = 0
	while n >= 10:
		spend += n // 10 * 10
		n = sum(divmod(n, 10))
	print(spend + n)


t = int(input())
for i in range(t):
	x = int(input())
	temp = x
	sum = temp
	while temp > 0.1:
		sum = sum + temp / 10
		temp = temp / 10
	print(int(sum))


t = int(input())
for _ in range(t):
	s = int(input())
	spend = 0
	while s > 9:
		a = s // 10 * 10
		spend += a
		s = s - a + a // 10
	spend += s
	print(spend)


t = int(input())
for i in range(t):
	n = int(input())
	ans = 0
	pw = 1000 * 1000 * 1000
	while n > 0:
		while n < pw:
			pw //= 10
		ans += pw
		n = n - (pw - pw // 10)
	print(ans)


for i in range(int(input())):
	n = int(input())
	ans = 0
	while n != 0:
		k = n // 10
		ans += k * 10
		n -= k * 10
		n += k
		if k == 0:
			ans += n
			break
	print(ans)


for i in range(int(input())):
	s = int(input())
	c = 0
	while s >= 10:
		x = s // 10 * 10
		s += s // 10
		s -= x
		c += x
	print(c + s)


N = int(input())
for _ in range(N):
	b = int(input())
	out = b
	if b // 10 == 0:
		print(out)
	else:
		spend = 0
		rest = b
		while rest >= 10:
			spend = spend + rest // 10 * 10
			rest = rest - rest // 10 * 10 + rest // 10
		spend = spend + rest
		print(spend)


for _ in range(int(input())):
	n = int(input())
	d = n
	while n > 9:
		d = d + n // 10
		n = n // 10 + n % 10
	print(d)


def calc(n):
	res = 0
	while n // 10 >= 1:
		spend = n - n % 10
		res += spend
		cash_back = spend // 10
		n = cash_back + n % 10
	return res + n
N = int(input())
cases = []
for _ in range(N):
	c = int(input())
	cases.append(c)
for c in cases:
	print(calc(c))


import sys

def getN():
	return int(input())

def getNM():
	return map(int, input().split())

def getList():
	return list(map(int, input().split()))

def getArray(intn):
	return [int(input()) for i in range(intn)]

def input():
	return sys.stdin.readline().rstrip()
for _ in range(getN()):
	n = getN()
	ans = 0
	while n >= 10:
		t = n // 10
		ans += t * 10
		n = n - t * 10 + t
	print(ans + n)


def func(k):
	if k < 10:
		return k
	return k - k % 10 + func(k // 10 + k % 10)
t = int(input())
for z in range(t):
	print(func(int(input())))


t = int(input())
for i in range(t):
	n = int(input())
	cnt = n
	a = 0
	while n >= 10:
		a = n // 10
		n = n % 10 + a
		cnt += a
	print(cnt)


t = int(input())
for tt in range(t):
	n = int(input())
	m = n
	while n // 10:
		m += n // 10
		n = n // 10 + n % 10
	print(m)


from sys import stdin

def inp():
	return (ss.rstrip() for ss in stdin).__next__()

def itg():
	return int(inp())

def mpint():
	return map(int, inp().split())
for case in range(itg()):
	s = itg()
	ans = 0
	while s >= 10:
		(q, s) = divmod(s, 10)
		ans += q * 10
		s += q
	print(ans + s)


t = int(input())
for _ in range(t):
	n = int(input())
	ans = 0
	have = n
	while have >= 10:
		sub = n % 10
		n -= sub
		ans += n
		have -= n
		get = n // 10
		have += get
		n = have
	ans += have
	print(ans)


from sys import stdin, stdout
tt = int(stdin.readline())
while tt:
	n = int(stdin.readline())
	sum = 0
	while n >= 10:
		a = n // 10 * 10
		sum += a
		n = n - a + n // 10
	sum += n
	stdout.write(str(sum) + '\n')
	tt = tt - 1


import sys
import math
import heapq
import collections

def inputnum():
	return int(input())

def inputnums():
	return map(int, input().split())

def inputlist():
	return list(map(int, input().split()))

def inputstring():
	return [x for x in input()]

def inputstringnum():
	return [ord(x) - ord('a') for x in input()]

def inputmatrixchar(rows):
	arr2d = [[j for j in input().strip()] for i in range(rows)]
	return arr2d

def inputmatrixint(rows):
	arr2d = []
	for _ in range(rows):
		arr2d.append([int(i) for i in input().split()])
	return arr2d
t = int(input())
for q in range(t):
	s = inputnum()
	ans = 0
	while s > 0:
		if s >= 10:
			a = s - s % 10
			ans += a
			s += a // 10 - a
		else:
			ans += s
			s = 0
	print(ans)


import math
n = int(input())
for i in range(n):
	k = int(input())
	if k % 9 == 0:
		print(k * 10 // 9 - 1)
	else:
		print(math.floor(k * 10 / 9))


from math import *
t = int(input())
for zz in range(t):
	s = int(input())
	r = max(0, ceil((s - 9) / 9))
	print(r + s)


for _ in range(int(input())):
	s = int(input())
	spent = 0
	while s:
		if s < 10:
			spent += s
			break
		(c, s) = divmod(s, 10)
		spent += c * 10
		s += c
	print(spent)


for __ in range(int(input())):
	n = int(input())
	print(int(n // 0.9))


def solve2(t):
	a = 0
	s = t
	while s >= 10:
		r = s % 10
		q = s // 10
		a += q
		s = q + r
	return t + a

def main():
	for _ in range(int(input())):
		s = int(input())
		print(solve2(s))
main()


def mod(n):
	num = n
	for i in range(len(str(num)) - 1):
		num = num // 10
	for i in range(len(str(n)) - 1):
		num = num * 10
	return num
Total = 0
s = []
T = int(input())
for i in range(T):
	Total = 0
	n = int(input())
	while len(str(n)) > 2:
		Total = Total + mod(n)
		n = n - mod(n) + mod(n) // 10
	if len(str(n)) == 2:
		while len(str(n)) == 2:
			if n % 10 == 0:
				Total += n
				n = n // 10
			elif 10 - n % 10 < n // 10:
				Total = Total + (10 - n % 10) * 10
				n = n - (10 - n % 10) * 10 + (10 - n % 10)
			elif 10 - n % 10 >= n // 10:
				Total = Total + mod(n)
				n = n - mod(n) + mod(n) // 10
	if len(str(n)) == 1:
		Total += n
	s.append(Total)
for i in s:
	print(i)


for _ in range(int(input())):
	s = int(input())
	total = s
	while s >= 10:
		cb = s // 10
		s = s % 10
		total += cb
		s += cb
	print(total)


n = int(input())
for ti in range(n):
	r = int(input())
	t = 0
	s = 1
	while s > 0:
		s = r // 10
		t += s * 10
		r -= s * 10 - s
	print(t + r)


num_cases = int(input())
for i in range(num_cases):
	credit = int(input())
	saved = 0
	total = 0
	while credit > 0:
		credit += saved
		saved = credit % 10
		credit = int(credit / 10)
		amount = int(credit) * 10
		total += amount
	total += saved
	print(total)


import sys
from collections import defaultdict, deque
from math import sqrt, gcd, factorial

def input():
	return sys.stdin.readline()[:-1]

def solve():
	s = int(input())
	a = 0
	while s >= 10:
		a += s - s % 10
		s = s // 10 + s % 10
	a += s
	print(a)
t = 1
t = int(input())
for case in range(1, t + 1):
	ans = solve()


t = int(input())
for i in range(t):
	n = int(input())
	s = n
	xsum = 0
	while True:
		xsum += n // 10
		x = n // 10
		s = s + x
		n = n - x * 10 + x
		if s // 10 == xsum:
			break
	print(s)


from math import *
t = int(input())

def main():
	s = int(input())
	return spend_burles(s)

def spend_burles(s):
	if s < 10:
		return s
	if s >= 10:
		spent = s // 10
		remainder = s % 10
		cashback = spent
		spent *= 10
		return spent + spend_burles(remainder + cashback)
for _ in range(t):
	print(main())


for _ in range(int(input())):
	s = int(input())
	print(int(s // 0.9))


t = int(input())
r = []

def init(a):
	for p in range(len(a)):
		a[p] = int(a[p])
	return a

def swap(a):
	for i in range(len(a) - 1):
		temp = a[i]
		a[i] = a[i + 1]
		a[i + 1] = temp
	return a
for i in range(t):
	n = int(input())
	d = 0
	if n >= 10:
		while n >= 10:
			d = d + int(n / 10) * 10
			n = int(n / 10) + n % 10
		d = d + n
	else:
		d = n
	r.append(d)
for j in range(len(r)):
	print(r[j])


from collections import defaultdict
from os import system
import sys
import queue
for _ in range(int(input())):
	n = int(input())
	tot = 0
	left = 0
	spend = 0
	free = 0
	while n >= 10:
		left = n % 10
		spend = n - left
		free = spend // 10
		tot += spend
		n = free + left
	tot += n
	print(tot)


t = int(input())
for i in range(t):
	s = int(input())
	if s < 10:
		print(s)
	elif s % 9 != 0:
		print(s + s // 9)
	else:
		print(s - 1 + s // 9)


q = int(input())
for _ in range(q):
	s = int(input())
	res = 0
	while s > 9:
		sm = s % 10
		res += s - s % 10
		s = s // 10
		s += sm
		if s < 9:
			break
	res += s
	print(res)


for _ in range(int(input())):
	n = int(input())
	x = n
	c = 0
	count = 0
	while x != 0:
		c += x % 10
		x = x // 10
		count += x * 10
	q = 0
	while c != 0:
		q += c % 10
		c = c // 10
		count += c * 10
	cc = 0
	if q >= 10:
		while q != 0:
			cc += q % 10
			q = q // 10
			count += q * 10
		print(count + cc)
	else:
		print(count + q)


t = int(input())
for _ in range(t):
	n = int(input())
	n1 = n
	d = 0
	s = 0
	while n >= 10:
		d = n // 10 + n % 10
		s += n // 10
		n = d
	print(s + n1)


import sys
import os
import math
import copy
from math import gcd
from bisect import bisect
from io import BytesIO, IOBase
from math import sqrt, floor, factorial, gcd, log, ceil
from collections import deque, Counter, defaultdict
from itertools import permutations, combinations

def Int():
	return int(sys.stdin.readline())

def Mint():
	return map(int, sys.stdin.readline().split())

def Lstr():
	return list(sys.stdin.readline().strip())

def Str():
	return sys.stdin.readline().strip()

def Mstr():
	return map(str, sys.stdin.readline().strip().split())

def List():
	return list(map(int, sys.stdin.readline().split()))

def Hash():
	return dict()

def Mod():
	return 1000000007

def Ncr(n, r, p):
	return fact[n] * (ifact[r] * ifact[n - r] % p) % p

def Most_frequent(list):
	return max(set(list), key=list.count)

def Mat2x2(n):
	return [List() for _ in range(n)]

def Prime_factors(n):
	i = 2
	factors = set()
	while i * i <= n:
		if n % i:
			i += 1
		else:
			n //= i
			factors.add(i)
	if n > 1:
		factors.add(n)
	print(factors)
	if len(factors) == 2:
		return True
	else:
		return False

def Divisors(n):
	l = []
	for i in range(1, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
	return l

def Sieve(n):
	prime = [True for i in range(n + 1)]
	lst = []
	p = 2
	while p * p <= n:
		if prime[p]:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p = p + 1
	for i in range(2, n + 1):
		if prime[i]:
			lst.append(i)
	return lst

def minimum_integer_not_in_list(a):
	b = max(a)
	if b < 1:
		return 1
	A = set(a)
	B = set(range(1, b + 1))
	D = B - A
	if len(D) == 0:
		return b + 1
	else:
		return min(D)

def solution():
	for i in range(Int()):
		n = Int()
		print((n - 1) // 9 + n)
solution()


for _ in range(int(input())):
	n = int(input())
	count = 0
	while n >= 10:
		if n % 10 == 0:
			x = n // 10
			count += x * 10
			n = x
		else:
			x = n // 10
			count += x * 10
			n = n - x * 10 + x * 10 // 10
	print(count + n)


t = int(input())
for i in range(t):
	n = int(input())
	cnt = n
	m = n // 10
	while m > 0:
		cnt += m
		n -= 9 * m
		m = n // 10
	print(cnt)


t = int(input())
for i in range(t):
	n = int(input())
	print(n + (n - 1) // 9)


for x in range(int(input())):
	a = int(input())
	(q, r) = (a // 9, a % 9)
	if r > 0:
		print(a + q)
	elif r == 0:
		print(a + q - 1)


for _ in range(int(input())):
	n = int(input())
	s = 0
	while n >= 10:
		s += n // 10 * 10
		n = n - n // 10 * 10 + n // 10
	print(s + n)


for j in range(int(input())):
	print(int(int(input()) // 0.9))


t = int(input())
for _ in range(t):
	s = int(input())
	print(10 * s // 9 - (s % 9 == 0))


for _ in range(int(input())):
	n = int(input())
	total = 0
	while n >= 10:
		left = n // 10
		total += left * 10
		n -= left * 9
	total += n
	print(total)


x = int(input())
for a in range(x):
	y = int(input())
	s = 0
	saved = 0
	while y >= 1:
		n = int((y // 10 + 1) * 10)
		if n - y <= saved:
			saved -= n - y
			y = n
			s += y
		else:
			saved += y % 10
			s += y - y % 10
		y = y // 10
	s += saved
	print(s)


import sys
import math
input = sys.stdin.readline
inputLines = sys.stdin.readlines

def readIntList():
	return list(map(int, input().split()))

def readStrList():
	return list(map(lambda x: x.strip(), inputLines()))

def indexOf(l: list, elem):
	return l.index(elem) if elem in l else -1

def lastIndexOf(l: list, elem):
	indexes = [idx for (idx, val) in enumerate(l) if val == elem]
	return max(indexes) if len(indexes) > 0 else -1

def distinct(l: list):
	used = set()
	return [x for x in l if x not in used and (used.add(x) or True)]

def solution():
	for _ in range(int(input())):
		x = int(input())
		t = math.floor(x / 9)
		print(x + (t if x % 9 != 0 else t - 1))
solution()


t = int(input())
for i in range(t):
	n = int(input())
	s = 0
	d = 0
	r = 0
	while n > 9:
		r = n % 10
		d = n - r
		s = s + d
		n = d // 10 + r
	s = s + n
	print(s)


t = int(input())
for _ in range(0, t):
	s = int(input())
	sp = 0
	while s:
		left = s % 10
		s -= left
		if s == 0:
			sp += left
			break
		sp += s
		cb = s // 10
		s = cb + left
	print(sp)


def mi():
	return map(int, input().split())
for _ in range(int(input())):
	s = int(input())
	g = s
	(spend, rem) = (1, -1)
	ans = 0
	while s:
		spend = s // 10
		ans += spend * 10
		rem = s % 10 + spend
		if rem == s:
			break
		s = rem
	print(ans + rem)


for Z in range(int(input())):
	n = int(input())
	rem = n
	spe = 0
	while rem > 0:
		if rem >= 10:
			spe += rem // 10 * 10
		else:
			spe += rem
			break
		rem = rem % 10 + rem // 10
	print(spe)


import sys, math
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())
t = 1
t = inp()
for tt in range(t):
	n = inp()
	q = n
	c = 0
	w = 0
	while q > 0:
		w = w + q % 10
		q = q // 10 * 10
		c = c + q
		q = q // 10
		if (q + w) // 10 > q // 10:
			qw = q
			q = q + (10 - q % 10)
			w = w - (10 - qw % 10)
	print(c + w)


def solve(s):
	temp = s
	while temp >= 10:
		cnt = temp // 10
		s += cnt
		temp -= cnt * 10
		temp += cnt
	return s
T = int(input())
for t in range(0, T, 1):
	s = int(input())
	print(solve(s))


test = int(input())
while test:
	test -= 1
	x = int(input())
	ans = x
	y = x
	if int(x / 10) > 0:
		while int(x / 10):
			ans += int(x / 10)
			x = int(x / 10) + x % 10
		print(ans)
	else:
		print(x)


def main():
	op = ''
	t = int(input())
	for i in range(t):
		burles = int(input())
		r = burles % 10
		a = (burles - r) / 10
		spend = a * 10
		if spend >= 10:
			while a + r >= 10:
				n_burles = a + r
				r = n_burles % 10
				a = (n_burles - r) / 10
				spend += a * 10
			spend += a + r
		elif spend < 10:
			spend = burles
		op += str(int(spend)) + '\n'
	print(op)
main()


n = int(input())
for _ in range(n):
	m = int(input())
	k = m
	b = 0
	while m // 10 != 0:
		k += m // 10
		b = m % 10
		m = m // 10 + b
	print(k)


for i in range(int(input())):
	s = int(input())
	if s < 10:
		print(s)
	else:
		print((s - 1) // 9 + s)


for _ in range(int(input())):
	n = int(input())
	x = int(n / 10)
	count = n - int(str(n)[-1])
	rem = int(n % 10)
	while n > 9:
		n = rem + x
		x = int(n / 10)
		count += n - int(str(n)[-1])
		rem = int(n % 10)
	count += n
	print(count)


import math
t = int(input())
for i in range(t):
	n = int(input())
	total = 0
	while n >= 10:
		rem = n % 10
		n = n - rem
		total = total + n
		profit = n // 10
		n = profit + rem
	total = total + n
	print(total)


import math
T = int(input())
for i in range(T):
	n = int(input())
	remain = n
	ans = 0
	while remain >= 10:
		ans = ans + (remain - remain % 10)
		remain = remain % 10 + (remain - remain % 10) // 10
	ans = ans + remain
	print(ans)


for i in range(int(input())):
	a = int(input())
	ans = 0
	while a > 9:
		b = len(str(a))
		a = int(a)
		c = 10 ** (b - 1)
		ans += a // c * c
		a = a % c + a // c * c // 10
	print(ans + a)


t = int(input())
answer = []
while t > 0:
	money = 0
	t -= 1
	s = int(input())
	while s >= 10:
		money = money + s // 10 * 10
		s = s // 10 + s % 10
	money += s
	answer.append(money)
	continue
for item in answer:
	print(item)


def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
import math
for _ in range(ii()):
	n = ii()
	ans = 10 * n
	d = ans / 9
	c = ans // 9
	if c == d:
		print(c - 1)
	else:
		print(c)


from math import floor

def main():
	t = int(input())
	for __ in range(t):
		s = int(input())
		spent = 0
		while s >= 10:
			spent += s // 10 * 10
			s = s % 10 + floor(s // 10)
		print(spent + s)
main()


t = int(input())
inputarrs = list()
for r in range(t):
	inputarrs.append(input())
for i in inputarrs:
	summ = 0
	startnum = int(i)
	summ += startnum
	while startnum != 0:
		cashback = startnum // 10
		summ += cashback
		if cashback == 0:
			break
		startnum = startnum % 10 + cashback
	print(summ)


def main():

	def solve():
		s = int(input())
		print(s + (s - 1) // 9)
	q = int(input())
	for _ in range(q):
		solve()
main()


T = int(input())
for i in range(T):
	b = int(input())
	a = b
	if a < 10:
		print(a)
	else:
		c = 0
		while a >= 10:
			d = a // 10
			a -= 10 * d
			a += d
			c += d
		if a < 10:
			print(b + c)


import math
t = int(input())
while t != 0:
	spent = 0
	s = int(input())
	while True:
		if s >= 10:
			cashback = int(s / 10)
			redudent = s % 10
			spent += s - redudent
			s = redudent + cashback
		if s < 10:
			spent += s
			break
	print(spent)
	t -= 1


for _ in range(int(input())):
	n = int(input())
	temp = 0
	total = n
	while n >= 10:
		ld = n % 10
		temp = n // 10
		total += temp
		n = temp + ld
	print(total)


t = int(input())
for _ in range(t):
	n = int(input())
	ans = 0
	rem = 0
	if n < 10:
		print(n)
	else:
		while n >= 10:
			ans += int(n / 10) * 10
			rem = n % 10
			n = int(n / 10)
			n += rem
		ans += n
		print(ans)


n = int(input())
for jk in range(n):
	m = int(input())
	cnt = 0
	s = 0
	t = m
	while m >= 10:
		cnt = m // 10
		s += cnt
		m = m % 10
		m += cnt
	print(s + t)


t = int(input())
for _ in range(t):
	n = int(input())
	ans = 0
	while n > 0:
		if n // 10 == 0:
			ans += n
			break
		d = n // 10
		ans += d * 10
		r = n % 10
		n = d + r
	print(ans)


t = int(input())
for j in range(t):
	n = int(input())
	s = 0
	rem = 0
	while n >= 10:
		rem = n % 10
		s = s + n // 10 * 10
		n = n // 10 + rem
	s = s + n
	print(s)


t = int(input())
for i in range(t):
	s = int(input())
	ans = 0
	pw = 10 ** 9
	while s > 0:
		while s < pw:
			pw /= 10
		ans += pw
		s -= pw - pw // 10
	print(int(ans))


def buying(s):
	c = 0
	while s >= 10:
		balance = s % 10
		c += s - balance
		cash_back = (s - balance) // 10
		s = cash_back + balance
	return c + s
n = int(input())
for i in range(n):
	w = int(input())
	print(buying(w))


import sys

def findit(x):
	if x < 10:
		return x
	val = x - 9 * (x // 10)
	return findit(val) + x // 10 * 10
t = int(sys.stdin.readline())
ans_arr = []
for i in range(t):
	s = int(sys.stdin.readline())
	if s < 10:
		ans_arr.append(str(s))
	else:
		ans_arr.append(str(findit(s)))
print('\n'.join(ans_arr))


import sys
queries = int(sys.stdin.readline())
for query in range(queries):
	burleigh = int(sys.stdin.readline())
	answer = 0
	while burleigh > 9:
		answer += burleigh - burleigh % 10
		burleigh = burleigh % 10 + burleigh // 10
	answer += burleigh
	print(answer)


for _ in range(int(input())):
	n = int(input())
	count = 0
	res = [int(x) for x in str(n)]
	while len(res) > 0:
		p = res[0] * 10 ** (len(res) - 1)
		count += res[0] * 10 ** (len(res) - 1)
		res = res[1:]
		if len(res) == 0:
			break
		else:
			n = int(''.join(map(str, res)))
			n = n + p // 10
			res = [int(x) for x in str(n)]
	print(count)


import math
t = int(input())
for _ in range(t):
	n = int(input())
	print(math.floor(n * 1.1111111111111))


t = int(input())
for _ in range(t):
	n = int(input())
	ans = 0
	while n >= 10:
		q = n // 10
		r = n % 10
		n = r + q
		ans += q * 10
	print(ans + n)


t = int(input())
for _ in range(t):
	s = int(input())
	count = 0
	for i in range(1000):
		count += s // 10
		s = s % 10 + s // 10
	print(int(str(count) + str(s)))


def solve():
	s = int(input())
	ans = 0
	while s >= 10:
		for i in range(9, 0, -1):
			x = 10 ** i
			if s >= x:
				ans += x
				s -= x
				s += x // 10
				break
	return ans + s

def main():
	t = int(input())
	for _ in range(t):
		print(solve())
main()


t = int(input())
for i in range(0, t):
	n = int(input())
	ans = 0
	while n != 0:
		count10 = n // 10
		rem = n % 10
		if count10 != 0:
			ans += count10 * 10
		else:
			ans += rem
			rem = 0
		n = rem + count10
	print(ans)


counter = int(input())
data = [int(input()) for i in range(counter)]
fa = []
for i in data:
	answer = []
	while True:
		if i >= 10:
			trata = int(str(i)[:-1] + '0')
			cash_back = i // 10
			i = i % 10 + cash_back
			answer.append(trata)
		if i < 10:
			answer.append(i)
			answer = sum(answer)
			fa.append(answer)
			break
for i in fa:
	print(i)


for _ in range(int(input())):
	n = int(input())
	if n >= 0 and n <= 9:
		print(n)
	else:
		ans = 0
		while n >= 10:
			ans += n // 10 * 10
			d = n % 10
			n = d + n // 10
		print(ans + n)


t = int(input())
while t > 0:
	spend = 0
	n = int(input())
	while n > 9:
		val = n // 10 * 10
		n -= val
		n += val // 10
		spend += val
	spend += n
	print(spend)
	t -= 1


j = int(input())
for i in range(j):
	x = int(input())
	n = x
	temp = 0
	s = 0
	while n >= 10:
		temp = n % 10
		n = int((n - n % 10) / 10)
		s = s + n * 10
		n = n + temp
	print(s + n)


t = int(input())
b = 0
for a in range(t):
	s = int(input())
	while s >= 10:
		x = int(s / 10) * 10
		s = x / 10 + s - x
		b += x
	if s != 0:
		b += s
	print(int(b))
	b = 0


def func(s):
	res = 0
	while s >= 10:
		res += s // 10 * 10
		s = s // 10 + s % 10
	res += s
	return res
t = int(input())
for i in range(t):
	print(func(int(input())))


t = int(input())
for i in range(t):
	celld = 0
	s = int(input())
	rest = s
	while rest != 0:
		g = rest % 10
		p = (rest - g) // 10
		celld = celld + rest - g
		rest = p + g
		if rest < 10:
			celld += rest
			rest = 0
			print(celld)


import sys
input = sys.stdin.readline
from collections import *
t = int(input())
for _ in range(t):
	s = int(input())
	for i in range(1, 10):
		if (s - i) % 9 == 0:
			print(10 * (s - i) // 9 + i)
			break


import sys

def function(n):
	if n < 10:
		return n
	add = n // 10
	return n - n % 10 + function(n % 10 + add)
t = int(sys.stdin.readline())
for _ in range(t):
	n = int(sys.stdin.readline())
	print(function(n))


def output(n):
	final = []
	while n != 0:
		final.append(n % 10)
		n = int(n / 10)
	return final
for _ in range(int(input())):
	n = int(input())
	lst = output(n)
	i = len(lst)
	if i == 1:
		print(n)
		continue
	ans = 0
	while i > 0:
		ans += lst[i - 1] * 10 ** (i - 1)
		if i != 1 and lst[i - 1] + lst[i - 2] > 9:
			temp = lst[i - 1]
			lst[i - 1] = int((lst[i - 1] + lst[i - 2]) / 10)
			lst[i - 2] = (temp + lst[i - 2]) % 10
		else:
			lst[i - 2] = lst[i - 1] + lst[i - 2]
			i -= 1
	print(ans)


import math
testcase = int(input())
while testcase > 0:
	n = int(input())
	x = n
	spend = 0
	p = 0
	while True:
		if x < 10:
			spend += x
			break
		spend += x - x % 10
		cash = math.floor(x / 10)
		x -= x - x % 10
		x += cash
	print(spend)
	testcase -= 1


t = int(input())
for g in range(0, t):
	n = int(input())
	spent = 0
	while n > 100:
		x = int(n / 10)
		n = n - x * 10
		spent = spent + x * 10
		n = n + x
	while n > 10:
		n = n - 10
		spent = spent + 10
		n = n + 1
	if n == 10:
		spent = spent + 11
		print(spent)
	else:
		spent = spent + n
		print(spent)


n = int(input())
Result = []
for i in range(0, n):
	bool_ = True
	val = int(input())
	Sum = 0
	while bool_:
		Remain = val % 10
		if val < 10:
			Sum += val
			break
		Sum += val - Remain
		val = (val - Remain) / 10 + Remain
	Result.append(int(Sum))
for i in Result:
	print(i)


def sol():
	num = int(input())
	ansArray = []
	for i in range(0, num):
		inp = int(input())
		if inp % 9 != 0:
			ansArray.append(inp + inp // 9)
		else:
			ansArray.append(inp + (inp - 9) // 9)
	for i in ansArray:
		print(i)
sol()


import math

def solve():
	s = int(input())
	if s < 10:
		return s
	else:
		k = s // 10
		s = s % 10
		s += k
		ans = k * 10
		while s > 0:
			if s >= 10:
				p = s // 10
				ans += 10 * p
				s %= 10
				s += p
			else:
				ans += s
				s = 0
		return ans
t = int(input())
for _ in range(t):
	print(solve())


for _ in range(int(input())):
	s = int(input())
	i = 1
	x = 0
	while s >= 10:
		x += 10 * (s // 10)
		s = s - 10 * (s // 10) + s // 10
	x += s
	print(x)


def solution(s):
	account = 0
	while s >= 10:
		z = str(s)
		paid = 10 * (10 ** (len(str(s)) - 2) * int(z[0]))
		cashback = paid / 10
		account += paid
		s -= paid
		s += round(cashback)
	account += s
	return account
t = int(input())
while t > 0:
	t -= 1
	s = int(input())
	print(solution(s))


def get_max(num):
	num = str(num)
	return int(num[0] + '0' * (len(num) - 1))
for _ in range(int(input())):
	num = int(input())
	res = 0
	while num != 0:
		_max = get_max(num)
		res += _max
		num -= _max
		num += _max // 10
	print(res)


T = int(input())
t = 0
while t < T:
	ris = 0
	N = int(input())
	while N > 0:
		s = N
		if s > 10:
			while s % 10 != 0:
				s = s - 1
		ris = ris + s
		N = N - s + s // 10
	print(ris)
	t = t + 1


T = int(input())
for _ in range(T):
	N = int(input())
	if N % 9 == 0:
		print((N // 9 - 1) * 10 + 9)
	else:
		print(N // 9 * 10 + N % 9)


import math
T = int(input())
n = [0] * T
a = [0] * T
for t in range(T):
	n[t] = int(input())
for t in range(T):
	spent = 0
	while n[t] > 0:
		s = 10 ** int(math.log10(n[t]))
		n[t] -= s
		if 0.1 * s >= 1:
			n[t] += 0.1 * s
		spent += s
	print(spent)


q = int(input())
p = []
for e in range(q):
	g = int(input())
	n = g
	y = g
	while g >= 10:
		r = len(str(g)) - 1
		l = ''
		while r != 0:
			if r == 1:
				c = int('1' + l)
			l += '0'
			r -= 1
		l = int('1' + l)
		k = n
		n = n + g // l * c
		g = g % l
		g = g + (n - k)
	p.append(n)
for i in range(q):
	print(p[i])


for i in range(int(input())):
	s = int(input())
	ans = 0
	while s > 0:
		if s < 10:
			ans += s
			s -= s
		else:
			ans += s - s % 10
			s = s // 10 + s % 10
	print(ans)


t = int(input())
while t:
	t -= 1
	s = input()
	s = int(s)
	spend = 0
	while s:
		if s >= 10:
			minusnum = ''
			s = str(s)
			zerc = len(s)
			k = s[0]
			minusnum = k + '0' * (zerc - 1)
			minusnum = int(minusnum)
			spend += minusnum
			s = int(s)
			s = s - minusnum + minusnum // 10
		else:
			spend += s
			s = s - s
	print(spend)


testCases = int(input())
for test in range(testCases):
	s = int(input())
	division = s // 9
	reminder = s % 9
	answer = division * 10 + reminder
	if reminder == 0:
		print(answer - 1)
	else:
		print(answer)


from sys import stdin
t = int(stdin.readline())
while t:
	s = int(input())
	b = 0
	while s:
		if s < 10:
			b += s
			break
		temp = s // 10
		c = temp * 10
		b += c
		s -= c
		s += c // 10
	print(b)
	t -= 1


from sys import stdin, stdout
T = int(stdin.readline())
for i in range(T):
	s = int(stdin.readline())
	if s < 10:
		stdout.write(str(s))
		print('\n')
	else:
		temp = s
		spent = 0
		cash_back = 0
		while len(str(temp)) != 1:
			cash_back = temp // 10
			spent += temp - int(str(temp)[-1])
			temp -= temp - int(str(temp)[-1])
			temp += cash_back
		stdout.write(str(spent + temp))
		print('\n')


n = int(input())

def rec(x):
	if x < 10:
		return x
	return 10 * (x // 10) + rec(x % 10 + x // 10)
for i in range(0, n):
	inp = int(input())
	print(rec(inp))


import sys, bisect, string, math, time, functools, random, fractions
from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
from itertools import permutations, combinations, groupby
rep = range
R = range

def Golf():
	(n, *t) = map(int, open(0).read().split())

def I():
	return int(input())

def S_():
	return input()

def IS():
	return input().split()

def LS():
	return [i for i in input().split()]

def MI():
	return map(int, input().split())

def LI():
	return [int(i) for i in input().split()]

def LI_():
	return [int(i) - 1 for i in input().split()]

def NI(n):
	return [int(input()) for i in range(n)]

def NI_(n):
	return [int(input()) - 1 for i in range(n)]

def StoLI():
	return [ord(i) - 97 for i in input()]

def ItoS(n):
	return chr(n + 97)

def LtoS(ls):
	return ''.join([chr(i + 97) for i in ls])

def RA():
	return map(int, open(0).read().split())

def RLI(n=8, a=1, b=10):
	return [random.randint(a, b) for i in range(n)]

def RI(a=1, b=10):
	return random.randint(a, b)

def Rtest(T):
	(case, err) = (0, 0)
	for i in range(T):
		inp = INP()
		(a1, ls) = naive(*inp)
		a2 = solve(*inp)
		if a1 != a2:
			print((a1, a2), inp)
			err += 1
		case += 1
	print('Tested', case, 'case with', err, 'errors')

def GI(V, E, ls=None, Directed=False, index=1):
	org_inp = []
	g = [[] for i in range(V)]
	FromStdin = True if ls == None else False
	for i in range(E):
		if FromStdin:
			inp = LI()
			org_inp.append(inp)
		else:
			inp = ls[i]
		if len(inp) == 2:
			(a, b) = inp
			c = 1
		else:
			(a, b, c) = inp
		if index == 1:
			a -= 1
			b -= 1
		aa = (a, c)
		bb = (b, c)
		g[a].append(bb)
		if not Directed:
			g[b].append(aa)
	return (g, org_inp)

def GGI(h, w, search=None, replacement_of_found='.', mp_def={'#': 1, '.': 0}, boundary=1):
	mp = [boundary] * (w + 2)
	found = {}
	for i in R(h):
		s = input()
		for char in search:
			if char in s:
				found[char] = (i + 1) * (w + 2) + s.index(char) + 1
				mp_def[char] = mp_def[replacement_of_found]
		mp += [boundary] + [mp_def[j] for j in s] + [boundary]
	mp += [boundary] * (w + 2)
	return (h + 2, w + 2, mp, found)

def TI(n):
	return GI(n, n - 1)

def accum(ls):
	rt = [0]
	for i in ls:
		rt += [rt[-1] + i]
	return rt

def bit_combination(n, base=2):
	rt = []
	for tb in R(base ** n):
		s = [tb // base ** bt % base for bt in R(n)]
		rt += [s]
	return rt

def gcd(x, y):
	if y == 0:
		return x
	if x % y == 0:
		return y
	while x % y != 0:
		(x, y) = (y, x % y)
	return y

def YN(x):
	print(['NO', 'YES'][x])

def Yn(x):
	print(['No', 'Yes'][x])

def show(*inp, end='\n'):
	if show_flg:
		print(*inp, end=end)
mo = 10 ** 9 + 7
inf = float('inf')
FourNb = [(-1, 0), (1, 0), (0, 1), (0, -1)]
EightNb = [(-1, 0), (1, 0), (0, 1), (0, -1), (1, 1), (-1, -1), (1, -1), (-1, 1)]
compas = dict(zip('WENS', FourNb))
cursol = dict(zip('LRUD', FourNb))
l_alp = string.ascii_lowercase
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
input = lambda : sys.stdin.readline().rstrip()

class Comb:

	def __init__(self, n, mo=10 ** 9 + 7):
		self.fac = [0] * (n + 1)
		self.inv = [1] * (n + 1)
		self.fac[0] = 1
		self.fact(n)
		self.mo = mo
		for i in range(1, n + 1):
			self.fac[i] = i * self.fac[i - 1] % mo
			self.inv[n] *= i
			self.inv[n] %= mo
		self.inv[n] = pow(self.inv[n], mo - 2, mo)
		for i in range(1, n):
			self.inv[n - i] = self.inv[n - i + 1] * (n - i + 1) % mo
		return

	def fact(self, n):
		return self.fac[n]

	def invf(self, n):
		return self.inv[n]

	def comb(self, x, y):
		if y < 0 or y > x:
			return 0
		return self.fac[x] * self.inv[x - y] * self.inv[y] % self.mo
show_flg = False
show_flg = True
ans = 0
for _ in range(I()):
	s = I()
	ans = 0
	while s:
		ans += s // 10 * 10
		s = s - s // 10 * 10 + s // 10
		if s < 10:
			ans += s
			s = 0
	print(ans)


t = int(input())
for _ in range(t):
	s = int(input())
	food = 0
	while s > 0:
		if s >= 10:
			buy = s - s % 10
		else:
			buy = s
		food += buy
		s = s - buy + buy // 10
	print(food)


for _ in range(int(input())):
	n = int(input())
	s = n
	dig = 0
	while n > 9:
		dig = n // 10
		d = n % 10
		s += dig
		n = dig + d
	print(s)


for i in range(int(input())):
	n = int(input())
	print(round(n // 0.9))


N = int(input())
for i in range(N):
	s = int(input())
	print(s + (s - 1) // 9)


t = int(input())
for iii in range(t):
	s = int(input())
	k = 0
	while s >= 10:
		tmp = s // 10
		s1 = s % 10 + tmp
		k += s - s % 10
		s = s1
	print(k + s)


for _ in range(int(input())):
	n = int(input())
	t = n
	while n >= 10:
		t += n // 10
		n = n // 10 + n % 10
	print(t)


import math

def fun(x):
	if x < 10:
		return x
	spent = 0
	a = x - x % 10
	b = x - a
	spent = a + fun(b + math.floor(a / 10))
	return spent
t = int(input())
for i in range(t):
	n = int(input())
	print(fun(n))


def fun(n):
	if n < 10:
		return n
	return n - n % 10 + fun(n % 10 + (n - n % 10) // 10)
t = int(input())
for i in range(t):
	n = int(input())
	print(fun(n))


for i in range(int(input())):
	test = int(input())
	if test % 9 == 0:
		print(test + test // 9 - 1)
	else:
		print(test + test // 9)


t = int(input())
for _ in range(t):
	n = int(input())
	ans = 0
	while n >= 10:
		ans += n - n % 10
		cb = n // 10
		n %= 10
		n += cb
	ans += n
	print(ans)


for i in range(int(input())):
	n = int(input())
	a = n
	s = 0
	while a >= 1:
		a = 0.1 * a
		s = s + a
	print(int(s + n))


def main():
	T = int(input())
	for t in range(T):
		S = int(input())
		ans = 0
		while S >= 10:
			cur = S // 10
			ans += cur * 10
			S -= cur * 10
			S += cur
		ans += S
		print(ans)
main()


t = int(input())
for j in range(t):
	s = int(input())
	a = s % 10
	b = s // 10
	m = 0
	while b > 0:
		m += b * 10
		s = a + b
		a = s % 10
		b = s // 10
	m += a
	print(m)


t = int(input())
for j in range(t):
	n = int(input())
	temp = n
	while n >= 10:
		r = n % 10
		n = n - r
		n = n // 10
		temp = temp + n
		n = n + r
	print(temp)


from sys import stdin, stdout
import traceback
read = stdin.readline
write = stdout.write
writeln = lambda x: write(str(x) + '\n')

def reads(typ=int):
	return list(map(typ, read().split()))

class Sol:

	@classmethod
	def input(cls):
		s = cls()
		s.n = int(read())
		return s

	def solve(self):
		ret = 0
		cash = self.n
		while cash >= 10:
			cash10 = cash // 10
			ret += 10 * cash10
			cash -= 10 * cash10
			cash += cash10
		ret += cash
		return ret
try:
	for _ in range(int(read())):
		writeln(Sol.input().solve())
except Exception as e:
	print('Got exception:', repr(e))
	print(traceback.format_exc())


t = int(input())
for _ in range(t):
	n = int(input())
	p = 0
	while n != 0:
		if n < 10:
			p = p + n
			break
		rem = n % 10
		d = n // 10
		p = p + d * 10
		n = rem + d
	print(p)


t = int(input(''))
while t > 0:
	n = int(input())
	sum1 = 0
	while n >= 10:
		sum1 = sum1 + (n - n % 10)
		n = int(n / 10) + n % 10
	print(sum1 + n)
	t = t - 1


for i in range(int(input())):
	s = int(input())
	total = 0
	while s > 0:
		if s >= 10:
			q = s // 10
			r = s % 10
			s = 0
			total += q * 10
			cb = q
			s = r + q
		else:
			total += s
			break
	print(total)


t = int(input())
for t in range(t):
	n = int(input())
	ans = 0
	while True:
		p = n // 10 * 10
		ans = ans + p
		d = n - p
		n = n // 10 + d
		if n < 10:
			ans = ans + n
			break
	print(ans)


for i in range(int(input())):
	x = int(input())
	tmp = x
	ans = 0
	while tmp >= 10:
		k = tmp // 10
		tmp -= 10 * k
		tmp += k
		ans += 10 * k
	print(ans + tmp)


t = int(input())
for _ in range(t):
	s = int(input())
	g = 0
	while s > 0:
		c = s % 10
		if c != s:
			spend = s - c
		else:
			spend = c
		cashbacked = spend // 10
		g += spend
		s -= spend - cashbacked
	print(g)


for _ in range(int(input())):
	n = int(input())
	ans = 0
	while n >= 10:
		sp = n - n % 10
		ans += sp
		x = sp // 10
		n -= sp
		n += x
	ans += n
	print(ans)


for _ in range(int(input())):
	(init, result) = (int(input()), 0)
	while init:
		if init < 10:
			result += init
			break
		spent = init // 10 * 10
		init -= spent
		init += spent // 10
		result += spent
	print(result)


for i in range(int(input())):
	x = int(input())
	res = 0
	while x >= 10:
		res += x // 10 * 10
		x = x % 10 + x // 10
	res += x % 10
	print(res)


t = int(input())
for z in range(t):
	s = int(input())
	s1 = int(s / 9)
	s2 = str(s1)
	if s < 10:
		print(s)
	elif s2 == '0':
		print(1)
	else:
		n = s % 9
		s2 += str(n)
		if s2[-1] == '0':
			a = int(s2)
			a -= 1
			print(a)
		else:
			print(s2)


m = int(input())
L = []

def food_buy(n):
	if n < 10:
		return n
	if n >= 10:
		s = n - n % 10 + food_buy(n // 10 + n % 10)
		return s
for i in range(m):
	t = int(input())
	L.append(food_buy(t))
for j in L:
	print(j)


t = int(input())
while t > 0:
	n = int(input())
	cost = 10 * (n // 10)
	new = n % 10 + n // 10
	div = new // 10
	while div != 0:
		cost += 10 * div
		new = new % 10 + div
		div = new // 10
	cost += new
	print(cost)
	t -= 1


import math
test_cases = int(input())
for _ in range(test_cases):
	s = int(input())
	spend = 0
	while s > 1:
		cannot_mod = s % 10
		if not cannot_mod or int(math.log10(s)) + 1 == 1:
			x = s
		else:
			x = s - cannot_mod
		spend += x
		cash_back = math.floor(x / 10)
		s = s - x
		s += cash_back
	print(s + spend)


def func(n):
	if n < 10:
		return n
	else:
		return n // 10 * 10 + func(n % 10 + n // 10)
t = int(input())
for i in range(t):
	n = int(input())
	print(func(n))


for _ in range(int(input())):
	s = int(input())
	if s < 10:
		print(s)
	else:
		temp = s
		po = len(str(s)) - 1
		while s >= 10:
			curr = s % 10 ** po
			val = 10 ** po - curr
			if val * 10 <= s:
				s -= val * 10
				temp += val
				s += val
			else:
				po -= 1
		print(temp)


powers = [10 ** i for i in range(10)]
for _ in range(int(input())):
	n = int(input())
	ans = 0
	while n >= 10:
		den = 0
		for i in range(10):
			if n >= powers[i]:
				den = powers[i]
		amt = n // den * den
		ans += amt
		n -= amt
		n += amt // 10
	ans += n
	print(ans)


t = int(input())
for i in range(t):
	s = int(input())
	total = 0
	while True:
		if s >= 10:
			times = s // 10
			total += times * 10
			s -= times * 9
		else:
			print(total + s)
			break


for _ in range(int(input())):
	n = int(input())
	c = 0
	while n >= 10:
		c += n - n % 10
		n = n % 10 + n // 10
	c += n
	print(c)


import math
n = int(input())
for z in range(n):
	n1 = int(input())
	if n1 % 9 == 0:
		k = n1 - 1
	else:
		k = n1
	print(math.floor(k / 9) + n1)


t = int(input())
for _ in range(t):
	s = int(input())
	q = s // 10
	if q == 0:
		print(s)
	else:
		rem = s % 10
		rem += q
		c = q
		while rem >= 10:
			quo = rem // 10
			rem = rem % 10
			rem += quo
			c += quo
		print(c + s)


t = int(input())
for i in range(t):
	ans = 0
	n = int(input())
	while n >= 10:
		x = n % 10
		ans += n - x
		n = n // 10 + x
	print(ans + n)


t = int(input())
for i in range(t):
	s = int(input())
	count = 0
	while s // 10 > 0:
		buy = s // 10 * 10
		s -= buy
		s += buy // 10
		count += buy
	print(count + s)


def solve(N):
	temp = N
	arr = []
	if N < 10:
		print(N)
	else:
		while temp >= 10:
			div = temp // 10
			rem = temp % 10
			if div + rem < 10:
				arr.append(div * 10)
				arr.append(rem + div)
			else:
				arr.append(div * 10)
			temp = div + rem
		print(sum(arr))
t = int(input())
while t != 0:
	n = int(input())
	solve(n)
	t -= 1


for _ in range(int(input())):
	a = int(input())
	print(a + (a - 1) // 9)


def getAmount(n):
	s = n
	if n < 10:
		return n
	while n > 10:
		q = n // 10
		n = n % 10 + q
		s += q
	return s if n < 1 else s + n // 10

def main():
	for _ in range(int(input())):
		n = int(input())
		ans = getAmount(n)
		print(ans)
main()


import math
for t in range(int(input())):
	reais = int(input())
	resposta = reais
	while reais >= 10:
		dividendo = math.floor(reais / 10) * 10
		ganho = math.floor(reais / 10)
		reais = reais % 10
		reais += ganho
		resposta += ganho
	print(resposta)


def process(s):
	max = 0
	x = 0
	while s > 10:
		x = s // 10 * 10
		s = s - x
		s = s + x // 10
		max = max + x
	if s == 10:
		print(max + s + 1)
	else:
		print(max + s)
t = int(input())
for i in range(0, t):
	s = int(input())
	process(s)


for _ in range(int(input())):
	s = int(input())
	tot = 0
	rem = 0
	while True:
		if s < 10:
			tot += s
			break
		if s % 10 == 0:
			tot += s
			s = s // 10
		elif s % 10 != 0:
			rem = s % 10
			s = s - rem
			tot += s
			s = s // 10 + rem
	print(tot)


import math
t = int(input())
for i in range(t):
	s = int(input())
	kol = 0
	kash = 0
	while s != 0:
		if s // 10 > 0:
			kol += s // 10 * 10
			kash = math.floor(s // 10 * 10 / 10)
			s -= s // 10 * 10
			s += kash
		else:
			kol += s % 10
			s = 0
	print(kol)


from math import floor
for _ in range(int(input())):
	Num = int(input())
	if Num % 9 == 0:
		print(floor(Num // 9) + Num - 1)
	else:
		print(floor(Num // 9) + Num)


import math
t = int(input())
for i2 in range(t):
	x = int(input())
	print(math.floor(x * 1.1111111111111))


def burles(num):
	sum = num
	while num // 10 != 0:
		a = num // 10
		num = num - a * 9
		sum += a
	return sum
n = int(input())
li = []
for i in range(0, n):
	li.append(int(input()))
for i in range(0, n):
	print(burles(li[i]))


def inp():
	return map(int, input().split())

def solve():
	s = int(input())
	res = 0
	while s > 9:
		res += s - s % 10
		s = s % 10 + s // 10
	res += s
	print(res)

def main():
	t = int(input())
	while t:
		solve()
		t -= 1
main()


for _ in range(int(input())):
	Num = int(input())
	if Num % 9 == 0:
		print(Num // 9 + Num - 1)
	else:
		print(Num // 9 + Num)


t = int(input())
s = [int(input()) for i in range(t)]
for i in s:
	ans = 0
	while i // 10 >= 1:
		ans += i - i % 10
		i = i // 10 + i % 10
	ans += i
	print(ans)


t = int(input())
for i in range(t):
	a = int(input())
	s = a // 9
	if s * 9 == a:
		s -= 1
	print(a + s)


s = []
ans = []
t = int(input())
for j in range(t):
	i = int(input())
	s.append(i)
for i in s:
	x = i
	while x >= 10:
		i += x // 10
		x = x // 10 + x % 10
	ans.append(i)
for i in ans:
	print(i)


t = int(input())
for i in range(t):
	s = int(input())
	counter = 0
	bal = s - s % 10
	while s > 0:
		if s < 10:
			counter += s
			break
		else:
			s = s - bal
			cashback = bal // 10
			s += cashback
			counter += bal
			bal = s - s % 10
	print(counter)


T = int(input())
for t in range(T):
	(s,) = map(int, input().split())
	ans = 0
	while s:
		spend = s // 10 * 10 if s >= 10 else s
		cashback = s // 10
		s -= spend
		s += cashback
		ans += spend
	print(ans)


t = int(input())
for r in range(t):
	n = int(input())
	ans = 0
	while n > 0:
		ans += n - n % 10
		if n % 10 == n:
			ans += n
			break
		a = n % 10
		n = a + n // 10
	print(ans)


t = int(input())
for i in range(t):
	s = int(input())
	if s < 10:
		print(s)
	else:
		ost = s % 9
		back = s // 9
		if not ost:
			back -= 1
		print(s + back)


import math

def main():
	for _ in range(int(input())):
		n = int(input())
		sum = 0
		pw = 1000000000.0
		while n > 0:
			while n < pw:
				pw = pw // 10
			sum += pw
			n -= pw - pw // 10
		print(math.floor(sum))
main()


import sys
t = int(input())
for x in range(t):
	s = int(input())
	somma = 0
	while s != 0:
		x = s // 10 * 10
		if x >= 10:
			s = s - 9 * x // 10
		else:
			x = s
			s = 0
		somma = somma + x
	print(somma)


def ps(num):
	if num < 10:
		return num
	else:
		su = 0
		su += num // 10 * 10 + ps(num % 10 + num // 10)
		return su
t = int(input())
for _ in range(t):
	s = int(input())
	ans = ps(s)
	print(ans)


t = int(input())
while t != 0:
	a = int(input())
	remain = a
	total = 0
	while 1:
		if a <= 9:
			total += a
			break
		p = a % 10
		remain = p
		a = a - p
		total += a
		cashback = a / 10
		a = cashback + remain
	print(int(total))
	t -= 1


t = int(input())
a = []
for i in range(t):
	a.append(int(input()))
for i in a:
	j = i
	s = 0
	while j >= 10:
		p = j % 10
		j = j - p
		s += j
		j = j // 10
		j = j + p
	s += j
	print(s)


t = int(input())

def checkio(t):
	res = 0
	if t < 10:
		return t
	tmp = 0
	while t >= 10:
		res += t // 10 * 10
		tmp = t // 10
		t -= t // 10 * 10
		t += tmp
	else:
		res += t
	return res
for i in range(t):
	s = int(input())
	print(checkio(s))


t = int(input())
l1 = []
for i in range(t):
	s = int(input())
	j = int(s / 9)
	if j * 9 == s:
		l1.append(s + j - 1)
	else:
		l1.append(s + j)
for i in range(t):
	print(l1[i])


t = int(input())
while t != 0:
	s = int(input())
	k = s
	res = 0
	while int(s / 10) != 0:
		res += int(s / 10)
		s = int(s / 10) + s % 10
	print(res + k)
	t -= 1


import math
t = int(input())
for i in range(t):
	n = int(input())
	count = 0
	while n:
		if n < 10:
			count += n
			n = 0
		else:
			s = n // 10
			count += s * 10
			n %= 10
			n += s
	print(count)


for _ in range(int(input())):
	s = input()
	ans = 0
	while len(s) > 0 and s != '0':
		t = int(s[0]) * 10 ** (len(s) - 1)
		ans += t
		s = s[1:]
		if len(s) == 0:
			s = '0'
		s = str(int(s) + t // 10)
	print(ans)


T = int(input())
for t in range(T):
	N = int(input())
	n = str(N)
	s = 0
	while N != 0:
		t = ord(n[0]) - ord('0')
		sm = t * 10 ** (len(n) - 1)
		s += sm
		N -= sm
		N += t * 10 ** (len(n) - 1) // 10
		n = str(N)
	print(s)


t = int(input())
for _ in range(t):
	x = int(input())
	res = 0
	while x > 0:
		a = x // 10
		b = x % 10
		if a == 0:
			res += b
			break
		else:
			res += a * 10
		x = a + b
	print(res)


t = int(input())
res = []
for _ in range(t):
	s = int(input())
	curr_cash = s
	amount_spent = 0
	while curr_cash > 0:
		remaining_cash = curr_cash % 10
		cashback = curr_cash // 10
		if cashback == 0:
			amount_spent += remaining_cash
			curr_cash = 0
		else:
			amount_spent += cashback * 10
			curr_cash = cashback + remaining_cash
	res.append(amount_spent)
for l in res:
	print(l)


T = int(input())
t = 0
while t < T:
	N = int(input())
	s = 0
	n = 0
	while True:
		n = N // 10 * 10
		s += n
		N = N - n * 9 / 10
		if n < 10:
			s += N
			f = int(s)
			break
	print(f)
	t = t + 1


t = int(input())
while t:
	t -= 1
	n = int(input())
	res = 0
	while n >= 10:
		ans = n // 10 * 10
		n = n - ans + n // 10
		res += ans
	print(res + n)


import math
T = int(input())
for t in range(T):
	s = int(input())
	if s < 10:
		print(s)
		continue
	res = 0
	while s >= 10:
		r = s % 10
		b = int(s / 10)
		res += b * 10
		s = r + b
	res += s
	print(res)


q = int(input())
for _ in range(q):
	x = int(input())
	if x % 9 == 0:
		x = x + x // 9 - 1
	else:
		x = x + x // 9
	print(x)


def f(x):
	c = 0
	while x > 0:
		n = len(str(x))
		p = int(str(x)[0]) * 10 ** (n - 1)
		x -= p - p // 10
		c += p
	return c
for i in range(int(input())):
	print(f(int(input())))


for i in range(int(input())):
	num = int(input())
	sum1 = 0
	spent = 10 ** 6
	while spent > 1:
		remain = num % 10
		spent = num - remain
		num = num // 10 + remain
		sum1 = sum1 + spent
	print(sum1 + remain)


import sys, itertools, math
T = int(sys.stdin.readline())
for _ in range(T):
	n = int(sys.stdin.readline().strip())
	ans = 0
	while n > 0:
		d = 10 ** (len(str(n)) - 1)
		ans += d
		n -= d
		n += d // 10
	print(ans)


n = int(input())
for i in range(n):
	m = int(input())
	m = m // 0.9
	print(int(m))


for i in range(int(input())):
	n = int(input())
	bache_hue = 0
	spent = 0
	kharch = 0
	cash = 0
	paise = 0
	while n >= 10:
		bache_hue = n % 10
		spent = n - bache_hue
		cash = spent // 10
		kharch += spent
		n = cash + bache_hue
	print(kharch + n)


n = int(input())
d = []
for i in range(n):
	l = int(input())
	d.append(l)
f = []
for i in range(len(d)):
	a = d[i]
	c = a
	while True:
		b = a % 10
		a = a // 10
		c = c + a
		a = a + b
		if a < 10:
			f.append(c)
			break
for i in range(len(f)):
	print(f[i])


import sys
t = int(sys.stdin.readline().rstrip())
for _ in range(t):
	s = int(sys.stdin.readline().rstrip())
	sol = s
	while s > 9:
		sol += s // 10
		s = s // 10 + s % 10
	print(sol)


def solution():
	T = int(input())
	answers = []
	for i in range(T):
		n = int(input())
		count = 0
		while n >= 10:
			remainder = n % 10
			n //= 10
			count += n * 10
			n += remainder
		count += n
		answers.append(count)
	for res in answers:
		print(res)
solution()


import math
from collections import deque
import sys
sys.setrecursionlimit(10 ** 4)

def Divisors(n):
	l = []
	i = 2
	while i <= math.sqrt(n):
		if n % i == 0:
			if n // i == i:
				l.append(i)
			else:
				l.append(i)
				l.append(n // i)
		i = i + 1
	return l

def SieveOfEratosthenes(n):
	l = []
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	for p in range(2, n + 1):
		if prime[p]:
			l.append(p)
	return l

def primeFactors(n):
	l = []
	while n % 2 == 0:
		l.append(2)
		n = n / 2
	for i in range(3, int(math.sqrt(n)) + 1, 2):
		while n % i == 0:
			l.append(i)
			n = n / i
	if n > 2:
		l.append(n)
	return l

def Factors(n):
	result = []
	for i in range(2, int(math.sqrt(n)) + 1):
		if n % i == 0:
			if i == n / i:
				result.append(i)
			else:
				result.append(i)
				result.append(n // i)
	result.append(1)
	result.append(n)
	return result

def maxSubArraySum(a):
	max_so_far = 0
	max_ending_here = 0
	size = len(a)
	for i in range(0, size):
		max_ending_here = max_ending_here + a[i]
		if max_so_far < abs(max_ending_here):
			max_so_far = max_ending_here
	return max_so_far

def longestsubarray(arr, n, k):
	current_count = 0
	max_count = 0
	for i in range(0, n, 1):
		if arr[i] % k != 0:
			current_count += 1
		else:
			current_count = 0
		max_count = max(current_count, max_count)
	return max_count

def main():
	n = int(input())
	s = 0
	if n < 10:
		print(n)
	else:
		while n > 9:
			s += n - n % 10
			n = n // 10 + n % 10
			if n < 10:
				s += n
				print(s)
				break
t = int(input())
for i in range(0, t):
	main()


for _ in range(int(input())):
	s = int(input())
	pwr = 10 ** 9
	ans = 0
	while s > 0:
		while s < pwr:
			pwr //= 10
		ans += pwr
		s -= pwr - pwr // 10
	print(ans)


t = int(input())
while t > 0:
	t = t - 1
	n = int(input())
	a = (n - 10) // 9
	a = a + 1
	print(n + a)


t = int(input())
for _ in range(t):
	n = int(input())
	ans = 0
	while True:
		len_ = len(str(n)) - 1
		ans += 10 ** len_
		n -= 10 ** len_
		n += 10 ** len_ // 10
		if n == 0:
			break
	print(ans)


import sys
input = sys.stdin.readline
for _ in range(int(input())):
	s = int(input())
	ans = 0
	while s > 9:
		k = s // 10 * 10
		ans += k
		s = s - k + s // 10
	print(ans + s)


t = int(input())
spend = 0
for i in range(t):
	s = int(input())
	if s >= 10:
		k = (s - 1) // 9
		print(s + k)
	else:
		print(s)


for q in range(int(input())):
	n = int(input())
	if n < 10:
		print(n)
	elif n % 9 == 0:
		print(n // 9 * 10 - 1)
	else:
		spend = n // 9 * 10
		n = n % 9
		spend += n
		print(spend)


for _ in range(int(input())):
	s = int(input())
	total = 0
	if s < 10:
		total = s
		print(total)
	else:
		while s >= 10:
			total += int(s / 10) * 10
			x = s - int(s / 10) * 10
			x += int(s / 10)
			s = x
		print(total + s)


cases = int(input())
case_list = [int(input()) for i in range(cases)]

def max_buy(moneylist):
	for i in moneylist:
		if i % 9 != 0:
			print(i + i // 9)
		else:
			print(i + i // 9 - 1)
max_buy(case_list)


import sys
t = int(input())
for t in range(t):
	res = n = int(input())
	while n >= 10:
		res += n // 10
		n = n // 10 + n % 10
	print(res)


import sys
import math
from collections import defaultdict as dd
mod = 1000000007
T = 1
T = int(sys.stdin.readline())
for _ in range(T):
	n = int(input())
	ans = 0
	while n >= 10:
		d = n // 10
		n -= 10 * d
		n += d
		ans += 10 * d
	ans += n
	print(ans)


from collections import defaultdict as dc
from heapq import *
import math
import bisect
from collections import deque as dq

def inp():
	p = int(input())
	return p

def line():
	p = list(map(int, input().split()))
	return p

def check(n, d, x):
	if x < 0:
		return 0
	return n >= x + math.ceil(d / (x + 1))

def unique(s):
	p = s
	ans = p
	z = p
	while z > 0:
		z = p // 10
		rem = p - z * 10
		p = z + rem
		ans = ans + z
	return ans

def form(h, n, x):
	if abs(h - n) % x == 0:
		return 1
	return 0
for _ in range(int(input())):
	s = int(input())
	print(unique(s))


def max_bit(x):
	cnt = 0
	ans = -1
	while x > 0:
		ans = x % 10
		x = x // 10
		cnt += 1
	return ans * pow(10, cnt - 1)
t = int(input())
for case in range(t):
	s = int(input())
	ans = 0
	while s >= 10:
		tmp = max_bit(s)
		s -= tmp
		ans += tmp
		s += tmp // 10
	ans += s
	print(ans)


for i in range(int(input())):
	number = int(input())
	cant = 0
	while number >= 10:
		cant += number // 10 * 10
		number = number % 10 + number // 10
	print(cant + number)


t = int(input())
for i in range(t):
	n = int(input())
	sum = n
	while n > 0:
		sum += n // 10
		tmp = n % 10
		n = n // 10
		if n == 0:
			break
		n += tmp
	print(sum)


import math
t = int(input())
for _ in range(t):
	n = int(input())
	sum = 0
	while n >= 10:
		prev = n
		n = math.floor(n / 10) + n % 10
		sum = sum + math.floor(prev / 10) * 10
	sum = sum + n
	print(sum)


for _ in range(int(input())):
	n = int(input())
	print(int(n // 0.9))


def f(n):
	sum = 0
	if n < 10:
		sum += n
	else:
		sum += n // 10 * 10 + f(n // 10 + n % 10)
	return sum
t = int(input())
for x in range(t):
	s = int(input())
	print(f(s))


t = int(input())
for i in range(t):
	n = int(input())
	if n % 9 == 0:
		c = n + n // 9 - 1
	elif n % 9 > 0:
		c = n + n // 9
	print(c)


t = int(input())
while t:
	n = input()
	k = int(n)
	length = len(n)
	spent = 0
	for i in range(length):
		spent += k - k % 10
		k = k // 10 + k % 10
	print(spent + k)
	t = t - 1


T = int(input())
for _ in range(T):
	s = int(input())
	spend = 0
	while s >= 10:
		x = s - s % 10
		s = s - x + x // 10
		spend += x
	spend += s
	print(spend)


for _ in range(int(input())):
	total_sum = 0
	s = int(input())
	while s != 0:
		ten = 10
		while s // ten != 0:
			ten *= 10
		ten //= 10
		total_sum += s // ten * ten
		nexus = s // ten * ten // 10
		s %= ten
		s += nexus
	print(total_sum)


t = int(input())
for i in range(t):
	n = input()
	l = list(n)
	s = 0
	while l:
		y = int(l[-1])
		l[-1] = '0'
		z = int(''.join(l))
		s += z
		if len(l) == 1:
			s += y
			break
		l.pop()
		l = str(int(''.join(l)) + y)
		l = list(l)
	print(s)


import sys
input = sys.stdin.readline
for i in range(int(input())):
	a = int(input())
	if a < 10:
		print(a)
	else:
		c = a
		while a >= 10:
			j = a // 10
			a -= 10 * j
			a += j
			c += j
		print(c)


for _ in range(int(input())):
	s = int(input())
	if s < 10:
		print(s)
	else:
		ans = 0
		while s // 10 > 0:
			x = s // 10
			s -= x * 9
			ans += x * 10
		print(ans + s)


import math
for _ in range(int(input())):
	n = int(input())
	print(int(math.ceil(n * 10 / 9) - 1))


t = int(input())
for i in range(t):
	n = int(input())
	nn = n
	while True:
		t = int(n / 10)
		if t == 0:
			break
		nn = nn + t
		n = t + n % 10
	print(nn)


t = int(input())
res = ''
for x in range(t):
	s = int(input())
	ans = 0
	while s >= 10:
		M = s // 10 * 10
		ans += M
		s = s - M + M // 10
	ans += s
	res += str(ans) + '\n'
print(res)


for a0 in range(int(input())):
	n = int(input())
	ct = 0
	while True:
		k = n // 10
		ct += n // 10 * 10
		n -= n // 10 * 10
		n += k
		if n < 10:
			ct += n
			break
	print(ct)


def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		spent = 0
		while n >= 10:
			k = n // 10 * 10
			r = n - k
			spent += k
			r += k // 10
			n = r
		if n > 0:
			spent += n
		print(spent)
	return
main()


from sys import stdin, stdout
t = int(input())
answer = []
for _ in range(t):
	s = int(input())
	ans = 0
	back = 10
	while back != 0:
		(back, rem) = divmod(s, 10)
		ans += s - rem
		s = back + rem
	ans += s
	answer.append(ans)
print(*answer, sep='\n')


t = int(input())
for x in range(t):
	ans = 0
	n = int(input())
	while True:
		k = n % 10
		n -= k
		ans += n
		n = n // 10 + k
		if n < 10:
			ans += n
			break
	print(ans)


for i in range(int(input())):
	a = int(input())
	k = 0
	while a >= 10:
		k = k + a // 10 * 10
		a = a % 10 + a // 10
	else:
		k = k + a
	print(k)


for _ in range(int(input())):
	n = int(input())
	ans = 0
	while n >= 10:
		temp1 = n // 10
		temp = temp1 * 10
		n -= temp
		n += temp1
		ans += temp
	ans += n
	print(ans)


T = int(input())
for _ in range(T):
	money = int(input())
	spent = 0
	while not money < 10:
		spent += money // 10 * 10
		money = money // 10 + money % 10
	print(spent + money)


t = int(input())
for i in range(t):
	n = input()
	a = int(n)
	l = len(n)
	x = 0
	while l > 0:
		x += a - a % 10
		a = a // 10 + a % 10
		l -= 1
	print(x + a)


from __future__ import division, print_function
from fractions import Fraction
import sys
import os
from io import BytesIO, IOBase
from bisect import bisect_right as br
from bisect import bisect
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
mod = 1000000007

def inp():
	return sys.stdin.readline().rstrip('\r\n')

def out(var):
	sys.stdout.write(str(var))

def lis():
	return list(map(int, inp().split()))

def stringlis():
	return list(map(str, inp().split()))

def sep():
	return map(int, inp().split())

def strsep():
	return map(str, inp().split())

def zerolist(n):
	return [0] * n

def nextline():
	out('\n')

def testcase(t):
	for p in range(t):
		solve()
from random import randint
from collections import defaultdict, deque

class Graph(object):

	def __init__(self, dic):
		self.dict = dic
		self.vertex = set()

	def addedge(self, a, b):
		if self.dict[a] == []:
			self.vertex.add(a)
		if b != None:
			self.dict[a].append(b)

	def con_com_util(self, i, unvisited, count, comp):
		for j in self.dict[i]:
			if j in unvisited:
				unvisited.remove(j)
				comp[count].append(j)
				comp = self.con_com_util(j, unvisited, count, comp)
		return comp

	def conn_components(self):
		unvisited = self.vertex.copy()
		count = 0
		comp = defaultdict(list)
		while unvisited:
			i = unvisited.pop()
			comp[count].append(i)
			comp = self.con_com_util(i, unvisited, count, comp)
			count += 1
		return (count, comp)

def countSetBits(n):
	count = 0
	while n:
		n &= n - 1
		count += 1
	return count

def solve():
	n = int(inp())
	t = n
	ans = 0
	while t >= 10:
		k = t // 10
		ans += 10 * k
		t -= 9 * k
	ans += t
	print(ans)
testcase(int(inp()))


from sys import stdin
input = stdin.readline

def getAns(s):
	if s < 10:
		return s
	else:
		return s + (s - 10) // 9 + 1
t = int(input())
for _ in range(t):
	s = int(input())
	print(getAns(s))


t = int(input())
for q in range(t):
	s = int(input())
	ans = 0
	while s >= 10:
		x = s % 10
		y = s // 10
		s = x + y
		ans += y * 10
	ans += s
	print(ans)


t = int(input())
for _ in range(t):
	n = int(input())
	answer = 0
	while n > 9:
		answer += n // 10 * 10
		n = n % 10 + n // 10
	print(answer + n)


test = int(input())
while test != 0:
	n = int(input())
	if int(n / 10) == 0:
		print(n)
	else:
		cost = 0
		while n > 9:
			cost += 10 * (n // 10)
			n = n % 10 + n // 10
		print(cost + n)
	test -= 1


import math
for _ in range(int(input())):
	n = int(input())
	print(int(n // 0.9))


def value(n):
	l1 = [int(x) for x in n]
	e = len(l1) - 1
	r = l1[0] * 10 ** e
	return (r, r // 10)
t = int(input())
while t:
	n = input()
	z = int(n)
	l = len(n)
	ans = 0
	while n:
		n = str(n)
		(sub, xtra) = value(n)
		n = int(n)
		n -= sub
		n += xtra
		ans += xtra
	t = t - 1
	print(z + ans)


import sys
import math
input = sys.stdin.buffer.readline

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()
for _ in range(int(input())):
	n = int(input())
	ans = 0
	while n > 0:
		if n < 10:
			ans += n
			break
		else:
			q = n // 10
			r = n % 10
			ans += 10 * q
			n = q + r
	print(ans)


import sys

def input():
	a = sys.stdin.readline()
	if a[-1] == '\n':
		a = a[:-1]
	return a

def print(*argv):
	n = len(argv)
	for i in range(n):
		if i == n - 1:
			sys.stdout.write(str(argv[i]) + '\n')
		else:
			sys.stdout.write(str(argv[i]) + ' ')

def lcm(x, y):
	from math import gcd
	return x * y / gcd(x, y)

def comb(lst, x):
	from itertools import combination as c
	return list(comb(lst, x))

def solve(n):
	cnt = n
	while n >= 10:
		if n >= 10:
			val = n // 10
			cnt += val
			n = val + n % 10
		else:
			cnt += n % 10
			n -= n % 10
	return cnt
for _ in range(int(input())):
	n = int(input())
	print(solve(n))


import sys

def solve(k):
	s = 0
	while k >= 10:
		t = k // 10
		s += t * 10
		k = t + k % 10
	return s + k

def main():
	res = ''
	input = sys.stdin.readline
	print = sys.stdout.write
	t = int(input())
	for _ in range(t):
		n = int(input())
		res += str(solve(n)) + '\n'
	print(res)
main()


for _ in range(int(input())):
	s = input()
	a = True
	cnt = 0
	while a == True and len(s) != 1:
		x = s[:-1]
		y = s[-1]
		cnt += int(x + '0')
		s = str(int(x) + int(y))
		if len(s) == 1:
			a = False
	cnt += int(s)
	print(cnt)


T = int(input())
for t in range(T):
	s = int(input())
	ans = s
	rem = s
	while rem >= 10:
		k = rem // 10
		ans += k
		rem %= 10
		rem += k
	print(ans)


n = int(input())
i = 0
while i < n:
	x = int(input())
	sum = x
	while x >= 0.1:
		x = x - 0.9 * x
		sum = sum + x
	print(int(sum))
	i = i + 1


cases = int(input())

def foo(b):
	if b < 10:
		return b
	else:
		newb = b // 10 * 10
		return int(newb) + foo(b - newb + newb // 10)
for i in range(cases):
	num = int(input())
	print(foo(num))


t = int(input())
ans = []
for i in range(t):
	s = int(input())
	count = 0
	while s >= 10:
		count += s - s % 10
		s = s // 10 + s % 10
	ans.append(count + s)
for i in ans:
	print(i)


def solve(n):
	if n == 1:
		return 1
	ans = 0
	pw = 10 ** 9
	while n > 0:
		while n < pw:
			pw = pw // 10
		ans += pw
		n -= pw - pw // 10
	return ans
t = int(input())
while t:
	n = int(input())
	print(solve(n))
	t -= 1


for _ in range(int(input())):
	n = int(input())
	a = n
	while n >= 10:
		a += n // 10
		n = n // 10 + n % 10
	print(a)


for i in range(int(input())):
	s = int(input())
	sm = 0
	while s > 9:
		sm += s // 10 * 10
		s = s // 10 + s % 10
	print(sm + s)


import sys
import math
import heapq
import bisect
import re
from collections import deque
from decimal import *
from fractions import gcd

def YES_NO(flag):
	if flag:
		print('YES')
	else:
		print('NO')

def main():
	n = int(input())
	res = 0
	while n:
		q = 1
		for i in range(1, len(str(n))):
			q *= 10
		res += n // q * q
		n -= n // q * q - n // q * q // 10
	print(res)
for i in range(int(input())):
	main()


for _ in range(int(input())):
	n = int(input())
	count = 0
	if n % 9:
		count = 10 * (n // 9) + n % 9 if n > 9 else n
	else:
		count = count = 10 * (n // 9) + n % 9 - 1 if n > 9 else n
	print(count)


t = int(input())
for _ in range(t):
	ans = 0
	s = int(input())
	while s >= 10:
		x = s // 10 * 10
		ans = ans + x
		s = s - x
		cashback = x // 10
		s = s + cashback
	ans = ans + s
	print(ans)


t = int(input())
for h in range(t):
	n = int(input())
	ans = 0
	while n >= 10:
		b = n - n % 10
		ans += b
		n = n - b + b // 10
	ans += n
	print(ans)


import sys
from math import sqrt
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())

def s(d):
	dis = 1 + 4 * 2 * 3 * d
	ds = sqrt(dis)
	return (-1 + ds) / 6

def main():
	c = inp()
	b = [10 ** i for i in range(10, -1, -1)]
	for i in range(c):
		a = inp()
		s = 0
		while a != 0:
			for bc in b:
				if a - bc >= 0:
					s += bc
					c = bc // 10
					a = a - bc + c
					break
		print(s)
main()


def main():
	s = int(input())
	a = 0
	while s > 9:
		x = s // 10
		s -= x * 10
		a += x * 10
		s += x
	print(a + s)
for _ in range(int(input())):
	main()


def fun(x):
	if x < 10:
		return 0
	res = x // 10 + fun(x // 10 + x % 10)
	return res
t = int(input())
while t > 0:
	t = t - 1
	x = int(input())
	print(x + fun(x))


t = int(input())
for i in range(t):
	s = int(input())
	h = 0
	while s != 0:
		p = int(s / 10) * 10
		s = s - p + int(s / 10)
		h = h + p
		if s < 10:
			break
	h = h + s
	print(h)


n = int(input())
for i in range(n):
	m = int(input())
	print(m + (m - 10) // 9 + 1)


t = int(input())
for i in range(t):
	n = int(input())
	total = 0
	while n != 0:
		cashback = n // 10
		total += cashback * 10
		n = cashback + n - cashback * 10
		if n < 10:
			total += n
			n = 0
	print(total)


import sys
input = lambda : sys.stdin.readline()
int_arr = lambda : list(map(int, input().split()))
str_arr = lambda : list(map(str, input().split()))
get_str = lambda : map(str, input().split())
get_int = lambda : map(int, input().split())
get_flo = lambda : map(float, input().split())
mod = 1000000007

def solve(n):
	temp = n
	c = 0
	while n > 9:
		q = n // 10
		c += q
		n = n % 10 + q
	print(temp + c)
for _ in range(int(input())):
	n = int(input())
	solve(n)


from sys import stdin as s
t = int(s.readline())
for s in map(int, s.readlines()):
	total = 0
	while s >= 10:
		z = s // 10
		x = s % 10
		total += z * 10
		s = x + z
	total += s
	print(total)


for _ in range(int(input())):
	n = int(input())
	kk = str(n)
	ans = 0
	c = 0
	while True:
		if len(kk) == 1:
			break
		ans += int(kk[:-1] + '0')
		n = int(kk[:-1]) + int(kk[-1])
		kk = str(n)
	ans += int(kk)
	print(ans)


for _ in range(int(input())):
	s = int(input())
	a = 0
	p = 0
	while s >= 10:
		a = s // 10 * 10
		p += a
		s -= a
		s += a // 10
	print(p + s)


j = int(input())
for i in range(j):
	s = int(input())
	max_spend = s
	while True:
		div = s // 10
		max_spend += div
		s = s - div * 10 + div
		if div < 1:
			break
	print(max_spend)


n = int(input())
while n:
	x = int(input())
	print(x + int((x - 1) / 9))
	n -= 1


t = int(input())
for num in range(0, t):
	x = int(input())
	a = x
	b = 0
	while a > 10:
		b = a % 10
		a = a // 10
		x = x + a
		a = a + b
		b = 0
	if a == 10:
		x = x + 1
	if a == 1:
		x = 1
	print(x)


t = int(input())
for i in range(0, t):
	n = int(input())
	count = 0
	while n >= 10:
		count += 10 * (n // 10)
		n = n - 10 * (n // 10) + 10 * (n // 10) // 10
	count += n
	print(count)


t = int(input())
output = []
for _ in range(t):
	n = int(input())
	spent = 0
	while n >= 10:
		spent += n // 10 * 10
		cash_back = n // 10 * 10 // 10
		n -= n // 10 * 10
		n += cash_back
	spent += n
	output.append(spent)
for i in output:
	print(i)


for _ in range(int(input())):
	s = int(input())
	gastou = s
	while s >= 10:
		gastou += s // 10
		s = s - s // 10 * 10 + s // 10
	print(gastou)


t = int(input())

def f(n):
	if n < 10:
		return n
	tmp = n - n // 10 * 10
	return n - tmp + f(tmp + (n - tmp) // 10)
for i in range(t):
	s = int(input())
	print(f(s))


class Solution:

	def solve(self, burles):
		ans = 0
		while burles > 0:
			maxPowerOf10 = 10 ** 9
			while burles < maxPowerOf10:
				maxPowerOf10 //= 10
			ans += maxPowerOf10
			burles -= maxPowerOf10 - maxPowerOf10 // 10
		return ans
sol = Solution()
t = int(input().strip())
for i in range(t):
	burles = int(input().strip())
	print(sol.solve(burles))


inp = int(input())
l = list()
for i in range(0, inp):
	l.append(int(input()))
for i in l:
	x = i
	ref = x
	check = '@'
	sol = False
	while sol != True:
		q = ref / 10
		if check == int(q):
			print(x + check)
			sol = True
			continue
		if q > 0:
			check = int(q)
			ref = int(q) + x


def solve(n):
	ans = 0
	while n >= 10:
		ans += n - n % 10
		n = n // 10 + n % 10
	return ans + n

def main():
	tc = int(input())
	for _ in range(tc):
		n = int(input())
		print(solve(n))
main()


for a in range(int(input())):
	money = int(input())
	(cash, ost) = divmod(money, 10)
	money += cash
	while cash > 0:
		cash += ost
		(cash, ost) = divmod(cash, 10)
		money += cash
	print(money)


t = int(input())
for _ in range(t):
	s = int(input())
	ans = s // 9 * 10 + s % 9
	if s % 9 == 0:
		ans -= 1
	print(ans)


t = int(input())
for i in range(t):
	s = int(input())
	print((10 * s - 1) // 9)


for _ in range(int(input())):
	solon = int(input())
	cothe = solon
	while solon >= 10:
		cothe += int(solon / 10)
		solon = solon % 10 + int(solon / 10)
	print(cothe)


from functools import reduce
import math

def spending(money):
	b = int(str(money)[0])
	return int(b * math.pow(10, len(str(money)) - 1))

def cashback(spend):
	return math.floor(spend / 10)
t = int(input())
for i in range(t):
	init = int(input())
	m = init
	while init > 0:
		cash = cashback(spending(init))
		init -= spending(init)
		init += cash
		m += cash
	m += init
	print(m)


k = int(input())
for i in range(k):
	n = int(input())
	ans = n
	for i in range(len(str(n - 1))):
		t = n // 10
		ans += t
		n -= t * 10
		n += t
	print(ans)


T = int(input())
for i in range(T):
	N = int(input())
	print(int(N // 0.9))


for _ in range(int(input())):
	n = int(input())
	T = n
	c = 0
	while n >= 1000000000:
		n = n - 1000000000
		n += 100000000
		T += 100000000
	while n >= 100000000:
		n = n - 100000000
		n += 10000000
		T += 10000000
	while n >= 10000000:
		n = n - 10000000
		n += 1000000
		T += 1000000
	while n >= 1000000:
		n = n - 1000000
		n += 100000
		T += 100000
	while n >= 100000:
		n = n - 100000
		n += 10000
		T += 10000
	while n >= 10000:
		n = n - 10000
		n += 1000
		T += 1000
	while n >= 1000:
		n = n - 1000
		n += 100
		T += 100
	while n >= 100:
		n = n - 100
		n += 10
		T += 10
	while n >= 10:
		n = n - 10
		n += 1
		T += 1
	print(T)


t = int(input())
while t:
	t -= 1
	s = int(input())
	ans = 0
	while s >= 10:
		ans += s // 10 * 10
		s = s // 10 + s % 10
	print(ans + s)


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	s = 0
	while n != 0:
		ld = n % 10
		s += n // 10 * 10
		intr = n // 10 + ld
		n = intr
		if n < 10:
			s += n
			break
	print(s)


def solve(s):
	spent = 0
	while s >= 10:
		x = s // 10
		spent += 10 * x
		s -= 9 * x
	return spent + s
for T in range(int(input())):
	print(solve(int(input())))


for _ in range(int(input())):
	n = int(input())
	res = n
	while True:
		(n, b) = divmod(n, 10)
		if n > 0:
			res += n
			n += b
		else:
			break
	print(res)


numTestcases = int(input())
for i in range(numTestcases):
	cTest = int(input())
	spent = 0
	while cTest > 9:
		cSpent = cTest - cTest % 10
		spent += cSpent
		cTest -= cSpent
		cTest += cSpent / 10
	spent += cTest
	print(str(int(spent)) + '\n')


for i in range(int(input())):
	q = input()
	l = 0
	while int(q) // 10 != 0:
		l += int(q[:-1]) * 10
		q = str(int(q[:-1]) + int(q[-1]))
	print(l + int(q))


t = int(input())
for i in range(t):
	num = int(input())
	sum1 = 0
	while num >= 10:
		t = num // 10
		sum1 += t * 10
		num = num % 10 + t
	sum1 += num
	print(sum1)


import math
from decimal import Decimal
import heapq
import copy
import heapq
from collections import deque

def na():
	n = int(input())
	b = [int(x) for x in input().split()]
	return (n, b)

def nab():
	n = int(input())
	b = [int(x) for x in input().split()]
	c = [int(x) for x in input().split()]
	return (n, b, c)

def dv():
	(n, m) = map(int, input().split())
	return (n, m)

def da():
	(n, m) = map(int, input().split())
	a = list(map(int, input().split()))
	return (n, m, a)

def dva():
	(n, m) = map(int, input().split())
	a = [int(x) for x in input().split()]
	b = [int(x) for x in input().split()]
	return (n, m, b)

def eratosthenes(n):
	sieve = list(range(n + 1))
	for i in sieve:
		if i > 1:
			for j in range(i + i, len(sieve), i):
				sieve[j] = 0
	return sorted(set(sieve))

def lol(lst, k):
	k = k % len(lst)
	ret = [0] * len(lst)
	for i in range(len(lst)):
		if i + k < len(lst) and i + k >= 0:
			ret[i] = lst[i + k]
		if i + k >= len(lst):
			ret[i] = lst[i + k - len(lst)]
		if i + k < 0:
			ret[i] = lst[i + k + len(lst)]
	return ret

def nm():
	n = int(input())
	b = [int(x) for x in input().split()]
	m = int(input())
	c = [int(x) for x in input().split()]
	return (n, b, m, c)

def dvs():
	n = int(input())
	m = int(input())
	return (n, m)

def fact(n):
	tc = []
	ans = {}
	d = 2
	while d * d <= n:
		if n % d == 0:
			tc.append(d)
			n //= d
		else:
			d += 1
	if n > 1:
		tc.append(n)
	for i in tc:
		ans[i] = ans.get(i, 0) + 1
	return ans
for i in range(int(input())):
	s = int(input())
	ans = 0
	while s >= 10:
		d = s // 10
		ans += d * 10
		s += d
		s -= d * 10
	ans += s
	print(ans)


n = int(input())
ans = []
for i in range(n):
	x = int(input())
	b = x
	a = 0
	while b >= 10:
		if len(str(b)) > 2:
			m = b - int(str(b)[2:])
			a += m
			b = b - m + m // 10
		else:
			a += 10
			b = b - 10 + 1
	a += b
	ans.append(a)
for i in ans:
	print(i)


import sys
input = sys.stdin.readline

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def primefs(n):
	primes = {}
	while n % 2 == 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	while x != link[x]:
		x = link[x]
	return x

def union(x, y, size, link):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime
MAXN = int(1000000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i

def factoriazation(x):
	ret = {}
	while x != 1:
		ret[spf[x]] = ret.get(spf[x], 0) + 1
		x = x // spf[x]
	return ret

def int_array():
	return list(map(int, input().strip().split()))

def str_array():
	return input().strip().split()
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
for _ in range(int(input())):
	n = int(input())
	ans = 0
	while n > 0:
		if n < 10:
			ans += n
			break
		else:
			q = n // 10
			r = n % 10
			ans += q * 10
			n = q + r
	print(ans)


t = int(input())
while t > 0:
	n = int(input())
	sum = 0
	while True:
		c = n // 10
		r = n % 10
		r += c
		if r >= 10:
			n = r
			sum += 10 * c
		else:
			sum += r + 10 * c
			break
	print(sum)
	t -= 1


for _ in range(int(input())):
	s = int(input())
	ttot = s
	while s > 9:
		t = s // 10
		s -= t * 9
		ttot += t
	print(ttot)


t = int(input())
for _ in range(t):
	s = int(input())
	k = 0
	k += s // 9 * 10
	k += s % 9
	if s % 9 == 0:
		print(k - 1)
	else:
		print(k)


import math
t = int(input())
while t > 0:
	s = int(input())
	if s % 9 == 0:
		v = s // 9
		d = math.floor(v)
		s = s + d
		print(s - 1)
	elif s > 9:
		v = s // 9
		d = math.floor(v)
		s = s + d
		print(s)
	else:
		print(s)
	t -= 1


a = int(input())
for _ in range(a):
	sum1 = 0
	x = int(input())
	while x > 9:
		r = x % 10
		s = x // 10
		sum1 += s * 10
		x = r + s
	r = x % 10
	sum1 += r
	print(sum1)


t = int(input())
for _ in range(t):
	n = int(input())
	cnt = 0
	while True:
		s = str(n)
		if len(s) == 1:
			cnt += n
			break
		cnt1 = int(s[0]) * 10 ** (len(s) - 1)
		s = s[1:]
		cnt += cnt1
		n = int(s)
		n += cnt1 // 10
	print(cnt)


T = int(input())
t = 0
while t < T:
	s = int(input())
	soldisp = 0
	x = 0
	while True:
		x = s // 10 * 10
		soldisp = soldisp + x
		s = s - x * 9 / 10
		if x < 10:
			soldisp = soldisp + s
			xsomma = int(soldisp)
			break
	print(xsomma)
	t = t + 1


for _ in range(int(input())):
	n = int(input())
	z = n
	while n > 9:
		z += n // 10
		n = n % 10 + n // 10
	print(z)


t = int(input())
for f in range(t):
	s = int(input())
	rez = 0
	while s >= 10:
		rez += s // 10 * 10
		s = s % 10 + s // 10
	print(rez + s)


t = int(input())
import math
for i in range(t):
	n = int(input())
	s = 0
	r = 0
	if n < 10:
		print(n)
	else:
		while n >= 10:
			r = n % 10
			n = int(n / 10)
			n = n * 10
			m = int(n / 10)
			s = s + n
			n = m + r
			if n < 10:
				s = s + n
				break
		print(s)


import sys
import math
import bisect
import itertools
import random
import re

def solve(n):
	ans = 0
	while n:
		if n < 10:
			ans += n
			n = 0
		else:
			ans += n // 10 * 10
			n = n // 10 + n % 10
	return ans

def main():
	for _ in range(int(input())):
		n = int(input())
		print(solve(n))
main()


import sys
import math
import itertools
import functools
import collections
import operator

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def revn(n):
	return str(n)[::-1]

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=2):
	r = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				r.append(i)
			else:
				r.extend([i, n // i])
	return r

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def prime(n):
	if n == 2:
		return True
	if n % 2 == 0 or n <= 1:
		return False
	sqr = int(math.sqrt(n)) + 1
	for d in range(3, sqr, 2):
		if n % d == 0:
			return False
	return True

def convn(number, base):
	newnumber = 0
	while number > 0:
		newnumber += number % base
		number //= base
	return newnumber

def cdiv(n, k):
	return n // k + (n % k != 0)
t = ii()
for _ in range(t):
	n = ii()
	ans = n
	while n > 9:
		c = n // 10
		ans += c
		n = c + n % 10
	print(ans)


import math
for _ in range(int(input())):
	n = int(input())
	cnt = 0
	while n >= 10:
		cnt += n // 10 * 10
		n = n // 10 + n % 10
	print(cnt + n)


for i in range(int(input())):
	a = int(input())
	o = True
	sum = 0
	div = a
	rem = 0
	while o == True:
		sum += int(div / 10) * 10
		rem = div % 10
		div = int(div / 10) + rem
		if div < 10:
			o = False
	sum += div
	print(sum)


import math
import sys
t = int(input())
for _ in range(t):
	s = int(input())
	total = 0
	while s >= 10:
		total += int(s - s % 10)
		s = s % 10 + int(s / 10)
	total += s
	print(total)


for _ in range(int(input())):
	bur = int(input())
	_len = len(str(bur))
	div = 10 ** _len
	spent = 0
	while bur > 0:
		if bur >= div:
			bur = bur - div + div // 10
			spent += div
		else:
			div //= 10
	else:
		spent += bur
	print(spent)


t = int(input())
for test in range(t):
	n = int(input())
	output = 0
	while n >= 10:
		x = n - n % 10
		n -= x
		n += round(x / 10)
		output += x
	output += n
	print(output)


t = int(input())
for _ in range(t):
	n = int(input())
	result = 0
	while n >= 10:
		gain = n // 10
		remaining = n % 10
		n = int(remaining + gain)
		result = result + gain * 10
	result += n
	print(int(result))


def f(v):
	if v < 10:
		return v
	return v - v % 10 + f(v // 10 + v % 10)
for _ in range(int(input())):
	v = int(input())
	print(f(v))


t = int(input())
for item in range(t):
	n = int(input())
	used_amount = 0
	while n >= 10:
		r = n % 10
		used_amount += n - r
		n = n // 10
		n = n + r
	used_amount += n
	print(used_amount)


def f(n):
	return 10 * (n // 10)
t = int(input())
for you in range(t):
	n = int(input())
	sumnow = 0
	if n < 10:
		sumnow += n
	while f(n) != 0:
		sumnow += f(n)
		n = n % 10 + n // 10
		if n < 10:
			sumnow += n
	print(sumnow)


for _ in range(int(input())):
	n = int(input())
	total = 0
	while True:
		total += n - n % 10
		rem = n // 10
		n -= n - n % 10
		n += rem
		if n < 10:
			break
	total += n
	print(total)


def max_burles():
	x = int(input())
	if x % 9 == 0:
		print(x // 9 * 10 - 1)
	else:
		print(x // 9 * 10 + x % 9)
t = int(input())
for i in range(0, t):
	max_burles()


for o in range(int(input())):
	n = int(input())
	ans = n
	while n >= 10:
		ans += n // 10
		n = int(n / 10) + n % 10
	print(ans)


n = int(input())
for i in range(n):
	a = int(input())
	k = a - a % 10
	while a >= 10:
		a = a // 10 + a % 10
		k += a - a % 10
	print(k + a)


for _ in range(int(input())):
	n = int(input())
	s = n
	if n > 9:
		while n != 0:
			t = n // 10
			r = n % 10
			if t == 0:
				n = 0
			else:
				n = t + r
			s += t
	print(s)


from math import *
for _ in range(int(input())):
	s = int(input())
	temp = ceil(s / 9) - 1
	print(s + temp)


T = int(input())
while T > 0:
	T -= 1
	N = int(input())
	if N % 9 == 0:
		temp = N // 9
		print(9 + 10 * (temp - 1))
	else:
		temp = N % 9
		ans = 10 * (N // 9)
		ans += temp
		print(ans)


T = int(input())
for cs in range(T):
	n = int(input())
	a = 0
	while n >= 10:
		(a, n) = (a + n - n % 10, n // 10 + n % 10)
	a += n
	print(a)


import sys

def sol():
	s = int(sys.stdin.readline())
	ans = 0
	while s > 0:
		if s >= 10:
			ans += 10 * (s // 10)
			s -= 9 * (s // 10)
		else:
			ans += s
			s = 0
	return ans
for _ in range(int(sys.stdin.readline())):
	print(sol())


for t in range(int(input())):
	x = int(input())
	if x < 10:
		print(x)
	else:
		tot = 0
		rem = x % 10
		cnt = x - rem
		back = (x - rem) // 10
		x = rem + back
		tot += cnt
		while x >= 10:
			rem = x % 10
			cnt = x - rem
			back = (x - rem) // 10
			x = rem + back
			tot += cnt
		if x > 0:
			tot += x
		print(tot)


import math
t = int(input())
for _ in range(t):
	n = int(input())
	q = n
	ans = 0
	while n > 9:
		r = n % 10
		q = n // 10
		n = q + r
		ans = ans + q * 10
	ans = ans + n
	print(ans)


def yo(n):
	x = n // 10
	m = n + x
	while abs(x - m // 10) > 1e-07:
		x = m // 10
		m = n + x
	return m
t = int(input())
for i in range(t):
	print(yo(int(input())))


for _ in range(int(input().strip())):
	n = int(input().strip())
	if n % 9 == 0:
		print(int(n / 0.9) - 1)
	else:
		print(int(n / 0.9))


for _ in range(int(input())):
	n = int(input())
	cost = 0
	while n > 9:
		cost += n - n % 10
		k = n % 10
		n = n // 10 + k
	cost += n
	print(cost)


t = int(input())
for i in range(t):
	n = int(input())
	if n % 9 == 0:
		num = int(n / 9)
		x = n % 9
		result = num * 10 - 1
		print(result)
	else:
		num = int(n / 9)
		x = n % 9
		result = num * 10 + x
		print(result)


for _ in range(int(input())):
	n = int(input())
	temp = n
	cnt = 0
	while n >= 10:
		s = str(n)
		k = int(s[0]) * 10 ** (len(s) - 2)
		s = s[1:]
		n = int(s) + k
		cnt += k
	print(temp + cnt)


t = int(input())
while t != 0:
	n = int(input())
	total = n
	while n != 0:
		rem = n // 10
		if rem > 0:
			total += rem
			n = rem + n % 10
		else:
			break
	print(total)
	t -= 1


def ii():
	int(input())

def si():
	input()

def ili():
	list(map(int, input().strip().split()))

def sli():
	list(input().strip().split())
for _ in range(int(input())):
	s = int(input())
	if s < 10:
		print(s)
	elif s is 10:
		print(11)
	else:
		spnd = 0
		bt = 0
		while s >= 10:
			bt = 10 * (s // 10)
			spnd += bt
			s = s // 10 + (s - bt)
		spnd += s
		print(spnd)


a = int(input())
for k in range(a):
	b = int(input())
	if b % 9 != 0:
		print(b + b // 9)
	else:
		print(b + b // 9 - 1)


m = int(input())
for test in range(m):
	x = int(input())
	print(int(x * (int(''.join(['1'] * (len(str(x)) + 1))) / pow(10, len(str(x))))))


for i in range(0, int(input())):
	a = int(input())
	s = 0
	p = a
	while a > 10:
		s += a // 10
		b = a // 10
		a = a % 10
		a += b
	print(s + a // 10 + p)


for u in range(int(input())):
	n = int(input())
	z = n // 0.9
	print(int(z))


t = int(input())
while t != 0:
	t -= 1
	n = int(input())
	sum = 0
	while n >= 10:
		x = n % 10
		sum += n // 10 * 10
		n //= 10
		n += x
	sum += n
	print(sum)


def cal(s):
	ans = 0
	while s >= 10:
		num = s // 10
		s = s // 10 + s % 10
		ans += num * 10
	return ans + s
t = eval(input())
for case in range(t):
	s = eval(input())
	res = cal(s)
	print(res)


t = int(input())

def cal(n):
	if n < 10:
		return n
	return cal(n % 10 + n // 10) + n - n % 10
while t:
	t -= 1
	n = int(input())
	print(cal(n))


t = int(input())
for i in range(t):
	s = int(input())
	c = s
	while s >= 10:
		b = s // 10
		c += b
		s = b + s % 10
	print(c)


from decimal import Decimal
x = Decimal('1.11111111111111111111111111')
t = int(input())
for i in range(t):
	s = Decimal(input())
	res = int(x * s)
	print(res)


for i in range(int(input())):
	s = int(input())
	ans = 0
	while s > 0:
		ans += 10 * (s // 10)
		cashback = s // 10
		s = s % 10 + s // 10
		if s < 10:
			ans += s
			break
	print(ans)


import math

def ans(a):
	x = a
	r = 0
	count = 0
	sum = 0
	while a >= 10:
		r = a // 10
		sum = a // 10 * 10
		b = a - sum + r
		count += sum
		a = b
	print(count + a)
t = int(input())
while t > 0:
	a = int(input())
	ans(a)
	t -= 1


t = int(input())
while t > 0:
	n = int(input())
	sum = 0
	while n > 9:
		save = n % 10
		spend = n // 10 * 10
		cb = n // 10
		sum += spend
		n = save + cb
	print(n + sum)
	t -= 1


for tin in range(int(input())):
	x = int(input())
	if x % 9 == 0:
		print(x + x // 9 - 1)
	else:
		print(x + x // 9)


t = int(input())
for i in range(t):
	ss = 0
	n = int(input())
	while n > 9:
		s = n - n % 10
		ss = ss + s
		n = s / 10 + n % 10
	ss = ss + n
	print(int(ss))


t = int(input())
for i in range(t):
	n = int(input())
	count = n
	while n > 9:
		x = n // 10
		count += x
		x += n % 10
		n = x
	print(count)


for case in range(int(input())):
	s = int(input())
	total = s
	while s // 10:
		rest = s % 10
		s //= 10
		total += s
		s += rest
	print(total)


n = int(input())
for x in range(n):
	t = int(input())
	print(int(t * 1.1111111111111))


import math
t = int(input())
for w in range(t):
	n = int(input())
	b = 0
	while n >= 10:
		b += n - n % 10
		n = n // 10 + n % 10
	b += n
	print(b)


n = int(input())
for i in range(n):
	x = int(input())
	sum = 0
	while x >= 10:
		sum += x // 10 * 10
		x = x - x // 10 * 10 + x // 10
	print(sum + x)


for i in range(int(input())):
	n = int(input())
	sum = n
	while n >= 10:
		sum += n // 10
		n = n // 10 + n % 10
	print(sum)


t = int(input())
if not 1 <= t <= 10 ** 4:
	quit()
for i in range(t):
	s = int(input())
	if not 1 <= s <= 10 ** 9:
		quit()
	s2 = s
	s3 = 0
	s4 = 0
	s5 = s
	while s2 >= 10:
		s = s + s2 // 10
		s2 = s2 % 10 + s2 // 10
	print(s)


from sys import stdin, stdout
from collections import Counter
from itertools import permutations
import bisect
import math
I = lambda : map(int, stdin.readline().split())
I1 = lambda : stdin.readline()
for _ in range(int(I1())):
	s = int(I1())
	burles = 0
	while s > 0:
		l = len(str(s))
		x = pow(10, l - 1)
		s -= x
		s += x // 10
		burles += x
	print(burles)


T = int(input())
for _ in range(T):
	num = int(input())
	count = num
	while num >= 10:
		temp = int(num / 10)
		count = count + temp
		num = num % 10
		num = num + temp
	print(count)


t = int(input())
for _ in range(0, t):
	s = int(input())
	c = 0
	x = s
	while x != 0:
		r = x % 10
		q = x // 10
		if q == 0:
			x = 0
			c += r
		else:
			x = q + r
			c += q * 10
	print(c)


test_cases = int(input())

def optimal(n):
	count = n // 9
	if n % 9 == 0:
		return n + count - 1
	else:
		return n + count
for i in range(test_cases):
	print(optimal(int(input())))


t = int(input())
for p in range(t):
	n = int(input())
	if n < 10:
		print(n)
	else:
		n = n - 10
		x = n % 9
		n = n // 9
		n = n * 10
		n = n + x + 11
		print(n)


for _ in range(int(input())):
	p = int(input())
	ans = p // 0.9
	print(int(ans))


t = int(input())

def subtract():
	ans = 0
	s = int(input())
	while s >= 10:
		ans += int(s / 10) * 10
		s += -int(s / 10) * 10 + int(s / 10)
	ans += s
	return ans
for _ in range(t):
	print(subtract())


for _ in range(int(input())):
	s = int(input())
	if s >= 10:
		s -= 10
		res = s // 9 + s + 1 + 10
	else:
		res = s
	print(res)


import math
import re
import itertools
import copy

def input_linear(lamb=lambda x: int(x), seperator=' '):
	return map(lamb, input().split(seperator))

def input_array(lamb=lambda x: int(x), seperator=' '):
	return list(map(lamb, input().split(seperator)))

def input_matrix(rows, lamb=lambda x: int(x), seperator=' '):
	tmp_matrix = []
	for i in range(rows):
		tmp_matrix.append(input_array(lamb, seperator))
	return tmp_matrix

def input_graph_al_pair(vertices, lines, lamb=lambda x: int(x), seperator=' ', directional=False, remove_dup=False):
	temp_matrix = [x[:] for x in [[]] * vertices]
	if not directional:
		if not remove_dup:
			for i in range(lines):
				(ina, inb) = input_linear(lamb, seperator)
				temp_matrix[ina].append(inb)
				temp_matrix[inb].append(ina)
		else:
			for i in range(lines):
				(ina, inb) = input_linear(lamb, seperator)
				if inb not in temp_matrix[ina]:
					temp_matrix[ina].append(inb)
				if ina not in temp_matrix[inb]:
					temp_matrix[inb].append(ina)
		return temp_matrix
	else:
		if not remove_dup:
			for i in range(lines):
				(ina, inb) = input_linear(lamb, seperator)
				temp_matrix[ina].append(inb)
		else:
			for i in range(lines):
				(ina, inb) = input_linear(lamb, seperator)
				if inb not in temp_matrix[ina]:
					temp_matrix[ina].append(inb)
		return temp_matrix
for t in range(int(input())):
	n = int(input())
	cnt = 0
	while n > 9:
		cnt += n - n % 10
		n += -(n - n % 10) + (n - n % 10) // 10
	print(cnt + n)


for _ in range(int(input())):
	a = int(input())
	b = a
	while a >= 10:
		b += int(a / 10)
		a = a % 10 + int(a / 10)
	print(b)


t = int(input())
for _ in range(t):
	s = int(input())
	res = 0
	while s >= 10:
		re = s // 10
		res += s - s % 10
		s = s % 10
		s = s + re
	res += s
	print(res)


from sys import stdin
for _ in range(int(stdin.readline())):
	s = int(stdin.readline())
	temp = s
	count = 0
	while temp:
		rem = s % 10
		s = int(s / 10)
		count = count + s * 10
		s = s + rem
		temp = temp / 10
	print(count + rem)


import sys, math
input = sys.stdin.readline

def inp():
	return int(input())

def inlt():
	return list(map(int, input().split()))

def insr():
	s = input()
	return s[:len(s) - 1]

def invr():
	return map(int, input().split())
t = 1
t = inp()
for tt in range(t):
	n = inp()
	print((n - 1) // 9 + n)


t = int(input())
for i in range(t):
	s = int(input())
	ans = 0
	while s > 9:
		temp = s - s % 10
		ans += temp
		s = s - temp // 10 * 9
	else:
		ans += s
		print(ans)


t = int(input())
for _ in range(t):
	n = int(input())
	amt = 0
	while n >= 10:
		amt += n // 10 * 10
		cback = n // 10
		n %= 10
		n += cback
	amt += n
	print(amt)


N = int(input())
for _ in range(N):
	n = int(input())
	if n < 10:
		print(n)
		continue
	ans = n
	while n >= 10:
		ans += n // 10
		n = n % 10 + n // 10
	print(ans)


def solve():
	n = int(input())
	ans = 0
	while n >= 10:
		ans += n - n % 10
		n = n // 10 + n % 10
	print(ans + n)
test = int(input())
for i in range(0, test):
	solve()


m = int(input())
sol = []

def solve(n):
	m = n
	count = 0
	while int(n / 10) > 0:
		p = int(n / 10)
		count += p
		q = n % 10
		n = p + q
	return m + count
for i in range(m):
	n = int(input())
	sol.append(solve(n))
for i in sol:
	print(i)


t = int(input())
for __ in range(t):
	s = int(input())
	total = 0
	resto = 0
	while True:
		if s < 10:
			total += s
			break
		if s % 10 == 0:
			total += s
			s //= 10
			s += resto
			resto = 0
		else:
			s -= 1
			resto += 1
	print(total)


q = int(input())
for i in range(q):
	n = int(input())
	s = 0
	st = n
	while n >= 10:
		os = n % 10
		n //= 10
		s += n
		n += os
	print(s + st)


for i in range(int(input())):
	n = int(input())
	sumi = n
	while int(sumi / 100 * 10) * 10 > 0:
		n += int(sumi / 100 * 10)
		sumi = sumi - int(sumi / 100 * 10) * 10 + int(sumi / 100 * 10)
	print(n)


for _ in range(int(input())):
	x = int(input())
	sum = 0
	while x != 0:
		if x // 10 != 0:
			sum += x // 10 * 10
			x = x % 10 + x // 10
		else:
			sum += x
			x = 0
	print(sum)


import math as mt

def profit(cash):
	gain = 0
	while cash >= 10:
		aux = mt.floor(cash / 10)
		gain = gain + aux
		cash = cash + aux - 10 * aux
	return gain
t = int(input())
while t > 0:
	burles = int(input())
	spent = burles + profit(burles)
	print(spent)
	t -= 1


def food_buying(n):
	spent = 0
	left = 0
	while n >= 10:
		spent = spent + n // 10 * 10
		carry = n % 10
		n = carry + n // 10
	return n + spent
x = int(input())
m = []
for i in range(x):
	y = int(input())
	m.append(y)
for j in range(x):
	print(food_buying(m[j]))


t = int(input())
ans = []
for i in range(t):
	s = int(input())
	rem = 0
	burles = 0
	while s // 10 > 0:
		rem = s % 10
		burles += s - rem
		s = (s - rem) // 10 + rem
	burles += s
	ans.append(burles)
for i in ans:
	print(i)


import math, sys
from collections import Counter, defaultdict, deque
from sys import stdin, stdout
input = stdin.readline
lili = lambda : list(map(int, sys.stdin.readlines()))
li = lambda : list(map(int, input().split()))
I = lambda : int(input())
S = lambda : input().strip()
mod = 1000000007
for i in range(I()):
	n = I()
	ans = 0
	while n:
		if n < 10:
			break
		k = n - n % 10
		ans += k
		n = n % 10 + int(0.1 * k)
	ans += n
	print(ans)


from math import floor, ceil
for _ in range(int(input())):
	n = int(input())
	print(n + ceil(n / 9) - 1)


for _ in range(int(input())):
	n = int(input())
	remaining = 0
	spend = 0
	while n != 0:
		if n < 10:
			spend += n
			n = 0
		else:
			spend += n // 10 * 10
			remaining = n % 10
			n = n // 10 + remaining
	print(spend)


n = int(input())
for i in range(n):
	a = int(input())
	b = a
	while a != 0:
		i = a
		a = a // 10
		if a == 0:
			break
		b = b + a
		a = a + i % 10
	print(b)


from sys import stdin, stdout

class Solve:

	def __init__(self):
		R = stdin.readline
		W = stdout.write
		ans = []
		for _ in range(int(input())):
			n = int(input())
			cnt = 0
			while n >= 10:
				cnt += n - n % 10
				n = n % 10 + n // 10
			cnt += n
			ans.append(str(cnt))
		W('\n'.join(ans))

def main():
	s = Solve()
main()


from sys import stdin, stdout
from os import path
if path.exists('input.txt'):
	stdin = open('input.txt', 'r')
	stdout = open('output.txt', 'w')

	def I():
		return int(input())

	def In():
		return map(int, input().split())
else:

	def I():
		return int(stdin.readline())

	def In():
		return map(int, stdin.readline().split())

	def S():
		return stdin.readline().rstrip()

	def Sn():
		return stdin.readline().split(' ')

def func(initial):
	p = initial
	while initial > 0:
		p += initial // 10
		mod = 0
		if initial > 9:
			mod = initial % 10
		initial = initial // 10 + mod
	return p
st = ''
for _ in range(I()):
	n = I()
	ans = str(func(n))
	st = '\n'.join((st, ans))
print(st.lstrip())


for _ in [0] * int(input()):
	s = int(input())
	t = 0
	while s > 9:
		t += s - s % 10
		s = s // 10 + s % 10
	print(t + s)


T = int(input())
for t in range(T):
	s = int(input())
	res = 0
	while s % 10 != s:
		res += s - s % 10
		s = s // 10 + s % 10
	res += s
	print(res)


from sys import stdin
r = stdin.readline

def solve(n):
	(s, ans) = (n, 0)
	while s != 0:
		x = s - s % 10 if s > 10 else s
		ans += x
		s = s - x + x // 10
	return ans

def main():
	cases = int(r())
	for case in range(cases):
		print(solve(int(r())))
main()


t = int(input())
while t:
	n = int(input())
	if n < 10:
		print(n)
	else:
		minus = 1
		while minus <= n:
			minus = minus * 10
		minus = minus // 10
		spend = 0
		while n >= 10:
			spend = spend + minus
			n = n - minus + minus // 10
			minus = int('1' + '0' * (len(str(n)) - 1))
		print(spend + n)
	t = t - 1


import sys, math

def input():
	return sys.stdin.readline()[:-1]

def main():
	q = int(input())
	for _ in range(q):
		s = int(input())
		ans = s
		while s > 9:
			ans += s // 10
			s = s // 10 + s % 10
		print(ans)
main()


n = int(input())
for i in range(n):
	m = int(input())
	s = 10 * (m // 10)
	m = m % 10 + m // 10
	while m > 9:
		s += 10 * (m // 10)
		m = m % 10 + m // 10
	s += m
	print(s)


t = int(input())
for _ in range(t):
	balance = int(input())
	spent = 0
	while balance >= 10:
		quotient = balance // 10
		remainder = balance % 10
		balance = remainder + quotient
		spent += quotient * 10
	spent += balance
	print(spent)


import copy
t = int(input())
for i in range(t):
	n = int(input())
	new = n + n // 10
	prev = n
	while new > prev:
		sv = copy.deepcopy(new)
		new += new // 10 - prev // 10
		prev = sv
	print(new)


a = int(input())
c = []
for i in range(a):
	b = int(input())
	c.append(b)
for i in range(a):
	res = c[i]
	summoney = c[i]
	while res:
		summoney = summoney + int(res / 10)
		if res > 10:
			res = int(res / 10) + int(res % 10)
		else:
			res = int(res / 10)
	c[i] = summoney
for i in c:
	int(i)
	print(i, end='\n')


n = int(input())
for i in range(n):
	t = int(input())
	a = t // 10
	b = t % 10
	e = a
	f = b
	c = t + a
	while f != 0 or e >= 10:
		b = (e + f) // 10
		a = (e + f) % 10
		c += b
		e = a
		f = b
	print(c)


t = int(input())
for _ in range(t):
	n = int(input())
	s = 0
	while n // 10 != 0:
		x = n // 10
		y = n % 10
		s += x * 10
		n = x + y
	s += n
	print(s)


for i in range(int(input())):
	n = int(input())
	if n < 10:
		print(n)
	else:
		(ans, k) = (0, True)
		while k:
			q = n // 10
			n = n % 10
			ans = ans + 10 * q
			n = n + q
			if n < 10:
				ans += n
				k = False
		print(ans)


import sys, math

def ii():
	return int(input())

def si():
	return str(input())

def mii():
	return map(int, input().split())

def msi():
	return map(str, input().split())

def lmii():
	return list(map(int, input().split()))

def lmsi():
	return list(map(str, input().split()))
for _ in range(ii()):
	r = si()
	if int(r) < 10:
		print(r)
	else:
		p = int(r)
		ans = 0
		while p > 0:
			ss = len(str(p))
			ee = str(p)
			bb = '1' + (ss - 1) * '0'
			bb_bb = int(bb)
			sssd = int(ee[0]) * bb_bb
			ans += sssd
			p = p - sssd
			p += sssd // 10
		print(ans)


n = int(input())
for i in range(n):
	c = int(input())
	a = c // 10
	n = c
	while c % 10 + a >= 10:
		n += a
		c = c % 10 + a
		a = c // 10
	n += a
	print(n)


def read_int():
	n = int(input())
	return n

def read_ints():
	ints = [int(x) for x in input().split(' ')]
	return ints

def solve(s):
	ret = 0
	while s >= 10:
		ret += s // 10 * 10
		s = s // 10 + s % 10
	ret += s
	return ret
t = read_int()
for case in range(t):
	s = read_int()
	sol = solve(s)
	print(sol)


kl = int(input())
for l in range(kl):
	a = int(input())
	s = 0
	while a >= 10:
		s += a // 10 * 10
		a = a // 10 + a % 10
	print(s + a)


for i in range(int(input())):
	n = int(input())
	s = 0
	r = 0
	while n >= 10:
		s += n // 10 * 10
		r = n // 10
		n = n - r * 10 + r
	print(s + n)


t = int(input())
for y in range(t):
	n = int(input())
	ans = 0
	while n >= 10:
		ans += n // 10 * 10
		n = n // 10 + n % 10
	print(ans + n)


t = int(input())
output = []
while t > 0:
	s = int(input())
	if s < 10:
		output.append(s)
		t = t - 1
	else:
		added_amt = 0
		orig_val = s
		while s > 0:
			amt_spend = s - s % 10
			cash_back = amt_spend // 10
			added_amt += cash_back
			if cash_back == 0:
				s = cash_back
			else:
				s = cash_back + s % 10
		req_val = orig_val + added_amt
		output.append(req_val)
		t = t - 1
for i in output:
	print(i)


num_t = int(input())

def f(s):
	if s < 10:
		return s
	return s - s % 10 + f(s // 10 + s % 10)
for _ in range(num_t):
	s = int(input())
	print(f(s))


CASES = int(input())

def solve(s):
	if s < 10:
		return s
	else:
		return s - s % 10 + solve(s // 10 + s % 10)
for i in range(CASES):
	s = int(input())
	print(solve(s))


for _ in range(int(input())):
	n = int(input())
	t1 = n % 10
	a = []
	while n > 0:
		a.append(n - t1)
		n = n // 10
		if n == 0:
			break
		n += t1
		t1 = n % 10
	print(sum(a) + t1)


def solve(n):
	s = n
	while n >= 10:
		x = n // 10
		s += x
		r = n % 10
		n = x + r
	return print(s)
for _ in range(int(input())):
	n = int(input())
	solve(n)


from sys import stdin

def np(n):
	c = 0
	for i in range(9, -1, -1):
		if 10 ** i <= n:
			c = i
			break
	return c
t = int(stdin.readline())
for z in range(t):
	n = int(stdin.readline())
	m = n
	a = 0
	while n:
		x = np(n)
		y = 10 ** x
		n -= y
		n += y // 10
		a += y // 10
	print(a + m)


def solve():
	x = int(input())
	cost = 0
	while x >= 10:
		cur_cost = x - x % 10
		getback = cur_cost // 10
		x = x - cur_cost + getback
		cost += cur_cost
	cost += x
	print(cost)
T = int(input())
for _ in range(T):
	solve()


a = int(input())
ans = []
for i in range(a):
	b = int(input())
	t = 0
	while b > 0:
		y = 0
		if b >= 10:
			y = b // 10
			t += y * 10
			b -= y * 10 - y
		else:
			t += b
			b -= b
	ans.append(t)
for i in range(a):
	print(ans[i])


for _ in range(int(input())):
	s = int(input())
	x = s
	ans = 0
	if s < 10:
		print(s)
	elif s == 10:
		print('11')
	else:
		while x > 10:
			x = int(x / 10)
			ans = ans + 10 * x
			x = x + s % 10
			s = x
		if x == 10:
			print(ans + x + 1)
		else:
			print(ans + x)


def solve():
	t = int(input())
	while t:
		ans = 0
		s = int(input())
		while s:
			if s >= 10:
				x = s // 10
				s -= x * 10
				s += x
				ans += x * 10
			else:
				ans += s
				s = s // 10
		print(ans)
		t -= 1
solve()


for t in range(int(input())):
	n = int(input())
	ans = 0
	n1 = n // 10
	n2 = n - n1 * 10
	ans += n1 * 10
	n = n1 + n2
	while n >= 10:
		n1 = n // 10
		n2 = n - n1 * 10
		ans += n1 * 10
		n = n1 + n2
	ans += n
	print(ans)


t = int(input())
for queries in range(t):
	s = int(input())
	count = 0
	while s != 0:
		x = s // 10
		if s >= 10:
			count += x * 10
			s = s - x * 10 + x
		if s < 10:
			count += s
			s = 0
	print(count)


def Input():
	tem = input().split()
	ans = []
	for it in tem:
		ans.append(int(it))
	return ans
from collections import Counter
T = Input()[0]
for tt in range(T):
	n = Input()[0]
	ans = n
	while n > 9:
		tem = n // 10
		n = n % 10 + tem
		ans += tem
	print(ans)


t = int(input())
for _ in range(t):
	n = int(input())
	output = 0
	while n >= 1:
		if n < 10:
			output += n
			break
		output += n - n % 10
		n = n - (n - n % 10) + n // 10
	print(output)


for _ in range(int(input())):
	p = int(input())
	res = 0
	n = p
	while n > 9:
		k = n // 10
		res += k
		tmp = n % 10
		n = tmp + k
	print(p + res)


def solve():
	n = int(input())
	sum1 = 0
	while 1:
		if n < 10:
			print(sum1 + n)
			return
		x = n // 10
		sum1 += x * 10
		n = n - x * 10 + x
for _ in range(int(input())):
	solve()


for _ in range(int(input())):
	n = int(input())
	ans = 0
	rem = 0
	x = 0
	while n > 10:
		x = n
		n = n // 10
		rem = x % 10
		ans += n * 10
		n = n + rem
	if n == 10:
		ans += n + 1
	else:
		ans += n
	print(ans)


for i in range(int(input())):
	s = input()
	l = len(s)
	s = int(s)
	res = 0
	a = 10 ** l
	while s > 0:
		while s < a:
			a = int(a / 10)
		res += a
		s = int(s - (a - a / 10))
	print(res)


t = int(input())
for test in range(t):
	n = int(input())
	summ = 0
	while n > 0.01:
		summ += n
		n = n / 10
	print(int(summ))


from sys import stdin, stdout
from math import pow
from os import path
if path.exists('inp.txt'):
	stdin = open('inp.txt', 'r')
q = int(stdin.readline())
for _ in range(q):
	s = int(stdin.readline())
	ans = s
	while s >= 10:
		re = int(s / 10)
		s -= int(re * 10)
		s += re
		ans += re
	print(ans)


t = int(input())
for T in range(t):
	n = int(input())
	ans = n + (n - 1) // 9
	print(ans)


def countDigit(n):
	count = 0
	while n != 0:
		n //= 10
		count += 1
	return count
t = int(input())
for _ in range(t):
	s = int(input())
	sum = s
	i = countDigit(s)
	while i != 0:
		sum += s // 10
		s = s // 10 + s % 10
		i -= 1
	print(int(sum))


def solve(s):
	amount = 0
	while s >= 10:
		extra = s // 10
		paid = extra * 10
		amount += paid
		s = s - paid + extra
	return amount + s
t = int(input())
for i in range(t):
	s = int(input())
	y = solve(s)
	print(y)


import sys
import math
fileoperation = 0
if fileoperation:
	orig_stdout = sys.stdout
	orig_stdin = sys.stdin
	inputfile = open('W:/Competitive Programming/input.txt', 'r')
	outputfile = open('W:/Competitive Programming/output.txt', 'w')
	sys.stdin = inputfile
	sys.stdout = outputfile
mod = 1000000007

def nospace(l):
	ans = ''.join((str(i) for i in l))
	return ans
t = int(input())
for tt in range(t):
	n = int(input())
	ans = 0
	while n >= 10:
		v = n // 10
		d = v * 10
		n -= d
		ans += d
		n += v
	print(ans + n)
if fileoperation:
	sys.stdout = orig_stdout
	sys.stdin = orig_stdin
	inputfile.close()
	outputfile.close()


test = int(input())
for t in range(test):
	n = int(input())
	has = n
	while n // 10 != 0:
		rem = n % 10
		muls = n // 10
		n = rem + muls
		has = has + muls
	print(has)


for _ in range(int(input())):
	n = int(input())
	bur = 0
	rem = n % 10
	while n > 9:
		bur += n - n % 10
		n = n // 10 + n % 10
	print(bur + n)


from sys import stdin
from collections import deque
mod = 10 ** 9 + 7
import sys
sys.setrecursionlimit(10 ** 5)
from queue import PriorityQueue
from bisect import bisect_right
from bisect import bisect_left
from collections import defaultdict
from math import sqrt, factorial, gcd, log2, inf, ceil
import heapq
input = lambda : sys.stdin.readline().rstrip()
from sys import stdin, stdout
from heapq import heapify, heappush, heappop
t = int(input())
for i in range(t):
	n = int(input())
	z = (n - 1) // 9
	print(10 * z + n - z * 9)


for i in range(int(input())):
	e = int(input())
	s = 0
	while e >= 10:
		r = e % 10
		s += e - r
		cb = e // 10
		e = cb + r
	print(s + e)


from math import floor

def q():
	number = int(input())
	a = [floor(number / 10)]
	b = [int(str(number)[-1])]
	for i in range(len(str(number))):
		a = a + [floor((a[i] + b[i]) / 10)]
		b = b + [int(str(a[i] + b[i])[-1])]
	sum = 0
	for j in range(len(a) - 1):
		sum = sum + 10 * a[j]
	print(sum + b[-1])
t = int(input())
for i in range(t):
	q()


tests = int(input())
for k in range(tests):
	a = int(input())
	c = 0
	b = 0
	while a >= 10:
		b = a - a % 10
		c = c + b
		a = a - b + b // 10
	print(c + a)


t = int(input())
while t:
	t -= 1
	s = int(input())
	answer = 0
	while s >= 10:
		answer += 10 * (s // 10)
		s = s % 10 + s // 10
	answer += s
	print(answer)


class Solution:

	def solve(self, n):
		num = n
		response = num
		while num >= 10:
			last = num % 10
			temp = num // 10
			response += temp
			temp += last
			num = temp
		return response

	def main(self):
		test_cases = input()
		inputs = []
		for _ in range(int(test_cases)):
			number = input()
			inputs.append(int(number))
		for num in inputs:
			print(self.solve(num))
s = Solution()
s.main()


T = int(input())
for i in range(T):
	N = input()
	length = len(N)
	x = int(N)
	spend = 0
	total = 0
	while x > 0:
		length = len(str(x))
		spend = x - x % 10 ** (length - 1)
		total += spend
		x = x - spend + spend // 10
	print(total)


for i in range(int(input())):
	a = int(input())
	tmp = a // 10
	answ = 0
	while tmp >= 1:
		answ += a - a % 10
		a = a % 10
		a += tmp
		tmp = a // 10
	answ += a
	print(answ)


t = int(input())
while t:
	t -= 1
	n = int(input())
	ans = 0
	while True:
		res = n // 10
		temp = n % 10
		ans += 10 * res
		n = res + temp
		if n < 10:
			ans += n
			break
	print(ans)


t = int(input())
for i in range(t):
	n = int(input())
	tot = 0
	while n > 0:
		val1 = n // 10
		val2 = val1 * 10
		if n < 10:
			val2 = n
			n = 0
		else:
			n = n + val1 - val2
		tot += val2
	print(tot)


for _ in int(input()) * [0]:
	x = int(input())
	s = x
	while x // 10 != 0:
		s += x // 10
		x = x // 10 + x % 10
	print(s)


import sys
import math

def II():
	return int(sys.stdin.readline())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def MI():
	return map(int, sys.stdin.readline().split())

def SI():
	return sys.stdin.readline().strip()
t = II()
for q in range(t):
	n = II()
	s = 0
	while n > 9:
		s += n // 10 * 10
		temp = n // 10
		n = n % 10 + temp
	s += n
	print(s)


a = int(input())
for i in range(a):
	n = int(input())
	print(int(n // 0.9))


for _ in range(int(input())):
	s = int(input())
	f = 0
	while s >= 10:
		f += s - s % 10
		s = s // 10 + s % 10
	print(f + s)


import math
for _ in range(int(input())):
	s = int(input())
	c = 0
	n = s
	while n >= 10:
		a = n // 10 * 10
		n = n % 10 + math.floor(a / 10)
		c += a
	c += n
	print(c)


import atexit
import io
import sys
_IB = sys.stdin.read().splitlines()
input = iter(_IB).__next__
_OB = io.StringIO()
sys.stdout = _OB

@atexit.register
def write():
	sys.__stdout__.write(_OB.getvalue())

class inp:

	@staticmethod
	def int():
		return int(input())

	@staticmethod
	def ilist():
		return list(map(int, input().split()))

	@staticmethod
	def list():
		return input().split()

	@staticmethod
	def itup():
		return map(int, input().split())

	@staticmethod
	def str():
		return list(input())

def main():
	t = inp.int()
	for _ in range(t):
		s = inp.int()
		sum = 0
		while s >= 10:
			sum += s - s % 10
			s = s % 10 + s // 10
		print(sum + s)
main()


for _ in range(int(input())):
	s = int(input())
	ans = 0
	while s > 0:
		if s < 10:
			ans += s
			break
		rem = s % 10
		s = s // 10 * 10
		ans += s
		s = s // 10 + rem
	print(ans)


t = int(input())
for i in range(t):
	s = input()
	ans = 0
	while s != '0':
		a = int(s[0]) * 10 ** (len(s) - 1)
		ans += a
		b = int(s) - a
		b += a // 10
		s = str(b)
	print(ans)


import sys
input = sys.stdin.readline

def main():
	t = int(input())
	for _ in range(t):
		N = int(input())
		ans = 0
		ans = N
		while N >= 10:
			ans += N // 10
			tmp = N // 10
			N %= 10
			N += tmp
		print(ans)
main()


T = int(input())
for j in range(T):
	n = int(input())
	if n < 10:
		print(n)
	else:
		x = n
		s = 0
		while x >= 10:
			b = x // 10
			s = s + b * 10
			x = b + x % 10
		print(s + x)


from math import floor
tc = int(input())
for _ in range(tc):
	b = int(input())
	count = b
	remain = b % 10
	while floor(b / 10) > 0:
		count += floor(b / 10)
		b = remain + floor(b / 10)
		remain = b % 10
	print(count)


import math

def get_spend_ammount(v):
	times = math.floor(v / 9)
	if v % 9 == 0:
		times -= 1
	return v + times
n = int(input())
for _ in range(n):
	v = int(input())
	print(get_spend_ammount(v))


for _ in ' ' * int(input()):
	a = int(input())
	b = a
	c = 0
	z = 0
	while len(str(a)) > 1:
		z = a // 10
		a = a - z * 10 + z
		c += z
	print(c + b)


t = int(input())
for i in range(0, t, 1):
	a = int(input())
	s = 0
	c = 0
	while a > 9:
		c = a // 10
		a = a % 10 + c
		s = s + c * 10
	s = s + a
	print(s)


import os
import sys
from atexit import register
from io import StringIO
sys.stdout = StringIO()
register(lambda : os.write(1, sys.stdout.getvalue().encode()))
import math
t = int(input())
for _ in range(t):
	s = int(sys.stdin.readline())
	ret = 0
	while s >= 10:
		rem = s % 10
		ret += s - rem
		s = rem + int(s / 10)
	print(ret + s)


for _ in range(int(input())):
	n = int(input())
	p = n
	while p >= 10:
		n = n + p // 10
		p = p % 10 + p // 10
	print(n)


for i in range(int(input())):
	print(int(int(input()) // 0.9))


t = int(input())
for i in range(t):
	n = int(input())
	suma = 0
	while n > 0:
		x = 10 ** (len(str(n)) - 1)
		n -= x
		suma += x
		n += int(x / 10)
	print(suma)


def food_buying(x):
	if x < 10:
		return 0
	else:
		return int(x / 10) + food_buying(int(x / 10) + x % 10)
test = int(input())
while test:
	x = int(input())
	print(x + food_buying(x))
	test -= 1


def main():
	t = int(input().strip())
	for _ in range(t):
		s = int(input().strip())
		result = 0
		while s >= 10:
			result += s // 10 * 10
			s = s // 10 + s % 10
		result += s
		print(result)
main()


t = int(input())
while t != 0:
	(count1, c1) = (0, 0)
	s = int(input())
	if s >= 10:
		while s // 10 * 10 != 0:
			x = s // 10 * 10
			count1 = count1 + x
			s1 = s % 10
			s = x // 10 + s1 + c1
			if s < 10:
				count1 = count1 + s
		print(count1)
	else:
		print(s)
	t = t - 1


n = int(input())
for i in range(n):
	c = 0
	s = int(input())
	o = s
	while s >= 10:
		c += s // 10
		ct = s // 10
		s = s % 10
		s += ct
	print(c + o)


for _ in range(int(input())):
	x = int(input())
	sum = x
	while x // 10 != 0:
		temp = x
		x //= 10
		sum += x
		x = temp % 10 + x
	print(sum)


t = int(input())
for _ in range(t):
	x = int(input())
	s = 0
	while x >= 10:
		s += x // 10 * 10
		c = x % 10
		x = x // 10 + c
	s += x
	print(s)


test_cases = int(input())
while test_cases > 0:
	burles = int(input())
	optimal = 0
	while True:
		partition = int(burles / 10) * 10
		optimal += partition
		burles_left = burles - partition
		burles = int(burles / 10) + burles_left
		if burles < 10:
			optimal += burles
			break
	print(optimal)
	test_cases -= 1


def recursion(n):
	if n % 10 == n:
		return n
	aux = n - n % 10
	return aux + recursion(aux // 10 + n % 10)

def run():
	total = []
	n = int(input())
	for i in range(n):
		total.append(recursion(int(input())))
	for value in total:
		print(value)
run()


for i in range(int(input())):
	n = int(input())
	m = n
	s = 0
	rem = 0
	while n // 10:
		q = n // 10
		rem = n % 10
		s += q * 10
		n = q + rem
	if m >= 10:
		print(s + rem + q)
	else:
		print(n)


t = int(input())
for i in range(t):
	n = int(input())
	print(int(n // 0.9))


tt = int(input())
while tt:
	n = int(input())
	sum = 0
	while n >= 10:
		a = n // 10 * 10
		sum += a
		n = n - a + n // 10
	sum += n
	print(sum)
	tt = tt - 1


def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())

def countDigit(n):
	if n == 0:
		return 0
	return 1 + countDigit(n // 10)
for _ in range(ii()):
	c = 0
	n = ii()
	for i in range(countDigit(n) + 1):
		if n >= 10:
			k = n // 10
			n = n % 10
			c = c + k * 10
			n = n + k
			1
		else:
			c = c + n % 10
			n = n // 10
	print(c)


q = int(input())
res = []
for i in range(q):
	s = int(input())
	p = 0
	while s > 0:
		temp = int(str(s)[0]) * 10 ** (len(str(s)) - 1)
		p += temp
		s -= temp
		s += int(temp / 10)
	res.append(p)
for i in range(q):
	print(res[i])


def solve(n):
	if n < 10:
		return n
	elif n == 10:
		return 11
	else:
		return n // 10 * 10 + solve(n // 10 + n % 10)
t = int(input())
for tt in range(t):
	n = int(input())
	print(solve(n))


t = int(input())
for x in range(t):
	s = int(input())
	b = s
	c = s
	while c >= 10:
		b = b / 10
		c = c - 9 * int(b)
		s = s + int(b)
		b = c
	print(int(s))


import sys
input = sys.stdin.readline

def getInt():
	return int(input())

def getVars():
	return map(int, input().split())

def getList():
	return list(map(int, input().split()))

def getStr():
	return input().strip()
t = getInt()
for _ in range(t):
	s = getInt()
	res = 0
	while s > 0:
		if s >= 10:
			res += s // 10 * 10
			s = s // 10 + s % 10
		else:
			res += s
			s = 0
	print(res)


t = int(input())
for i in range(t):
	n = int(input())
	sm = n
	while n // 10 != 0:
		r = n % 10
		n = n // 10
		sm += n
		n += r
	print(sm)


def buy(s):
	if s < 10:
		return s
	x = s // 10 * 10
	return x + buy(s - x + s // 10)
T = int(input())
for t in range(T):
	s = int(input())
	print(buy(s))


for i in range(int(input())):
	n = int(input())
	ext = 0
	if n < 10:
		print(n)
		continue
	a = n
	b = n
	z = 0
	while a > 0:
		a //= 10
		z += 1
	z -= 1
	while z >= 0:
		t = 10 ** z
		while b > 0 and b >= t:
			b -= t
			b += int(t / 10)
			ext += int(t / 10)
		z -= 1
	print(n + ext)


def main():
	q = int(input())
	for _ in range(q):
		n = int(input())
		s = 0
		while n > 0:
			ni = 1
			while ni * 10 <= n:
				ni *= 10
			n -= ni
			s += ni
			n += ni // 10
		print(s)
main()


t = int(input())
i = 0
out = str()
while i < t:
	cash = int(input())
	back = cash
	while back >= 10:
		ostatok = back % 10
		back = back // 10
		cash = cash + back
		back = back + ostatok
	out += str(cash)
	i += 1
	if i != t:
		out += '\n'
print(out)


for i in range(int(input())):
	n = int(input())
	ans = n // (9 / 10)
	print(int(ans))


import collections

def solve(s):
	ans = 0
	while s:
		greatest10Divisor = s // 10
		if greatest10Divisor == 0:
			return ans + s
		ans += greatest10Divisor * 10
		s -= greatest10Divisor * 10
		s += greatest10Divisor
	return ans
t = int(input().strip())
for i in range(t):
	s = int(input().strip())
	print(solve(s))


for _ in range(int(input())):
	n = int(input())
	ans = n + (n - 1) // (10 - 1)
	print(ans)


import sys

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def input():
	return sys.stdin.readline().strip()
mod = 1000000007
for _ in range(int(input())):
	s = int(input())
	ans = 0
	pw = 10 ** 12
	while int(s) > 0:
		while int(s) < pw:
			pw //= 10
		ans += pw
		s -= pw - pw // 10
	print(ans)


cases = int(input())
for case in range(cases):
	amount = int(input())
	spent = 0
	while amount >= 10:
		use = amount // 10 * 10
		spent += use
		amount = int(amount - 0.9 * use)
	spent += amount
	print(spent)


from sys import *
from collections import Counter
from itertools import permutations
input = lambda : stdin.readline()
int_arr = lambda : list(map(int, stdin.readline().strip().split()))
str_arr = lambda : list(map(str, stdin.readline().split()))
get_str = lambda : map(str, stdin.readline().strip().split())
get_int = lambda : map(int, stdin.readline().strip().split())
get_float = lambda : map(float, stdin.readline().strip().split())
mod = 1000000007
setrecursionlimit(1000)
for _ in range(int(input())):
	n = int(input())
	ct = 0
	num = n
	while n > 9:
		quo = n // 10
		n = n % 10 + quo
		ct += quo
	print(num + ct)


for _ in range(int(input())):
	s = int(input())
	spent = 0
	while s:
		spent += int(s / 10) * 10
		s = s % 10 + int(s / 10)
		if s < 10:
			spent += s
			s = 0
	print(spent)


for i in range(int(input())):
	n = int(input())
	rem = n
	inv = 0
	cash = 0
	val = 0
	while rem > 9:
		inv = rem // 10 * 10
		cash = inv // 10
		rem = rem % 10
		rem += cash
		val += inv
	val += rem
	print(val)


for i in range(int(input())):
	cash = int(input())
	spend = 0
	while cash >= 10:
		spend += cash // 10 * 10
		cash -= cash // 10 * 9
	print(cash + spend)


t = int(input())
while t:
	s = int(input())
	if s < 10:
		print(s)
	else:
		if s % 9 == 0:
			ans = s * 10 // 9 - 1
		else:
			ans = s * 10 // 9
		print(ans)
	t -= 1


arr = [0]
last = 0
for _ in range(11):
	last = 10 * last + 1
	arr.append(last)
for _ in range(int(input())):
	n = int(input())
	ans = 0
	while n > 0:
		if n >= 10:
			sub = n // 10
			n += sub
			n -= 10 * sub
			ans += 10 * sub
		else:
			ans += n
			n = 0
	print(ans)


def a(n):
	sum = 0
	rem = 0
	while n != 0:
		sum = sum + (n - n % 10)
		rem = rem + n % 10
		n = n // 10
	sum = sum + rem + rem // 10
	return sum
t = int(input())
for i in range(t):
	n = int(input())
	sum = 0
	rem = 0
	if n < 10:
		print(n)
		continue
	while n != 0:
		sum = sum + (n - n % 10)
		rem = rem + n % 10
		n = n // 10
	sum = sum + a(rem)
	print(sum)


a = input()
Case = int(a)
for T in range(Case):
	a = input()
	n = int(a)
	s = n
	while n >= 10:
		t = n // 10
		s += t
		n = n % 10 + t
	print(s)


n = int(input())
for i in range(n):
	a = int(input())
	print(a + (a - 1) // 9)


from sys import stdin
from math import ceil

def func():
	return
for _ in range(int(stdin.readline())):
	n = int(stdin.readline())
	if n <= 9:
		print(n)
	else:
		m = (n // 9 - 1) * 10
		if n - 9 * (n // 9 - 1) > 9:
			m += 10
			rem = n - 9 * (n // 9 - 1) - 9
			m += rem
		else:
			m += n - 9 * (n // 9 - 1)
		print(m)


for _ in [0] * int(input()):
	s = int(input())
	ans = 0
	while s // 10 != 0:
		ans += s // 10 * 10
		s = s % 10 + s // 10
	print(ans + s)


def main():
	t = int(input())
	for _ in range(t):
		a = int(input())
		if a % 9 == 0:
			x = a // 9
			x = x - 1
		else:
			x = a // 9
		print(a + x)
main()


import math
for q in range(int(input())):
	n = int(input())
	x = (n - 1) // 9
	print(n + x)


for _ in range(int(input())):
	n = int(input())
	e = n
	if n < 10:
		print(n)
	else:
		while n > 9:
			e += n // 10
			n = n // 10 + n % 10
		print(e)


inp = []
for i in range(int(input())):
	inp.append(int(input()))
ans = []
for i in inp:
	a = 0
	telo = i
	ost = 0
	while True:
		ost = telo % 10
		if telo - ost == 0:
			a += ost
			ans.append(a)
			break
		a += telo - ost
		telo = telo // 10 + ost
for i in ans:
	print(str(i))


for i in range(int(input())):
	n = int(input())
	r = 0
	while n > 9:
		aux = n // 10
		r += aux * 10
		n %= 10
		n += aux
	r += n
	print(r)


def func(s):
	sum = 0
	while True:
		r = s % 10
		s = s - r
		if s == 0:
			sum += r
			break
		sum += s
		s = s // 10
		s = s + r
	return sum
t = int(input())
for _ in range(t):
	s = int(input())
	print(func(s))


for q in range(int(input())):
	n = int(input())
	ans = 0
	while n >= 10:
		n10 = n // 10
		ans += 10 * n10
		n = n - 9 * n10
	ans += n
	print(ans)


a = int(input())
for _ in range(a):
	s = int(input())
	k = s // 9
	if 9 * int(k) == s:
		print(s + s // 9 - 1)
	else:
		print(s + s // 9)


trails = int(input())
answer_list = []
for x in range(trails):
	number = int(input())
	ans = number
	while number >= 10:
		y = number // 10
		number -= y * 9
		ans += y
	answer_list.append(ans)
for g in answer_list:
	print(g)


t = int(input())
while t > 0:
	t -= 1
	mans = 0
	n = int(input())
	while n // 10 > 0:
		k = n // 10
		ans = k * 10
		mans += ans
		n -= ans
		n += k
	mans += n
	print(mans)


n = int(input())

def f(s):
	res = 0
	while s > 9:
		(x, s) = divmod(s, 10)
		res += x * 10
		s += x
	return res + s
for _ in range(n):
	s = int(input())
	print(f(s))


t = int(input())
for z in range(t):
	money = int(input())
	exp = 0
	while money >= 10:
		exp += 10 * (money // 10)
		money = money % 10 + money // 10
	print(exp + money)


for _ in range(int(input())):
	m = int(input())
	a = 0
	x = 0
	while m // 10 >= 10 or m >= 10:
		a += m // 10 * 10
		x = m // 10
		m = m % 10 + x
	else:
		a += m % 10
	print(a)


t = int(input())
for _ in range(t):
	n = int(input())
	ans = 0
	while n != 0:
		if n < 10:
			ans += n
			n = 0
		hel = n // 10 * 10
		stage = hel // 10
		ans += hel
		n = n - hel + stage
	print(ans)


def solve():
	s = int(input())
	tmp = s
	former = 0
	while True:
		s = tmp + s // 10
		if s == former:
			print(s)
			return
		former = s
for _ in range(int(input())):
	solve()


t = int(input())
for _ in range(t):
	n = int(input())
	c = n + int(n / 10)
	k = n % 10
	n = int(n / 10) + k
	while n > 9:
		c += int(n / 10)
		k = n % 10
		n = int(n / 10) + k
	print(c)


t = int(input())
for i in range(t):
	n = int(input())
	p = n
	sum = 0
	other = 0
	while p:
		c = p // 10 * 10
		sum = sum + c
		r = p % 10
		if p // 10 == 0:
			sum = sum + r
			break
		else:
			p = p // 10 + r
	print(sum)


import atexit
import io
import sys
_INPUT_LINES = sys.stdin.read().splitlines()
input = iter(_INPUT_LINES).__next__
_OUTPUT_BUFFER = io.StringIO()
sys.stdout = _OUTPUT_BUFFER

@atexit.register
def write():
	sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
for _ in range(int(input())):
	s = int(input())
	spent = 0
	while s > 0:
		if s >= 10:
			x = s // 10 * 10
			spent += x
			s = s - x + x // 10
		else:
			spent += s
			s = 0
	print(spent)


def solve(s):
	tot = 0
	while s != 0:
		if s // 10:
			x = s - s % 10
		else:
			x = s
		tot += x
		back = x // 10
		s = s - x + back
	return tot

def main():
	N = int(input())
	for _ in range(N):
		s = int(input())
		print(solve(s))
main()


q = int(input())
for _ in range(q):
	s = int(input())
	ans = 0
	while s >= 10:
		d = s // 10
		s %= 10
		ans += d * 10
		s += d
	print(ans + s)


import sys

def query():
	n = int(input())
	res = 0
	while n >= 10:
		t = 0
		t += n // 10 * 10
		res += t
		n = n - t + t / 10
	print(int(res + n))
q = int(input())
for i in range(0, q):
	query()


for t in range(int(input())):
	s = int(input())
	total_spent = 0
	while True:
		if s >= 10:
			cash_back = s // 10
			s -= 10 * cash_back
			s += cash_back
			total_spent += 10 * cash_back
		else:
			total_spent += s
			break
	print(total_spent)


from sys import stdin
input = lambda : stdin.readline().strip()
for _ in range(int(input())):
	n = int(input())
	sum1 = 0
	while n >= 10:
		if str(n)[-1] == '0':
			sum1 = sum1 + n
			n = n // 10
		else:
			d = int(str(n)[-1])
			sum1 = sum1 + n - int(d)
			n = n // 10 + d
	print(sum1 + n)


t = int(input())
for i in range(1, t + 1):
	n = int(input())
	tot = 0
	if n < 10:
		print(n)
	elif n == 10:
		print(11)
	else:
		while n >= 10:
			tot = tot + (n - n % 10)
			n = int(n / 10) + n % 10
		tot = tot + n
		print(tot)


def pow10(x):
	i = 1
	while i <= x:
		i *= 10
	return int(i / 10)
test = int(input())
while bool(test):
	n = int(input())
	t = n
	ans = 0
	while t > 9:
		spend = pow10(t)
		t -= spend
		t += int(spend / 10)
		ans += spend
	print(ans + t)
	test -= 1


t = int(input())
result = []
for _ in range(t):
	s = int(input())
	spent = 0
	while s >= 10:
		spent += s // 10 * 10
		r = s % 10
		s = s // 10 + r
	spent += s
	result.append(spent)
for i in result:
	print(i)


for i in range(int(input())):
	a = int(input())
	l = a
	if a < 10:
		print(a)
	else:
		p = 0
		while a >= 10:
			s = a // 10
			a = a - s * 10 + s
			p += s
		print(p + l)


for _ in range(int(input())):
	s = int(input())
	x = 0
	while s > 9:
		(s, m) = divmod(s, 10)
		x += 10 * s
		s += m
	print(x + s)


x = int(input())
y = 0
while y < x:
	ris = 0
	N = int(input())
	while N > 0:
		s = N
		if s > 10:
			while s % 10 != 0:
				s = s - 1
		ris = ris + s
		N = N - s + s // 10
	print(ris)
	y = y + 1


import math
for _ in range(int(input())):
	n = int(input())
	r = n
	temp = n
	c = 0
	while r > 0:
		c += 1
		r = r // 10
	if c == 1:
		print(n)
	else:
		a = [0] * c
		i = c - 1
		while i >= 0:
			a[i] = n % 10
			n = n // 10
			i = i - 1
		t = 0
		k = c - 2
		for i in range(0, c - 1):
			t += int(math.pow(10, k - i)) * a[i]
			a[i + 1] += a[i]
			if a[i + 1] > 9:
				t += int(math.pow(10, k - i)) * int(a[i + 1] // 10)
				a[i + 1] = a[i + 1] % 10 + 1
		t = t + temp
		print(int(t))


t = int(input())
for i in range(t):
	s = int(input())
	spent = 0
	while s >= 10:
		rem = s % 10
		spent += s - rem
		q = s // 10
		s = q + rem
	print(spent + s)


query = int(input())
for _ in range(query):
	s = int(input())
	x = s // 9
	if s % 9 == 0:
		x -= 1
	print(s + x)


t = int(input())
ans = ''
for j in range(t):
	s = int(input())
	f = 0
	while s >= 10:
		f += s - s % 10
		s = s // 10 + s % 10
	ans += str(f + s) + '\n'
print(ans)


for i in range(int(input())):
	s = int(input())
	res = 0
	a = 10 ** 9
	while s > 0:
		while s < a:
			a = int(a / 10)
		res += a
		s = int(s - (a - a / 10))
	print(res)


test_cases = int(input())
for case in range(test_cases):
	burles = int(input())
	max_burles = 0
	while burles >= 10:
		max_burles += burles // 10 * 10
		burles = burles - burles // 10 * 10 + burles // 10
	max_burles += burles
	print(max_burles)


t = int(input())
for _ in range(t):
	total_money = int(input())
	spend = 0
	spent_total = 0
	while total_money > 0:
		ml = 10 ** (len(str(total_money)) - 1)
		non_spent = total_money % ml
		spend = total_money - non_spent
		total_money = total_money - spend + int(spend / 10)
		spent_total += spend
	print(spent_total)


test = int(input())
for t in range(test):
	n = int(input())
	ans = 0
	while n > 0:
		if n < 10:
			ans += n
			n = 0
		else:
			s = n // 10
			ans += s * 10
			n %= 10
			n += s
	print(ans)


t = int(input())
for x in range(t):
	n = int(input())
	q = 0
	while n:
		if not n // 10:
			q += n
			break
		q += n // 10 * 10
		n = n - n // 10 * 10 + n // 10
	print(q)


t = int(input())
for vatroslav in range(t):
	n = list(map(int, list(input())))
	pot = len(n) - 1
	i = 0
	sol = 0
	while i < len(n) - 1:
		sol += n[i] * 10 ** pot
		n[i + 1] += n[i]
		if n[i + 1] > 9:
			n[i + 1] -= 10
			n[i] = 1
		else:
			i += 1
			pot -= 1
	sol += n[i]
	print(sol)


t = int(input())
for i in range(t):
	s = int(input())
	g = 0
	while s != 0:
		if s >= 10:
			m10 = s // 10
			s = s + m10 - m10 * 10
			g += m10 * 10
		else:
			g += s
			s = 0
	print(g)


import sys
import os
import time
import collections
from collections import Counter, deque
import itertools
import math
import timeit
import random

def sieve(n):
	if n < 2:
		return list()
	prime = [True for _ in range(n + 1)]
	p = 3
	while p * p <= n:
		if prime[p]:
			for i in range(p * 2, n + 1, p):
				prime[i] = False
		p += 2
	r = [2]
	for p in range(3, n + 1, 2):
		if prime[p]:
			r.append(p)
	return r

def divs(n, start=1):
	divisors = []
	for i in range(start, int(math.sqrt(n) + 1)):
		if n % i == 0:
			if n / i == i:
				divisors.append(i)
			else:
				divisors.extend([i, n // i])
	return divisors

def divn(n, primes):
	divs_number = 1
	for i in primes:
		if n == 1:
			return divs_number
		t = 1
		while n % i == 0:
			t += 1
			n //= i
		divs_number *= t

def flin(d, x, default=-1):
	left = right = -1
	for i in range(len(d)):
		if d[i] == x:
			if left == -1:
				left = i
			right = i
	if left == -1:
		return (default, default)
	else:
		return (left, right)

def ceil(n, k):
	return n // k + (n % k != 0)

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(map(int, input().split()))

def lcm(a, b):
	return abs(a * b) // math.gcd(a, b)

def prr(a, sep=' '):
	print(sep.join(map(str, a)))

def dd():
	return collections.defaultdict(int)

def ddl():
	return collections.defaultdict(list)
input = sys.stdin.readline
ans = []
for _ in range(ii()):
	n = ii()
	res = 0
	while n >= 10:
		a = n % 10
		b = n - a
		n = a + b // 10
		res += b
	ans.append(res + n)
prr(ans, '\n')


number = int(input())
for i in range(number):
	s = 0
	money = int(input())
	while money != 0:
		for i in range(int(money), 0, -1):
			if (i + i / 10) % 1 == 0:
				s += i
				money -= i
				money += i / 10
				break
			elif i <= 9:
				s += i
				money -= i
				break
	print(s)


t = int(input())
for _ in range(t):
	s = int(input())
	ans = 0
	while s > 9:
		new = s % 10
		ans += s - new
		s = s // 10
		s += new
	ans += s
	print(ans)


for _ in range(int(input())):
	N = int(input())
	if N < 10:
		print(N)
	else:
		X = N
		while X >= 10:
			Z = X % 10
			X = X // 10
			N += X
			X += Z
		print(N)


t = int(input())
for i in range(t):
	s = int(input())
	count = 0
	answer = s
	new = 0
	while s >= 10:
		count += s // 10
		new = s // 10
		s = s - new * 10 + new
	answer += count
	print(answer)


t = int(input())
for _ in range(t):
	n = int(input())
	ans = 0
	kesh = 0
	while n // 10 >= 10 or n >= 10:
		ans += n // 10 * 10
		kesh = n // 10 * 10 // 10
		n = n % 10 + kesh
	else:
		ans += n % 10
	print(ans)


for _ in range(int(input())):
	x = int(input())
	tot = x
	while x >= 10:
		tot += x // 10
		r = x % 10
		x = x // 10 + r
	print(tot)


for _ in range(int(input())):
	n = int(input())
	c = 0
	while n != 0:
		x = n - n % 10
		c += x
		n = n % 10 + x // 10
		if n < 10:
			c += n
			break
	print(c)


import math
t = int(input())
while t:
	s = int(input())
	ans = 0
	while len(str(s)) != 1:
		temp = s - s % 10
		ans += temp
		s = s - temp + math.floor(temp / 10)
	ans += s
	print(ans)
	t -= 1


t = int(input())

def func(n):
	ans = 0
	temp = n
	while temp > 9:
		ans += temp - temp % 10
		temp = temp % 10 + temp // 10
	ans += temp
	return ans
while t:
	t -= 1
	n = int(input())
	print(func(n))


t = int(input())
for _ in range(t):
	s = int(input())
	ans = 0
	while s >= 10:
		rem = s % 10
		x = s - rem
		ans += x
		assert x % 10 == 0
		s -= x
		s += x // 10
	print(ans + s)


import sys
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	n = int(input())
	total_spent = 0
	while n > 9:
		spent = n // 10 * 10
		total_spent += spent
		cashback = spent // 10
		n = n - spent + cashback
	print(n + total_spent)


for _ in range(int(input())):
	k = int(input())
	res = 0
	while True:
		if k < 10:
			res += k
			break
		if k == 10:
			res += 11
			break
		dup = int((k - k % 10) / 10)
		res += int(k - k % 10)
		k = k % 10 + dup
	print(res)


t = int(input())
for _ in range(t):
	n = int(input())
	a = 0
	k = 0
	while n // 10 >= 10 or n >= 10:
		a += n // 10 * 10
		k = n // 10 * 10 // 10
		n = n % 10 + k
	else:
		a += n % 10
	print(a)


t = int(input())
for i in range(t):
	s = int(input())
	e = s - 1
	d = e // 9
	c = s + d
	print(c)


def main():
	for _ in range(int(input())):
		n = int(input())
		result = 0
		while n > 0:
			if n >= 10:
				spend = n - n % 10
			else:
				spend = n
			result += spend
			n = n - spend + spend // 10
		print(result)
main()


test_cases = int(input())
for z in range(test_cases):
	s = int(input())
	cashbk = 0
	a = s
	while a >= 10:
		r = a % 10
		a = a // 10
		cashbk = cashbk + a
		a += r
	print(s + cashbk)


t = int(input())
for _ in range(t):
	s = int(input())
	if s < 10:
		print(s)
	else:
		ans = 0
		while True:
			(x, y) = divmod(s, 10)
			ans += x * 10
			s = x + y
			if s < 10:
				ans += x + y
				break
		print(ans)


def solve(n):
	if n < 10:
		return n
	ans = 0
	while n >= 10:
		k = n // 10
		n = n - k * 10
		n = n + k
		ans = ans + k * 10
	ans += n
	return ans
t = int(input())
while t:
	t = t - 1
	n = int(input())
	print(solve(n))


t = int(input())
for ti in range(t):
	n = input()
	nn = int(n)
	l = len(n)
	ans = 0
	while nn >= 10:
		ret = nn // 10
		ans += nn // 10 * 10
		nn = nn - nn // 10 * 10 + ret
	print(ans + nn)


def check(n):
	s = 0
	while n >= 10:
		s += n - n % 10
		n = n // 10 + n % 10
	return n + s
for _ in range(int(input())):
	t = int(input())
	print(check(t))


import math
q = int(input())
for i in range(q):
	n = int(input())
	sum = 0
	rem = 0
	while n > 0:
		n += rem
		sum += n // 10 * 10
		rem = n % 10
		n = n // 10
	sum += rem
	sum += n
	print(sum)


from sys import stdin, stdout

def maxProfit(amount):
	currentSpending = 0
	while amount >= 10:
		balanceAmount = amount % 10
		currentSpending += amount - balanceAmount
		cashBack = (amount - balanceAmount) // 10
		amount = cashBack + balanceAmount
	return currentSpending + amount

def main():
	testCases = int(stdin.readline())
	for _ in range(testCases):
		s = int(stdin.readline())
		stdout.write(f'{maxProfit(s)}\n')
main()


import sys
import bisect
import math as mt
t = int(input())
mod = 10 ** 9 + 7
for _ in range(t):
	n = int(input())
	ans = 0
	while n >= 10:
		x = n // 10
		ans += 10 * (n // 10)
		n %= 10
		n += x
	print(ans + n)


T = int(input().strip())
for t in range(T):
	N = int(input().strip())
	total = 0
	while N >= 10:
		total += 10 * (N // 10)
		N = N // 10 + N % 10
	total += N % 10
	print(total)


t = int(input())
for cnt in range(t):
	n = int(input())
	res = 0
	while n >= 10:
		res += n // 10 * 10
		n = n // 10 + n % 10
	res += n
	print(res)


t = int(input())
for i in range(t):
	s = int(input())
	curr = s
	ext = 0
	while curr >= 10:
		ext += int(curr / 10)
		curr = curr % 10 + int(curr / 10)
	print(s + ext)


for i in range(int(input())):
	n = int(input())
	res = 0
	while 1:
		yy = n // 10
		x = yy * 10
		res += x
		n -= x
		earn = x // 10
		n += earn
		if n < 10:
			res += n
			break
	print(res)


for tc in range(int(input())):
	n = int(input())
	if n < 10:
		print(n)
	elif n == 10:
		print(11)
	elif n % 9:
		print(n + n // 9)
	else:
		print(n + n // 9 - 1)


for _ in range(int(input())):
	s = int(input())
	a = s
	while s >= 10:
		a += s // 10
		s = s // 10 + s % 10
	print(a)


for _ in range(int(input())):
	n = int(input())
	sum_ = 0
	while n >= 10:
		ost = n % 10
		sum_ += n - ost
		n //= 10
		n += ost
	sum_ += n
	print(sum_)


import math
for _ in range(int(input())):
	n = int(input())
	nn = 0
	while n > 0:
		tmp = math.floor(n / 10)
		if tmp > 0:
			n -= tmp * 10
			nn += tmp * 10
			n += tmp
		else:
			nn += n
			n = 0
	print(nn)


ITR = int(input())
import math
for itr in range(ITR):
	N = int(input())
	totalSpent = 0
	while N >= 10:
		spending = N - N % 10
		totalSpent += spending
		gain = spending / 10
		N = N % 10 + gain
	totalSpent += N
	print(round(totalSpent))


q = int(input())
for i in range(q):
	a = int(input())
	print(int(a * 1.111111111))


num = int(input())
inp = []
for i in range(0, num):
	inp.append(int(input()))
for i in range(0, num):
	n = inp[i]
	burles = 0
	while n > 9:
		k = n - n % 10
		burles += k
		n = n - k + round(k / 10)
	burles += n
	print(burles)


t = int(input())
for _ in range(t):
	n = int(input())
	spent = 0
	while n != 0:
		if n // 10 != 0:
			x = n - n % 10
			spent += x
			n %= 10
			n += x // 10
		else:
			spent += n
			n -= n
			n += n // 10
	print(spent)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
mod2 = 998244353
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def JA(a, sep):
	return sep.join(map(str, a))

def JAA(a, s, t):
	return s.join((t.join(map(str, b)) for b in a))

def main():
	t = I()
	rr = []
	for _ in range(t):
		n = I()
		r = 0
		while n >= 10:
			t = n // 10 * 10
			r += t
			n -= t
			n += t // 10
		rr.append(r + n)
	return JA(rr, '\n')
print(main())


t = int(input())
while t:
	n = int(input())
	spent = 0
	while n >= 10:
		rem = n % 10
		s = n // 10
		spent += s * 10
		n = rem + s
	spent += n
	print(spent)
	t -= 1


t = int(input())
for x in range(t):
	n = int(input())
	z = 0
	while n > 0:
		z += n // 10 * 10
		if n >= 10:
			n = n // 10 + n % 10
		else:
			z += n
			n = 0
	print(z)


from math import floor
for _ in range(int(input())):
	n = int(input())
	s = str(n)
	p = 0
	while True:
		if len(s) == 1:
			break
		p += int(s[:-1] + '0')
		n = int(s[:-1]) + int(s[-1])
		s = str(n)
	p = p + int(s)
	print(p)


def solve(s):
	x = 0
	count = 0
	while True:
		x = s // 10 * 10
		count += x
		s -= x
		s += x / 10
		if s < 10:
			count += s
			break
	print(int(count))
t = int(input())
for _ in range(t):
	s = int(input())
	solve(s)


t = int(input())
while t:
	n = int(input())
	ans = 0
	r = n % 10
	while n >= 10:
		r = n % 10
		ans += n - r
		n //= 10
		n += r
	r = n % 10
	print(ans + r)
	t -= 1


t = int(input())
for tt in range(t):
	n = int(input())
	a = n - n % 10
	balance = n % 10 + n // 10
	while balance >= 10:
		a += balance - balance % 10
		balance = balance % 10 + balance // 10
	a += balance
	print(a)


import sys
reader = (line.rstrip() for line in sys.stdin)
input = reader.__next__
t = int(input())
for _ in range(t):
	s = int(input())
	spent = 0
	while s >= 10:
		cashback = s // 10
		spent += cashback * 10
		s = s % 10 + cashback
	spent += s
	print(spent)


for _ in range(int(input())):
	n = int(input())
	re = 0
	while True:
		if n < 10:
			re += n
			break
		re += int(n / 10) * 10
		n = int(n / 10) + n % 10
	print(re)


import sys

def spend(s):
	if s < 10:
		return s
	return 10 * (s // 10) + spend(s % 10 + s // 10)
for _ in range(int(input())):
	s = int(sys.stdin.readline().split()[0])
	print(spend(s))


for _ in range(int(input())):
	N = int(input())
	Sum = N
	X = 0
	while N != 0:
		X = X + N % 10
		N = N // 10
		Sum = Sum + N
	Sum += X // 10
	Sum += (X // 10 + X % 10) // 10
	print(Sum)


def main():
	t = int(input())
	for i in range(t):
		s = int(input())
		opeCount = 0
		while s // 10 != 0:
			opeCount += s // 10 * 10
			s += s // 10 - s // 10 * 10
		print(s + opeCount)
main()


t = int(input(''))
num = []
for i in range(t):
	num.append(int(input('')))
for i in num:
	s = 0
	while i > 9:
		s = s + i - i % 10
		i = i % 10 + i // 10
	print(s + i)


t = int(input())
Ans = ''
for p in range(t):
	s = int(input())
	ans = 0
	while s > 9:
		m_ten = s // 10
		ans += m_ten * 10
		s = s - m_ten * 10 + m_ten
	Ans += str(ans + s) + '\n'
print(Ans)


def total(s):
	q = s // 10
	r = s % 10
	if q == 0:
		return r
	return q * 10 + total(q + r)
t = int(input())
for i in range(t):
	s = int(input())
	print(total(s))


import math
import sys

def sol(n):
	if n < 10:
		return 0
	v = math.floor(n / 10)
	return v + sol(n - v * 10 + v)

def sol2(n):
	res = n
	while n >= 10:
		v = math.floor(n / 10)
		res += v
		n = n - v * 10 + v
	return res
t = int(input().strip())
for i in range(t):
	n = int(input().strip())
	print(sol2(n))


def spend(n):
	if n < 10:
		return n
	val = 10 * (n // 10)
	rem = n - val
	sum = val
	while val != 0:
		val = val // 10
		val += rem
		a = val
		val = 10 * (val // 10)
		rem = a - val
		sum += val
	sum += rem
	return sum
t = int(input())
for _ in range(t):
	print(spend(int(input())))


def main():
	t = int(input())
	for _ in range(t):
		s = int(input())
		result = 0
		while True:
			waste = s // 10 * 10
			if waste == 0:
				result += s
				break
			result += waste
			residue = s - waste
			cashback = waste // 10
			s = residue + cashback
		print(result)
	return 0
main()


import sys
t = int(sys.stdin.readline())
for _ in range(t):
	s = int(sys.stdin.readline())
	result = 0
	if s >= 1 and s <= 9:
		print(s)
		continue
	while True:
		pay = s // 10 * 10
		result += pay
		s -= pay
		cashback = pay // 10
		s += cashback
		if s <= 9:
			result += s
			print(result)
			break


nt = int(input())
for _ in range(nt):
	n = int(input())
	res = n
	while n >= 10:
		ad = n // 10
		rem = n % 10
		res += ad
		n = ad + rem
	print(res)


t = int(input())
for i in range(0, t):
	s = int(input())
	m = 0
	temp = 0
	while s >= 10:
		temp = int(s / 10)
		s -= temp * 10
		m += temp * 10
		s += temp
	m += s
	print(m)


def f(n):
	return n + (n - 1) // 9
t = int(input())
for _ in range(t):
	n = int(input())
	print(f(n))


t = int(input())
for i in range(t):
	n = int(input())
	track = n
	while track >= 10:
		rem = track % 10
		cash_back = track // 10
		n += cash_back
		track = cash_back + rem
	print(n)


n = int(input())
for i in range(n):
	ans = 0
	x = int(input())
	while True:
		y = x % 10
		ans += x - y
		x = x // 10 + y
		if y == x:
			ans += y
			break
	print(ans)


for _ in [0] * int(input()):
	s = int(input())
	a = 0
	c = 0
	n = 0
	while s >= 10:
		n += 10 * (s // 10)
		s -= n
		a += n
		c += n / 10
		s += c
		c = 0
		n = 0
	if s != 0:
		a += s
	print(int(a))


t = int(input())
for i in range(t):
	s = int(input())
	spent = 0
	while s > 0:
		cashback = s // 10
		s -= 10 * cashback
		spent += 10 * cashback
		s += cashback
		if s < 10:
			spent += s
			break
	print(spent)


for _ in range(int(input())):
	n = int(input())
	(a, b, c) = (0, 0, 0)
	while n > 9:
		a = n % 10
		b = n // 10
		c += b * 10
		n = b + a
	c += n
	print(c)


t = int(input())
for i in range(t):
	s = int(input())
	spent = s
	while True:
		q = s // 10
		rem = s % 10
		if q == 0:
			break
		else:
			spent += q
			s = q + rem
	print(spent)


t = int(input())
for i in range(t):
	n = int(input())
	s = 0
	while n >= 10:
		tmp = n % 10
		x = int((n - tmp) / 10)
		s += n - tmp
		n = tmp + x
	print(s + n)


import math
total = int(input())
initial_burles = []
for x in range(total):
	initial_burles.append(int(input()))
for start in initial_burles:
	burles = 0
	loop = start
	while loop >= 10:
		burles += math.trunc(loop / 10)
		loop = loop % 10 + math.trunc(loop / 10)
	print(burles + start)


t = int(input())
for _ in range(t):
	cost = cash_back = remain = 0
	s = int(input())
	while s >= 10:
		cost += s - s % 10
		cash_back = s // 10
		remain = s % 10 + cash_back
		s = remain
	print(cost + s)


iteration = int(input())
ans = {}
for i in range(10):
	ans[i] = i

def f(n):
	if n in ans.keys():
		return ans[n]
	temp = n // 10 * 10 + f(n % 10 + n // 10)
	ans[n] = temp
	return temp
for _ in range(iteration):
	s = int(input())
	print(f(s))


import math

def food(n):
	temp = n
	sum = 0
	c = 0
	while n >= 10:
		sum = sum + math.floor(n / 10) * 10
		n = int(n / 10) + n % 10
	print(sum + n)
t = int(input())
for i in range(t):
	n = int(input())
	food(n)


cs = int(input())
while cs > 0:
	n = int(input())
	s = 0
	while n >= 10:
		t = n // 10
		s = s + t * 10
		n = n % 10 + t
	s = s + n
	print(s)
	cs = cs - 1


n = int(input())
for x in range(n):
	buy = int(input())
	total = buy
	while True:
		if buy // 10 == 0:
			break
		temp = buy // 10
		total += temp
		buy %= 10
		buy += temp
	print(total)


tests = int(input())
for _ in range(tests):
	n = int(input())
	original = n
	extra = 0
	bonus = 1
	while bonus != 0:
		bonus = n // 10
		n = n % 10 + bonus
		extra += bonus
	print(original + extra)


from math import ceil
for _ in range(int(input())):
	n = input()
	k = len(n) - 1
	n = int(n)
	ans = 0
	temp = 10 ** 10
	while n > 0:
		temp = n - n % 10 ** k
		ans += temp
		cb = temp // 10
		n -= temp
		n += cb
		k = len(str(n)) - 1
	print(ans)


for _ in range(int(input())):
	n = int(input())
	cnt = 0
	while n > 0:
		if n < 10:
			cnt = cnt + n
			break
		k = n % 10
		cnt = cnt + n - k
		n = n // 10 + k
	print(cnt)


t = int(input())
s = []
for kjfuh in range(0, t):
	n = int(input())
	g = 0
	f = n // 9
	p = n % 9
	g += f * 10
	g += p
	if n % 9 == 0:
		s.append(g - 1)
	else:
		s.append(g)
for i in s:
	print(i)


import sys, bisect, copy, heapq
from collections import defaultdict, Counter, deque

def input():
	return sys.stdin.readline()

def print(arg, *argv, end=None):
	sys.stdout.write(str(arg))
	for i in argv:
		sys.stdout.write(' ' + str(i))
	sys.stdout.write(end) if end or end == '' else sys.stdout.write('\n')

def mapi():
	return map(int, input().split())

def maps():
	return map(str, input().split())

def solve():
	t = 1
	t = int(input())
	for _ in range(t):
		n = int(input())
		if n < 10:
			print(n)
		else:
			tm = n // 10
			res = 0
			while n > 0:
				if n < 10:
					res += n
					break
				res += n // 10 * 10
				n = n - n // 10 * 10 + n // 10 * 10 // 10
			print(res)
solve()


t = int(input().strip())

def f(n):
	if n < 10:
		return n
	ret = f(n // 10)
	t = ret % 10 + n % 10
	return (ret + t // 10) * 10 + t // 10 + t % 10
for _ in range(t):
	s = int(input().strip())
	print(f(s))


t = int(input())
while t > 0:
	count = 0
	n = int(input())
	while n > 0:
		if n < 10:
			count += n
			n = 0
		else:
			k = n - n % 10
			count += k
			n -= k
			n += k // 10
	print(count)
	t -= 1


t = int(input())
while t:
	num = int(input())
	print(int(num // 0.9))
	t -= 1


for i in range(int(input())):
	k = str(input())
	print(int(int(k) * (1 + float('.' + '1' * (len(k) + 1)))))


t = int(input())
for q in range(t):
	n = int(input())
	t = 0
	if n < 10:
		print(n)
	else:
		t += n
		while n > 10:
			re = n % 10
			n = n // 10
			t += n
			n += re
		if n % 10 == 0:
			t += 1
		print(t)


t = int(input())
for _ in range(0, t):
	n = int(input())
	k = 0
	a = 0
	r = 0
	if n < 10:
		print(n)
	else:
		while n >= 10:
			if n >= 10:
				k = k + n % 10
				a = a + n // 10 * 10
				n = n // 10
			if k + n >= 10 and n < 10:
				r = n
				n = n + k
				k = 0
			if k < 10 and k + n < 10:
				a = a + k + n
				break
		print(a)


t = int(input())

def get_res(x):
	p = x // 10 + x % 10
	if p >= 10:
		return p - p % 10 + get_res(p)
	return p
for _ in range(t):
	s = int(input())
	res = s - s % 10 + get_res(s)
	print(res)


import math
from collections import defaultdict, Counter, deque
INF = float('inf')

def gcd(a, b):
	while b:
		(a, b) = (b, a % b)
	return a

def primeFactor(n):
	if n % 2 == 0:
		return 2
	i = 3
	while i ** 2 <= n:
		if n % i == 0:
			return i
		i += 1
	return n

def main():
	n = int(input())
	res = 0
	while n > 0:
		l = len(str(n)) - 1
		div = int('1' + '0' * l)
		buy = n // div * div
		back = math.floor(buy / 10)
		n -= buy
		n += back
		res += buy
	print(res)
t = int(input())
for _ in range(t):
	main()


from collections import *
import sys

def ri():
	return int(input())

def rl():
	return list(map(int, input().split()))
t = ri()
for _ in range(t):
	s = ri()
	ans = 0
	while s // 10 > 0:
		q = s // 10
		ans += 10 * q
		s = s - 10 * q + q
	ans += s
	print(ans)


import sys

def rl():
	return sys.stdin.readline().strip()

def rn():
	return list(map(int, sys.stdin.readline().strip().split()))

def rln(n):
	l = [None] * n
	for i in range(n):
		l[i] = int(rl())
	return l
t = int(input())
for _ in range(t):
	cash = int(input())
	cashback = 0
	gain = 0
	gain_cur = 0
	while cash != 0:
		n = len(str(cash)) - 1
		gain_cur = cash // 10 ** n * 10 ** n
		rest = cash % 10 ** n
		cashback = gain_cur // 10
		cash = rest + cashback
		gain += gain_cur
	print(gain)


from sys import stdin, stdout

def solve():
	n = int(input())
	s = 0
	r = 0
	while n >= 10:
		r = n % 10
		s += n // 10 * 10
		n = n // 10 + r
	return s + n
t = int(input())
for i in range(t):
	print(solve())


for _ in range(int(input())):
	n = int(input())
	t = n
	while t > 9:
		r = t // 10
		n = n + r
		t = r + t % 10
	print(n)


t = int(input())
while t > 0:
	s = int(input())
	c = 0
	while s >= 10:
		c += s // 10 * 10
		s = s % 10 + s // 10
	c += s
	print(c)
	t -= 1


a = int(input())
for i in range(a):
	t = int(input())
	ans = 0
	while t:
		if t < 10:
			ans += t
			break
		ans += t // 10 * 10
		t = t // 10 + t % 10
	print(ans)


t = int(input())
while t:
	s = int(input())
	n = s
	sum = 0
	while True:
		a = s // 10
		sum += a
		if s % 10 + a >= 10:
			s = a + s % 10
		else:
			break
	print(n + sum)
	t -= 1


t = int(input())
while t > 0:
	n = int(input())
	count = 0
	while True:
		if n < 10:
			count += n
			break
		if n == 10:
			count += 11
			break
		x = n // 10
		y = n % 10
		count += x * 10
		n = x + y
	print(count)
	t -= 1


t = int(input())
for i in range(t):
	s = int(input())
	su = 0
	while s > 9:
		su += s // 10 * 10
		s = s // 10 + s % 10
	print(su + s)


n = int(input())
for i in range(n):
	m = input()
	l = len(m)
	s = '1.'
	s += '1' * l
	dd = float(s)
	k = dd * int(m)
	d = int(round(k, l))
	print(d)


n = int(input())
for i in range(n):
	s = int(input())
	summary = s
	while s >= 10:
		tens = s // 10
		ost = s % 10
		s = ost + tens
		summary += tens
	print(summary)


for _ in range(int(input())):
	x = int(input())
	print(x + (x - 1) // 9)


def cashback(money):
	if money < 10:
		return money
	not_spent = money % 10
	spent_money = money - not_spent
	money_from_cashback = money // 10
	return spent_money + cashback(money_from_cashback + not_spent)
number_of_tests = int(input())
for _ in range(number_of_tests):
	money = int(input())
	result = cashback(money)
	print(result)


t = int(input())
for _ in range(t):
	x = int(input())
	k = int(x)
	while x >= 10:
		chk = x // 10
		x = x % 10
		x = x + chk
		k = k + chk
	print(k)


n = int(input())
for i in range(n):
	s = int(input())
	su = 0
	while s > 0:
		cb = s // 10
		spent = cb * 10 if cb else s
		su += spent
		s -= spent
		s += cb
	print(su)


for _ in range(int(input())):
	n = int(input())
	res = n
	while n >= 10:
		tem = n // 10
		n -= tem * 10
		n += tem
		res += tem
	print(res)


t = int(input())
while t > 0:
	n = eval(input())
	s = 0
	while n > 0:
		if n == 10:
			x = 1
			s += n
			n = 1
		elif n < 10:
			x = 0
			s += n
			n = 0
			break
		else:
			l = len(str(n))
			p = pow(10, l - 1)
			x = p * (n // p)
			n -= x
			s = s + x
			x = x // 10
			n += x
	print(s)
	t -= 1


for t in range(int(input())):
	s = int(input())
	m = s
	while s // 10:
		m += s // 10
		s = s // 10 + s % 10
	print(m)


import sys
for i in range(int(sys.stdin.readline())):
	x = int(sys.stdin.readline())
	res = 0
	while x >= 10:
		rem = x % 10
		x = x - rem
		res += x
		x = x / 10 + rem
	res += x
	print(int(res))


n = int(input())
for i in range(n):
	num = int(input())
	ost = 0
	out = 0
	while num > 9:
		x = num % 10
		num -= x
		ost = num // 10
		out += num
		num = ost + x
	out += num
	print(out)


for _ in range(int(input())):
	n = int(input())
	m = n
	while n >= 10:
		m += n // 10
		n = n % 10 + n // 10
	print(m)


import math
entrada = int(input())
for _ in range(entrada):
	quantidade = input()
	quantidade = int(quantidade)
	if quantidade >= 10:
		lucro = quantidade
		dinheiroDeVolta = 0
		while quantidade >= 10:
			exp1 = math.floor(quantidade / 10)
			dinheiroDeVolta += exp1
			exp2 = math.floor(quantidade / 10)
			dinheiroDeVoltaAgora = exp2
			top = quantidade - dinheiroDeVoltaAgora * 10
			quantidade = top + dinheiroDeVoltaAgora
		lucro += dinheiroDeVolta
		print(lucro)
	elif quantidade < 10:
		print(quantidade)


t = int(input())
for i in range(t):
	n = int(input())
	ans = 0
	n1 = 0
	while n >= 10:
		n1 = int(n / 10)
		ans += 10 * n1
		n -= 9 * n1
	ans += n
	print(ans)


t = int(input())
for _ in range(t):
	n = int(input())
	if n % 9 == 0:
		print(int(n / 0.9) - 1)
		continue
	print(int(n / 0.9))


t = int(input())
for _ in range(t):
	x = int(input())
	total = 0
	while x >= 10:
		div = x // 10
		total += div * 10
		x %= 10
		x += div
	total += x
	print(total)


x = int(input())
for i in range(x):
	P = int(input())
	count = 0
	while P >= 10:
		Q = int(P / 10)
		R = P % 10
		count += Q * 10
		P = Q + R
	print(count + P)


import math as m
t = int(input())
i = 0
while i < t:
	b = int(input())
	if b < 10:
		print(b)
	elif b >= 10:
		s = b
		c = 0
		while b >= 10:
			c += m.floor(b / 10)
			ca = m.floor(b / 10)
			v = b - ca * 10
			b = v + ca
		s += c
		print(s)
	i += 1


def f(n):
	if n < 10:
		return n
	q = n // 10
	r = n % 10
	return 10 * q + f(q + r)
n1 = int(input())
for i in range(n1):
	n = int(input())
	print(f(n))


def main():
	n = int(input())
	answer = []
	for i in range(n):
		answer.append(in_put())
	for i in range(n):
		print(answer[i])

def in_put():
	n = int(input())
	m = count = ans = 0
	if n < 10:
		ans = n
		return ans
	else:
		m = n // 10
		while m != 0:
			ans = ans + 10 * m
			n = n % 10 + m
			m = n // 10
		return ans + n % 10
main()


x = int(input())
cases = []
for i in range(0, x):
	cases.append(int(input()))
sols = []
for i in cases:
	sol = 0
	while i >= 10:
		times = int(i / 10)
		sol += times * 10
		i -= times * 10
		i += times
	sol += i
	sols.append(sol)
for i in sols:
	print(i)


t = int(input())
for i in range(t):
	s = int(input())
	a = s
	while s >= 10:
		r = s % 10
		s = s // 10
		a += s
		s += r
	print(a)


def main():
	for _ in range(int(input())):
		n = int(input())
		ret = n // 10
		while ret != (n + ret) // 10:
			ret = (n + ret) // 10
		print(n + ret)
main()


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_intList_from_str = lambda : list(map(int, list(sys.stdin.readline().strip())))
get_charList_from_str = lambda : list(sys.stdin.readline().strip())
get_char_list = lambda : sys.stdin.readline().strip().split()
get_int = lambda : int(sys.stdin.readline())
pt = lambda x: sys.stdout.write(str(x))
for i in range(get_int()):
	n = get_int()
	s = 0
	while n >= 10:
		residue = n % 10
		s += n - residue
		n = residue + (n - residue) // 10
	s += n
	print(s)


ans = []
for i in range(int(input())):
	n = input()
	if int(n) < 10:
		print(n)
	else:
		t = int(n)
		(s, counter) = (0, 0)
		while int(n) >= 10:
			s = n[0]
			s = s + '0' * (len(n) - 2)
			counter += int(s)
			n = int(n[1:]) + int(s)
			n = str(n)
		ans.append(t + counter)
print(*ans, sep='\n')


n = int(input())
for _ in range(n):
	s = int(input())
	x = s * 10
	print(x // 9 - (1 if x // 9 % 10 == 0 else 0))


for i in range(int(input())):
	s = int(input())

	def money(s):
		if s < 10:
			return s
		else:
			return int(s / 10) * 10 + money(int(s / 10) + (s - int(s / 10) * 10))
	print(money(s))


T = int(input())
for _ in range(T):
	n = int(input())
	ans = 0
	while True:
		if n // 10 < 1:
			break
		else:
			ans += n - n % 10
			n = n // 10 + n % 10
	print(ans + n)


import math
t = int(input())
for i in range(t):
	num = int(input())
	sum = 0
	while num > 9:
		add = 10 ** int(math.log(num, 10))
		num -= add
		sum += add
		num += add // 10
	sum += num
	print(sum)


t = int(input())
for te in range(t):
	n = int(input())
	res = int(0)
	while n != 0:
		c = n // 10
		pend = n % 10
		if c != 0:
			res += c * 10
		else:
			res += pend
			pend = 0
		n = pend + c
	print(res)


import sys
input = sys.stdin.readline
T = int(input())
for _ in range(T):
	s = int(input())
	ans = 0
	while s >= 10:
		ans += s - s % 10
		s = s // 10 + s % 10
	print(ans + s)


t = int(input())
for i in range(t):
	s = int(input())
	n = 0
	while s >= 10:
		(a, s) = divmod(s, 10)
		s += a
		n += a * 10
	n += s
	print(n)


t = int(input())
for _ in range(t):
	s = int(input())
	r = 0
	d = 0
	while True:
		d = s % 10
		r = r + s - d
		s = s // 10
		s = s + d
		if s < 10:
			break
	print(r + s)


cases = int(input())
while cases:
	cases -= 1
	num = int(input())
	ans = 0
	ans += num // 10 * 10
	rem = num % 10 + num // 10
	while rem >= 10:
		ans += rem // 10 * 10
		rem = rem % 10 + rem // 10
	print(ans + rem)


import math
for _ in range(int(input())):
	s = int(input())
	ans = 0
	while s > 9:
		l = s // 10
		ans += 10 * l
		s = s - 10 * l + l
	print(ans + s)


t = int(input())
for _ in range(t):
	x = int(input())
	ans = 0
	while x >= 10:
		plus = x - x % 10
		ans += plus
		tmp = x // 10
		x -= plus
		x += tmp
	print(ans + x)


for _ in range(int(input())):
	s = int(input())
	ans = s
	while s >= 10:
		ans += s // 10
		s = s // 10 + s % 10
	print(ans)


t = int(input())
for i in range(0, t):
	n = int(input())
	a = n / 9
	b = n // 9
	if a == b:
		print(n + b - 1)
	else:
		print(n + b)


import sys
r_input = sys.stdin.readline
T = int(r_input())
for _ in range(T):
	N = int(r_input())
	total = 0
	while True:
		div = N // 10
		N %= 10
		total += div * 10
		N += div
		if not N // 10:
			total += N
			break
	print(total)


for i in range(int(input())):
	a = int(input())
	c = a
	x = 0
	for j in range(len(str(c))):
		b = str(a)
		d = int(b[-1])
		a = a - d
		x = x + a
		a = a // 10 + d
	print(x + a)


n = int(input())
for x in range(n):
	m = int(input())
	mm = m
	wyn = 0
	while True:
		curr = m // 10
		m = m % 10 + curr
		mm += curr
		if m < 10:
			break
	print(mm)


import random
from bisect import bisect_left, bisect_right
from typing import List
import collections
import bisect
import itertools
import functools
from fractions import gcd
import heapq
from math import ceil, sqrt, floor
import sys
sys.setrecursionlimit(50000)
import collections
from collections import defaultdict, deque
import collections
import bisect
from collections import defaultdict, deque
import collections
t = int(input())
for _ in range(t):
	dollar = int(input())
	total = 0
	while dollar >= 10:
		spend = 10 * (dollar // 10)
		total += spend
		dollar = dollar - spend + spend // 10
	total += dollar
	print(total)


import sys
input = sys.stdin.readline
tc = int(input())
for _ in range(tc):
	s = int(input())
	result = 0
	while s >= 10:
		result += s // 10 * 10
		s = s % 10 + s // 10
	result += s
	print(result)


N = int(input())
for _ in range(N):
	s = input()
	res = int(s)
	cb = '0'
	while len(s):
		s = str(int(s) + int(cb))
		cb = s[0] + '0' * (len(s) - 2)
		res += int(cb)
		s = s[1:]
	res -= int(cb)
	print(res)


t = int(input())
for q in range(0, t):
	num = int(input())
	sum_val = 0
	while True:
		if num < 10:
			break
		else:
			sum_val = sum_val + int(num / 10) * 10
			num = int(num / 10) + num % 10
	sum_val = sum_val + num
	print(sum_val)


for i in range(int(input())):
	n = int(input())
	a = 0
	y = 1000000000
	while n > 0:
		while n < y:
			y //= 10
		a = a + y
		n -= y - y // 10
	print(int(a))


t = int(input())
for i in range(t):
	n = int(input())
	count = 0
	while n >= 1000000:
		count += 1000000
		n -= 900000
	while n >= 10000:
		count += 10000
		n -= 9000
	while n >= 100000:
		count += 100000
		n -= 90000
	while n >= 100:
		count += 100
		n -= 90
	while n >= 1000:
		count += 1000
		n -= 900
	while n >= 10:
		count += 10
		n -= 9
	count += n
	print(count)


import math

def sumall(s):
	temp = s
	sumi = 0
	while s > 0:
		sumi += s % 10
		s = s // 10
	return sumi - temp % 10
t = int(input())
while t:
	t -= 1
	s = int(input())
	ss = s
	ten = 1
	carry = 0
	sum = 0
	while ten > 0:
		ten = s // 10
		carry = s % 10
		sum += ten
		s = carry + ten
	if sum == 0:
		print(s)
	else:
		print(sum, s, sep='')


import math
for _ in range(int(input())):
	k = int(input())
	a = 0
	while k > 0:
		c = k // 10
		a += c * 10
		k -= 9 * c
		if k < 10:
			a += k
			k = 0
	print(a)


import math
t = int(input())
for i in range(t):
	s = int(input())
	print(math.ceil(s * 10 / 9) - 1)


t = int(input())
for i in range(t):
	n = input()
	total = 0
	while n != '0':
		total = total + int(n[0]) * 10 ** (len(n) - 1)
		n = str(int(n) - int(n[0]) * 10 ** (len(n) - 1) + int(int(n[0]) * 10 ** (len(n) - 2)))
	print(total)


MOD = 1000000007
MOD2 = 998244353
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
for _ in range(ii()):
	n = ii()
	sp = 0
	while n > 10:
		r = n // 10
		sp += r * 10
		n = n % 10 + r
	print(sp + n + n // 10)


for tin in range(int(input())):
	n = int(input())
	if n % 9 != 0:
		print(n // 9 * 10 + n % 9)
	else:
		print((n // 9 - 1) * 10 + 9)


t = int(input())
for __ in range(t):
	n = int(input())
	if n % 9 == 0:
		print(n + (n // 9 - 1))
	else:
		print(n + n // 9)


t = int(input())
for _ in range(t):
	x = int(input())
	spend = 0
	while x >= 10:
		spend += x // 10 * 10
		x = x % 10 + x // 10
	print(spend + x)


for _ in range(int(input())):
	n = int(input())
	amount = 0
	while True:
		quo = n // 10
		if quo == 0:
			amount += n
			break
		quo = quo * 10
		amount += quo
		n -= quo
		n += quo // 10
	print(amount)


t = int(input())
for i in range(t):
	a = int(input())
	c = 0
	while a >= 10:
		b = a // 10
		a = a - b * 9
		c += b * 10
	c += a
	print(c)


for _ in range(int(input())):
	x = 0
	n = int(input())
	while n >= 10:
		j = len(str(n)) - 1
		n -= 10 ** j
		n += 10 ** (j - 1)
		x += 10 ** j
	print(x + n)


from math import ceil
from math import factorial
from collections import *
from operator import itemgetter
ii = lambda : int(input())
iia = lambda : list(map(int, input().split()))
isa = lambda : list(input().split())
t = ii()
for i in range(t):
	n = ii()
	x = 0
	s = n
	while n > 0:
		s += n // 10
		x = n // 10
		y = n % 10
		n = x + y
		if x == 0:
			break
	print(int(s))


t = int(input())
while t > 0:
	t -= 1
	s = int(input())
	ans = 0
	cb = 0
	while s >= 10:
		g = s // 10 * 10
		ans += g
		s = s - g + g // 10
	print(ans + s)


import math
y = int(input())
while y > 0:
	y -= 1
	s = int(input())
	ans = 0
	while s > 0:
		for i in range(10, -1, -1):
			k = 10 ** i
			if s // k != 0:
				ans += s // k * k
				p = s // k * k
				s -= p
				s += p // 10
				break
	print(ans)


t = int(input())
for i in range(t):
	n = int(input())
	ans = 0
	yep = 10 ** 8
	while n:
		if n >= 10:
			t = n - n % 10
			ans += t
			n += t // 10 - t
		else:
			ans += n
			n //= 10
	print(ans)


t = int(input())
for count in range(t):
	summ = 0
	rem = int(input())
	while rem != 0:
		if rem >= 10:
			summ += rem - rem % 10
			rem = rem // 10 + rem % 10
		else:
			summ += rem
			break
	print(summ)


t = int(input())
for i in range(t):
	p = int(input())
	z = 0
	while p >= 10:
		z += 10 * (p // 10)
		p = p // 10 + p % 10
	print(z + p)


for i in range(int(input())):
	n = int(input())
	res = 0
	if n < 10:
		res = n
		print(res)
	else:
		while n >= 10:
			c = n // 10
			res = res + c * 10
			k = n % 10
			n = n // 10
			n += k
		print(res + n)


from sys import stdin
from collections import Counter
from math import sqrt, factorial, log10, log, floor, ceil
from itertools import permutations, combinations, combinations_with_replacement
input = stdin.readline

def li():
	return list(map(int, input().split()))

def lis():
	return list(map(str, input().split()))

def mp():
	return map(int, input().split())

def inp():
	return int(input())

def inps():
	return str(input().strip())

def pr(n):
	return stdout.write(str(n) + '\n')
INF = float('inf')

def solve():
	n = inp()
	r = 0
	if n % 9 == 0:
		r = 1
	print(n + n // 9 - r)
t = inp()
for i in range(t):
	solve()


def foodbuy(burles):
	res = 0
	while burles >= 10:
		k = burles // 10
		res += k * 10
		burles %= 10
		burles += k
	res += burles
	print(res)
ip = int(input())
tcs = []
while ip != 0:
	x = int(input())
	tcs.append(x)
	ip -= 1
for i in tcs:
	foodbuy(i)


import sys
rl = sys.stdin.readline
T = int(input())
for _ in range(T):
	s = int(rl().rstrip())
	answer = 0
	if s / 9 == s // 9:
		answer = s + s // 9 - 1
	else:
		answer = s + s // 9
	print(answer)


for _ in range(int(input())):
	n = int(input())
	s = str(n)
	res = n
	i = n - 2
	while len(s) > 1:
		res += int(s[:-1])
		tmp = int(s[:-1]) + int(s[-1])
		s = str(tmp)
	print(res)


def code(n):
	for _ in range(n):
		m = int(input())
		s = 0
		if len(str(m)) <= 1:
			print(m)
		else:
			while len(str(m)) > 1:
				k = m // 10 * 10
				m = m - k
				m = m + round(k // 10)
				s = s + k
			s = s + m
			print(s)
n = int(input())
code(n)


t = int(input())
for i in range(t):
	n = int(input())
	a = n
	d = 0
	while n >= 10:
		a = a + n // 10
		if n % 10 == 0:
			h = 1
		else:
			h = 0
		n = n // 10 + n % 10
		d += 1
	print(a)


def ri():
	return int(input())

def rl():
	return list(map(int, input().split()))

def solve():
	n = ri()
	spent = 0
	while n >= 10:
		spend = n // 10
		spent += 10 * spend
		n = n - 10 * spend + spend
	print(spent + n)
t = ri()
for i in range(t):
	solve()


for _ in range(int(input())):
	n = int(input())
	z = n
	count = len(str(n))
	for i in range(count):
		a = n // 10
		if a < 1:
			break
		else:
			n = z + a
	print(n)


import math

def f(x, total=0):
	x = str(x)
	if len(x) == 1:
		return total + int(x)
	else:
		y = int(x[0] + (len(x) - 1) * '0')
		total += y
		x = int(x[1:]) + math.floor(y / 10)
		return f(x, total=total)
for _ in range(int(input())):
	print(f(int(input())))


for _ in range(int(input())):
	n = int(input())
	z = []
	burl = 0
	while True:
		j = n // 10
		if j == 0:
			break
		burl += j * 10
		n = n % 10 + j
	burl += n
	print(burl)


t = int(input())
for i in range(t):
	n = int(input())
	ans = n
	while n >= 10:
		cash = n // 10
		n = n - n // 10 * 9
		ans += cash
	print(ans)


import math
x = int(input(''))
mon = []
for i in range(x):
	l = int(input(''))
	mon.append(l)
for i in mon:
	f = 0
	while i > 9:
		amo = 10 ** (len(str(int(i))) - 1)
		i -= amo
		f += amo
		i = i + 0.1 * amo
	if i != 0:
		f += i
	print(int(f))


import math
t = int(input())
for _ in range(t):
	n = int(input())
	bur = 0
	while n >= 10:
		l = int(math.log10(n))
		desc = pow(10, l)
		rem = n % desc
		p = math.floor(n // desc) * desc
		bur += p
		rem = rem + p * 0.1
		n = rem
	print(int(bur + n))


from math import floor
n = int(input())
for i in range(n):
	m = int(input())
	if m >= 10:
		ans = m // 9 * 10 + m % 9
		if m % 9 == 0:
			print(ans - 1)
		else:
			print(ans)
	else:
		print(m)


def food_buying(n):
	ans = 0
	while n > 9:
		num = str(n)
		temp_num = int(num[0] + '0' * (len(num) - 1))
		ans += temp_num
		n = int(num[1:]) + int(temp_num / 10)
	return ans + n
for i in range(int(input())):
	n = int(input())
	print(food_buying(n))


import sys
import bisect
import math as mt
input = sys.stdin.readline
t = int(input())
mod = 10 ** 9 + 7
for _ in range(t):
	r = int(input())
	ans = 0
	while r >= 10:
		x = r // 10
		ans += 10 * (r // 10)
		r %= 10
		r += x
	print(ans + r)


for _ in range(int(input())):
	x = int(input())
	if x < 10:
		print(x)
	elif x % 9 == 0:
		p = x // 9
		print(x + p - 1)
	else:
		p = x // 9
		print(x + p)


for _ in range(int(input())):
	a = int(input())
	if a <= 9:
		print(a)
	else:
		count = 0
		while a > 9:
			count += a - a % 10
			back = a // 10
			a %= 10
			a += back
		print(count + a)


t = int(input())
for i in range(t):
	s = int(input())
	print(int(s // 0.9))


n = int(input())
for i in range(n):
	summary = int(input())
	if summary == 9:
		print(9)
	else:
		print(summary + summary // 9 - int(summary % 9 == 0))


test = int(input())

def buying(x):
	if x < 10:
		return 0
	else:
		return int(x / 10) + buying(int(x / 10) + x % 10)
while test:
	n = int(input())
	print(n + buying(n))
	test -= 1


from heapq import heappush, heappop, heapify
from collections import deque, defaultdict, Counter
import itertools
from itertools import permutations, combinations, accumulate
import sys
import bisect
import string
import math
import time

def I():
	return int(input())

def MI():
	return map(int, input().split())

def S():
	return input()

def MS():
	return map(str, input().split())

def LI():
	return [int(i) for i in input().split()]

def LI_():
	return [int(i) - 1 for i in input().split()]

def StoI():
	return [ord(i) - 97 for i in input()]

def ItoS(nn):
	return chr(nn + 97)

def input():
	return sys.stdin.readline().rstrip()

def show(*inp, end='\n'):
	if show_flg:
		print(*inp, end=end)
YN = {False: 'No', True: 'Yes'}
MOD = 10 ** 9 + 7
inf = float('inf')
IINF = 10 ** 10
l_alp = string.ascii_lowercase
u_alp = string.ascii_uppercase
nums = ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10']
show_flg = False

def main():
	T = I()
	s = [0] * T
	for i in range(T):
		s[i] = I()
	for i in range(T):
		n = s[i]
		a = n // 9
		b = n % 9
		if n % 9 == 0:
			print(10 * a + b - 1)
		else:
			print(10 * a + b)
main()


for _ in range(int(input())):
	n = int(input())
	x = n
	ans = 0
	while x >= 10:
		ans += x // 10 * 10
		a = x // 10
		b = x % 10
		x = b + a
	print(ans + x)


import sys

def find_sum(a):
	cum_sum = a // 9 * 10 + a % 9
	if a % 9 == 0:
		cum_sum -= 1
	return cum_sum
n = int(sys.stdin.readline())
for i in range(n):
	a = int(sys.stdin.readline())
	print(find_sum(a))


for _ in range(int(input())):
	s = int(input())
	k = s
	while s >= 10:
		num = s // 10
		s += s // 10
		s -= num * 10
		k += num
	print(k)


for t in range(int(input())):
	s = int(input())
	t = 0
	while s >= 10:
		r = s % 10
		t += s - r
		s = s // 10 + r
	print(t + s)


t = int(input())
for i in range(t):
	s = int(input())
	e = s // 0.9
	f = int(e)
	print(f)


n = int(input())
for i in range(1, n + 1):
	a = int(input())
	sm = round(a // 0.9)
	print(sm)


t = int(input())
for _ in range(t):
	s_current = int(input())
	s_total = s_current
	while s_current >= 1000000000:
		s_current -= 900000000
		s_total += 100000000
	while s_current >= 100000000:
		s_current -= 90000000
		s_total += 10000000
	while s_current >= 10000000:
		s_current -= 9000000
		s_total += 1000000
	while s_current >= 1000000:
		s_current -= 900000
		s_total += 100000
	while s_current >= 100000:
		s_current -= 90000
		s_total += 10000
	while s_current >= 10000:
		s_current -= 9000
		s_total += 1000
	while s_current >= 1000:
		s_current -= 900
		s_total += 100
	while s_current >= 100:
		s_current -= 90
		s_total += 10
	while s_current >= 10:
		s_current -= 9
		s_total += 1
	print(s_total)


t = int(input())
for q in range(t):
	s = int(input())
	ans = 0
	mn = 1000000000.0
	while s > 0:
		while s < mn:
			mn //= 10
		ans += mn
		s -= mn - mn // 10
	print(int(ans))


def food(n):
	s = 0
	while n >= 10:
		k = n % 10
		r = n - k
		s += r
		n = r // 10 + k
	return s + n
t = int(input())
for i in range(t):
	n = int(input())
	print(food(n))


for z in range(int(input())):
	n = int(input())
	res = n
	while n >= 10:
		a = n % 10
		b = n // 10
		res += b
		b += a
		n = b
	print(res)


for ti in range(int(input())):
	i = int(input())
	count = 0
	a = 0
	while i >= 10:
		a = i - i % 10
		count = count + a
		i = i - a + a // 10
	count = count + i
	print(count)


def func(t):
	for i in range(t):
		n = int(input())
		counter = 0
		while n >= 10:
			to_add = n // 10
			counter += to_add * 10
			n = n % 10 + to_add
		counter += n
		print(counter)
t = int(input())
func(t)


def main():
	n = int(input())
	for _ in range(n):
		x = int(input())
		ans = 0
		while x > 0:
			a = x // 10
			ans += x - x % 10
			x = x // 10 + x % 10
			if x < 10:
				ans += x
				break
		print(ans)
main()


n = int(input())
for i in range(0, n):
	a = int(input())
	sum = 0
	temp = 0
	while a >= 10:
		r = a % 10
		sum = sum + (a - r)
		a = r + int((a - r) / 10)
		temp = 1
	if temp == 0:
		print(a)
	else:
		print(sum + a)


t = int(input())
for r in range(t):
	n = int(input())
	spends = n
	while n >= 10:
		spends += n // 10
		n = n // 10 + n % 10
	print(spends)


t = int(input())
i = 0
sum = 0
while i < t:
	s = int(input())
	sum = s
	while True:
		sum = sum + int(s / 10)
		if s - int(s / 10) * 10 + int(s / 10) < 10:
			break
		else:
			s = s - int(s / 10) * 10 + int(s / 10)
	print(sum)
	i = i + 1


t = int(input())
for _ in range(t):
	s = int(input())
	x = 0
	while s > 9:
		d = s % 10
		x += s - d
		s = s // 10 + d
	x += s
	print(x)
	print('\n')


import math
t = int(input())
answers = []
for ti in range(t):
	s = int(input())
	ans = 0
	while s != 0:
		buy = s // 10
		if buy > 0:
			ans += buy * 10
			s -= buy * 10
			s += buy
		else:
			ans += s
			s = s // 10
	answers.append(ans)
for a in answers:
	print(a)


t = int(input())
for _ in range(t):
	n = int(input())
	s = str(n)
	while len(s) > 1:
		l = len(s)
		r = int(s[0]) * 10 ** (l - 1)
		s = int(s)
		s = s - r + r // 10
		n += r // 10
		s = str(s)
	print(n)


for _ in range(int(input())):
	n = int(input())
	t = n
	c = 0
	while n >= 10:
		s = str(n)
		k = int(s[0]) * 10 ** (len(s) - 2)
		s = s[1:]
		n = int(s) + k
		c += k
	print(t + c)


for i in range(int(input())):
	N = int(input())
	s = N // 9
	x = N % 9
	total = s * 10 + x
	if x == 0:
		total = total - 1
	print(total)


import math
t = int(input())
for i in range(t):
	sum = 0
	n = int(input())
	p = n
	while p >= 10:
		div = int(p / 10)
		p = div + p % 10
		sum = sum + 10 * div
	print(sum + p)


t = int(input())
while t:
	n = int(input())
	s = n
	while n:
		r = n % 10
		n = n // 10
		s = s + n
		if n > 0:
			n = n + r
	print(s)
	t -= 1


def program():
	x = int(input())
	sum = 0
	while x > 0:
		s = str(x)
		a = int(s[0]) * 10 ** (len(s) - 1)
		b = x - a
		sum = sum + a
		x = b + a // 10
	print(sum)
t = int(input())
for i in range(t):
	program()


import sys
input = sys.stdin.readline

def solve(s):
	spent = 0
	while s > 0:
		x = s // 10
		if x == 0:
			spent += s
			break
		s -= x * 10
		spent += x * 10
		s += x
	return spent
t = int(input())
for _ in range(t):
	s = int(input())
	print(solve(s))


t = int(input())

def check(n):
	if n < 10:
		return n
	return n - n % 10 + check(n // 10 + n % 10)
for _ in range(t):
	n = int(input())
	print(check(n))


import math
x = int(input())
for i in range(x):
	burles = int(input())
	if burles < 10:
		print(burles)
	else:
		save = burles
		cashback = 0
		while burles >= 10:
			cashback += math.floor(burles / 10)
			cashbackatual = math.floor(burles / 10)
			valor = burles - cashbackatual * 10
			burles = valor + cashbackatual
		save += cashback
		print(save)


def max_spending(s):
	to_add = 0
	cur_s = s
	while cur_s > 9:
		to_add_temp = cur_s // 10
		to_add += to_add_temp
		cur_s = to_add_temp + cur_s % 10
	return s + to_add
t = int(input())
for i in range(t):
	s = int(input())
	ans = max_spending(s)
	print(ans)


t = int(input())
for i in range(t):
	n = int(input())
	c = 0
	if n < 10:
		print(n)
	elif n == 10:
		print(11)
	else:
		while n // 10 != 0:
			s = n
			x = n // 10
			c = c + x * 10
			n = s % 10 + x
		print(c + n)


def iinput():
	return [int(x) for x in input().split()]

def main():
	s = int(input())
	count = 0
	while s >= 10:
		(count, s) = (count + s - s % 10, s // 10 + s % 10)
	return count + s
for t in range(int(input())):
	print(main())


t = int(input())
ans = [0] * t
for i in range(t):
	s = int(input())
	a = s
	while s >= 10:
		(q, mod) = divmod(s, 10)
		a += q
		s = q + mod
	ans[i] = a
for i in range(t):
	print(ans[i])


nt = int(input())
for qzz in range(nt):
	init = int(input())
	amt = init
	ans = init
	cb = 1
	while cb != 0:
		cb = amt // 10
		amt = cb + amt % 10
		ans += cb
	print(ans)


T = int(input())
for z in range(T):
	tot = 0
	N = int(input())
	while N > 9:
		spend = N - N % 10
		tot += spend
		N = N - spend + spend // 10
	print(tot + N)


for _ in range(int(input())):
	n = int(input())
	x = n
	ans = x
	while x > 9:
		this = x // 10
		dis = x % 10
		ans += this
		x = this + dis
	print(ans)


import math

def compute(n):
	if n < 10:
		return n
	return compute(n % 10 + n // 10) + n - n % 10
t = int(input())
for _ in range(t):
	n = int(input())
	print(compute(n))


def res(n):
	if n < 10:
		return n
	else:
		d = n % 10
		return res(d + n // 10) + n - d
for _ in range(int(input())):
	n = int(input())
	print(res(n))


for _ in range(int(input())):
	n = int(input())
	summ = 0
	a = int(n / 9)
	summ += 10 * a
	n -= 9 * a
	print(summ + n if n != 0 else summ - 1)


import math
tc = int(input())
for _ in range(tc):
	s = int(input())
	ss = s
	money_spend = 0
	if s < 10:
		print(s)
	else:
		while s > 10:
			rem = s % 10
			spend = s - rem
			cashbacks = math.floor(spend / 10)
			money_spend += spend
			s = s - spend + cashbacks
		if s == 10:
			print(money_spend + 11)
		else:
			print(money_spend + s)


import sys

def main():
	for _ in range(int(sys.stdin.readline())):
		n = int(sys.stdin.readline())
		c = 0
		while n >= 10:
			x = n % 10
			y = n - x
			c += y
			n = y // 10
			n = n + x
		c += n
		print(c)
main()


t = int(input())
for _ in range(t):
	b = int(input())
	bb = b
	count = 0
	rest = 0
	while bb >= 10:
		max = bb // 10
		bb = bb % 10 + max
		count += max * 10
	print(count + bb)


def sol(n):
	s = n
	temp = 0
	sum = 0
	while s > 0:
		temp = s % 10
		sum = sum + s - temp
		s = s // 10 + temp
		if s < 10:
			sum = sum + s
			s = 0
	print(sum)
k = int(input())
for i in range(k):
	s = input()
	sol(int(s))


t = int(input())
for _ in range(t):
	s = int(input())
	total = 0
	pres = s
	while pres // 10 != 0:
		total += pres - pres % 10
		pres = pres // 10 + pres % 10
	total += pres % 10
	print(total)


def solve():
	N = int(input())
	d = 10 ** 9
	ans = 0
	while d > 0:
		while N >= d:
			ans += d
			N = N - d + d // 10
		d //= 10
	print(ans)
T = int(input())
while T > 0:
	T -= 1
	solve()


n = int(input())
for i in range(n):
	q = int(input())
	if q < 10:
		d = q
	else:
		s = 0
		d = 0
		e = 0
		f = 0
		while q > 0:
			s = q // 10
			e = q % 10
			if q > 10:
				d += q - e
				f += q - e
			else:
				d += q
				f += q
			q -= f
			f = 0
			q += s
	print(d)


for _ in range(int(input())):
	q = int(input())
	ans = q
	while q > 9:
		ans += q // 10
		q = q % 10 + q // 10
	print(ans)


for _ in range(int(input())):
	burles = int(input())
	rem = 0
	spent = 0
	while burles / 10 >= 1:
		extra = burles // 10
		rem = burles % 10
		spent += 10 * extra
		burles = rem + extra
	spent += burles
	print(spent)


def buy_food(money):
	buy = 0
	answer = 0
	while money > 0:
		if money < 10:
			answer = answer + money
			break
		money_str = str(int(money))
		buy = int(money_str[0]) * 10 ** (len(money_str) - 1)
		answer = answer + buy
		money -= buy - buy / 10
	return answer
n = int(input())
data = []
answer = []
for i in range(0, n):
	data.append(int(input()))
for i in range(0, n):
	answer.append(buy_food(data[i]))
for i in range(0, n):
	print(int(answer[i]))


for _ in range(int(input())):
	n = int(input())
	ans = n + n // 9
	if n % 9 == 0:
		ans -= 1
	print(ans)


tc = int(input())
for _ in range(tc):
	n = int(input())
	cnt = 0
	while n // 10 != 0:
		rem = n // 10
		cnt = cnt + rem
		n = n % 10 + rem
	print(cnt * 10 + n % 10)


q = int(input())
for rwwe in range(q):
	n = int(input())
	spent = 0
	while n >= 10:
		x = n - n % 10
		spent += x
		n -= x
		n += x // 10
	spent += n
	print(spent)


arr = []
r = input('')
f = int(r)
for x in range(0, f):
	p = input()
	arr.append(p)
for x in range(0, f):
	m = int(arr[x])
	n = int(m / 10)
	sum = n * 10
	k = m % 10
	s = k + n
	while True:
		if s < 10:
			sum = sum + s
			break
		else:
			n = int(s / 10)
			k = s % 10
			s = n + k
			sum = sum + n * 10
	print(sum)


def solu(n):
	if n == 0:
		return 0
	elif n == 1:
		return 1
	elif n < 10:
		return n
	else:
		x = n % 10
		y = n // 10
		return 10 * y + solu(y + x)
t = int(input())
for i in range(t):
	n = int(input())
	print(solu(n))


t = int(input())
for i in range(1, t + 1):
	n = int(input())
	p1 = 0
	while n >= 10:
		p1 = p1 + n // 10 * 10
		n = n % 10 + n // 10
	paid = p1 + n
	print(paid)


for _ in range(int(input())):
	n = int(input())
	su = 0
	while n >= 10:
		r = n // 10
		x = n % 10
		su += 10 * r
		n = r + x
	print(su + n)


import sys

def input():
	return sys.stdin.readline().strip()

def list2d(a, b, c):
	return [[c] * b for i in range(a)]

def list3d(a, b, c, d):
	return [[[d] * c for j in range(b)] for i in range(a)]

def list4d(a, b, c, d, e):
	return [[[[e] * d for j in range(c)] for j in range(b)] for i in range(a)]

def ceil(x, y=1):
	return int(-(-x // y))

def INT():
	return int(input())

def MAP():
	return map(int, input().split())

def LIST(N=None):
	return list(MAP()) if N is None else [INT() for i in range(N)]

def Yes():
	print('Yes')

def No():
	print('No')

def YES():
	print('YES')

def NO():
	print('NO')
INF = 10 ** 18
MOD = 10 ** 9 + 7
for _ in range(INT()):
	N = INT()
	ans = 0
	while N >= 10:
		ans += N // 10 * 10
		N = N // 10 + N % 10
	ans += N
	print(ans)


s = int(input())
rs = []
for i in range(s):
	a = int(input())
	s = 0
	if a < 10:
		s = a
	while a > 9:
		du = a % 10
		cal = a - du
		s += cal
		a = cal / 10 + du
		if a < 10:
			s = s + a
	rs.append(s)
for i in rs:
	print(int(i))


a = int(input())
for i in range(0, a):
	b = int(input())
	summ = 0
	while b > 9:
		summ += int(b / 10) * 10
		b = b % 10 + int(b / 10)
	summ += b
	summ = int(summ)
	print(summ)


for i in range(int(input())):
	n = int(input())
	count = 0
	for i in range(n):
		if n < 10:
			print(count + n)
			break
		elif n >= 10:
			count += int(n / 10) * 10
			n = int(n % 10) + int(n / 10)


t = int(input())
nlist = []
for x in range(t):
	n = int(input())
	nlist.append(n)
for w in range(len(nlist)):
	y = float(nlist[w])
	z = 0
	x = 0
	while y >= 10:
		x = y / 10 - y % 10 / 10
		z += x
		y = y - 10 * x
		y += x
		x = 0
	t = int(10 * z + y)
	print(t)


for _ in range(int(input())):
	n = int(input())
	spent = 0
	while n >= 10:
		temp = n // 10
		spent += temp * 10
		r = n % 10
		n = temp + r
	print(spent + n)


cases = int(input())
for i in range(0, cases):
	n = int(input())
	tot = n
	current = tot
	while current // 10 > 0:
		change = current // 10
		tot += change
		current -= change * 10
		current += change
	print(tot)


import sys
import math

def read_line():
	return sys.stdin.readline()[:-1]

def read_int():
	return int(sys.stdin.readline())

def read_int_line():
	return [int(v) for v in sys.stdin.readline().split()]
t = read_int()
for i in range(t):
	n = read_int()
	spent = 0
	rem = 0
	while n > 0:
		if n >= 10:
			spent += n // 10 * 10
			rem = n // 10
			n -= n // 10 * 10
			n += rem
		else:
			spent += n
			n = 0
	print(spent)


t = int(input())
for _ in range(t):
	n = int(input())
	print(round(n // 0.9))


for i in range(int(input())):
	n = int(input())
	count = 0
	while n >= 10:
		m = n - n % 10
		r = m // 10
		count += m
		n = n - m + r
	print(count + n)


T = int(input())
for case in range(T):
	s = int(input())
	ans = 0
	t = str(s)
	HJ = [1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000]
	while s > 0:
		n = len(str(s)) - 1
		if n == 0:
			ans += s
			break
		x = HJ[n]
		mn = min(s, x)
		ans += mn
		s += x // 10
		s -= mn
	print(ans)


q = int(input())

def po10(a):
	ten = 1
	while ten * 10 <= a:
		ten = ten * 10
	return ten
for t in range(q):
	burles = int(input())
	spent = 0
	while burles > 0:
		ten = po10(burles)
		spent += ten
		burles -= ten
		burles += ten // 10
	print(spent)


n = int(input())
for i in range(n):
	x = int(input())
	temp = x
	while x >= 10:
		temp += x // 10
		x = x // 10 + x % 10
	print(temp)


from math import *
t = int(input())
while t != 0:
	t -= 1
	x = int(input())
	all = 0
	while x > 9:
		q = x // 10
		all += q * 10
		x -= 9 * q
	print(all + x)


rty = int(input())
for gfh in range(rty):
	n = int(input())
	a = n // 9
	b = n % 9
	if b > 0:
		b = 1
	print(n + (a + b - 1))


for _ in range(int(input())):
	n = int(input())
	su = 0
	t = n
	while t > 0:
		r = t % 10
		if t < 10:
			break
		t = t - r
		su = su + t
		t = t // 10 + r
	print(su + t)


num = int(input())
for i in range(num):
	reb = 11
	t2 = 1
	ans = 0
	val = int(input())
	while t2 != 0:
		t1 = val % 10
		t2 = val - t1
		ans += t2
		reb = int(val / 10)
		val = t1 + reb
	print(ans + val)


def f(x):
	res = 0
	while x >= 10:
		res += x // 10 * 10
		x = x % 10 + x // 10
	print(res + x)
n = int(input())
for i in range(n):
	x = int(input())
	f(x)


a = int(input())
for i in range(a):
	b = int(input())
	sumi = 0
	while True:
		if b < 10:
			sumi = sumi + b
			break
		else:
			part = b // 2
			cb = part % 10
			if 5 <= cb < 10:
				part = part + 10 - cb
			elif 1 <= cb < 5:
				part = part - cb
			if 5 <= part <= 10:
				part = 10
			sumi = sumi + part
			b = b - part + part // 10
	print(sumi)


ans = []
from math import floor
for _ in range(int(input())):
	n = input()
	cou = 0
	while len(n) > 1:
		cou += int(n[0]) * 10 ** (len(n) - 1)
		n = int(n) - int(n[0]) * 10 ** (len(n) - 1) + floor(int(n[0]) * 10 ** (len(n) - 1) / 10)
		n = str(n)
	cou += floor(int(n[0]) / 10) + int(n[0])
	ans.append(cou)
for i in range(len(ans)):
	print(ans[i])


t = int(input())
for i in range(t):
	a = int(input())
	count = 0
	while a != 0:
		if a >= 10:
			a = str(a)
			b = int(a[:len(a) - 1]) * 10
			count += b
			a = int(a) - b
			a += int(b / 10)
		else:
			count += a
			a -= a
	print(count)


def main():
	t = int(input())
	for i in range(t):
		s = int(input())
		o = 0
		while True:
			if s % 10 == 0:
				o += s
				s /= 10
			else:
				x = 10 * (s // 10)
				o += x
				s -= x - x / 10
			if s < 10:
				o += s
				break
		print(int(o))
main()


n = int(input())
for _ in range(n):
	a = input()
	b = int(a)
	c = int(a)
	total = b
	if c < 10:
		print(c)
		continue
	else:
		while b != 0:
			b = b // 10
			total += b
		while total - c != int(str(total)[:len(str(total)) - 1]):
			total += 1
		print(total)


def lim21(k, b):
	if k < 10:
		return b + k
	res = b
	res += k // 10 * 10
	res += lim21(k // 10 + k % 10, 0)
	return res
t = int(input())
for i in range(t):
	n = int(input())
	print(lim21(n, 0))


def solve(n):
	ans = 0
	while n >= 10:
		spend = n // 10 * 10
		ans += spend
		n = n - spend + spend // 10
	return ans + n

def main():
	t = int(input())
	for _ in range(t):
		n = int(input())
		print(solve(n))
main()


def run():
	n = int(input())
	ans = 0
	while True:
		temp = n // 10
		if temp < 1:
			ans += n
			print(ans)
			return
		else:
			ans += temp * 10
			n %= 10
			n += temp
t = int(input())
while t:
	run()
	t -= 1


for i in range(int(input())):
	n = input()
	res = 0
	while int(n) >= 10:
		r = int(n[-1])
		n = int(n[:-1] + '0')
		res += n
		n //= 10
		n += r
		n = str(n)
	res += int(n)
	print(str(res))


def solve(g_s, s_s, divider):
	if g_s < divider:
		if divider > 10:
			return solve(g_s, s_s, divider / 10)
		else:
			return g_s + s_s
	else:
		while g_s >= divider:
			g_s -= divider
			s_s += divider
			g_s += int(divider / 10)
		return solve(g_s, s_s, divider)
t = int(input())
for m_i in range(0, t):
	given_sum = input()
	result = solve(int(given_sum), 0, 10 ** (len(given_sum) - 1))
	print(int(result))


for _ in range(int(input())):
	s = int(input())
	if s < 10:
		print(s, end='\n')
		continue
	t = s + s // 9
	if s % 9 == 0:
		t -= 1
	print(t, end='\n')


from sys import stdin
import math
n = int(stdin.readline())
for _ in range(n):
	cur = int(stdin.readline().rstrip())
	t = 0
	while cur > 0:
		if cur < 10:
			t += cur
			cur = 0
		else:
			cashback_times = cur // 10
			cur -= 10 * cashback_times
			t += 10 * cashback_times
			cur += cashback_times
	print(t)


n = int(input())
for i in range(n):
	h = int(input())
	ans = 0
	while True:
		if h // 10 == 0:
			ans += h
			break
		cash = h // 10
		ans += cash * 10
		h -= cash * 9
	print(ans)


for _ in range(int(input())):
	n = int(input())
	ans = 0
	while n > 0:
		mod = n % 10
		x = n // 10
		if x <= 0:
			ans += mod
			break
		ans += x * 10
		n = mod + x
	print(ans)


import math
tcase = int(input())
for i in range(tcase):
	burles = int(input())
	result = burles
	add_burles = 1
	while add_burles > 0:
		add_burles = burles // 10
		result += add_burles
		burles = burles % 10
		burles += add_burles
	print(result)


t = int(input())
for i in range(t):
	n = int(input())
	if n < 10:
		print(n)
	else:
		cnt = 0
		while len(str(n)) > 1:
			cnt += n - n % 10
			n = int(str(n)[0:len(str(n)) - 1]) + int(str(n)[-1])
		print(cnt + n)


t = int(input())
i = 0
while i < t:
	n = int(input())
	tot = 0
	while n > 0:
		s = n
		if s >= 10:
			while s % 10 != 0:
				s = s - 1
		tot = tot + s
		n = n - s + s // 10
	print(tot)
	i = i + 1


t = int(input())
for _ in range(t):
	n = int(input())
	ans = 0
	while n > 9:
		spent = n - n % 10
		gain = n // 10
		ans += spent
		n = n - spent + gain
	ans += n
	print(ans)


import sys
input = sys.stdin.readline
t = int(input())
for i in range(t):
	s = int(input())
	ans = 0
	while s >= 10:
		p = s // 10
		s -= p * 10
		ans += p * 10
		s += p
	ans += s
	print(ans)


t = int(input())
for _ in range(t):
	n = int(input())
	c = 0
	while n > 0:
		if n < 10:
			c = c + n
			n = 0
		else:
			f = n // 10
			n = n - f * 10
			n = n + f
			c = c + f * 10
	print(c)


t = int(input())
if not 1 <= t <= 10 ** 4:
	quit()
for i in range(t):
	s = int(input())
	if not 1 <= s <= 10 ** 9:
		quit()
	s2 = s
	while s2 >= 10:
		s = s + s2 // 10
		s2 = s2 % 10 + s2 // 10
	print(s)


t = int(input())
for i in range(t):
	n = int(input())
	x = n
	while x // 10 >= 1:
		n += x // 10
		x = x // 10 + x % 10
	print(n)


n = int(input())
arr = [int(input()) for x in range(n)]
for i in arr:
	j = i
	k = i
	while k >= 10:
		i += k // 10
		j = k % 10
		k = k // 10 + j
	print(i)


for _ in range(int(input())):
	n = int(input())
	num = n
	t = 0
	while num >= 10:
		q = num // 10
		rem = num % 10
		t += q
		num = rem + q
	print(t + n)


import sys
f_in = sys.stdin
f_out = sys.stdout
i = int(f_in.readline())
for t in range(0, i):
	a = int(f_in.readline())
	sum = a
	while a >= 10:
		t = a // 10
		a = a - 10 * t + t
		sum = sum + t
	f_out.write(str(sum) + '\n')
f_in.close()
f_out.close()


n = int(input())
while n:
	spend = 0
	cash = int(input())
	while True:
		back = int(cash / 10)
		spend = spend + back * 10
		remain = int(cash % 10)
		cash = remain + back
		if int(cash / 10) == 0:
			spend = spend + cash
			break
	print(spend)
	n = n - 1


for i in range(int(input())):
	n = int(input())
	r = n
	while n >= 10:
		r = r + n // 10
		n = n // 10 + n % 10
	print(r)


n = int(input())
for i1 in range(0, n, 1):
	a = int(input())
	thingsBought = 0
	while a != 0:
		if a >= 10:
			thingsBought += int(a / 10) * 10
			a = a - int(a / 10) * 9
		else:
			thingsBought += a
			a = 0
	print(thingsBought)


def get_indexer(n):
	if n < 10:
		return n
	else:
		sume = 0
		while True:
			if n < 10:
				sume += n
				break
			else:
				sume += n // 10 * 10
				rem = n % 10
				n //= 10
				n += rem
		return sume
for _ in range(int(input())):
	n = int(input())
	print(get_indexer(n))


import math

def cashback(s):
	ans = []
	while len(ans) < 11:
		x = str(s)
		if x[-1] != 0:
			r = s % 10
		s = s - r
		c = math.floor(s / 10)
		ans.append(s)
		s = c + r
	return sum(ans) + r
t = int(input())
for i in range(t):
	s = int(input())
	print(cashback(s))


for i in range(int(input())):
	n = int(input())
	answer = 0
	while n // 10 > 0:
		diff = n - n % 10
		answer += diff
		n = n % 10 + n // 10
	answer = answer + n
	print(answer)


def ans1(n):
	ans = 0
	while n >= 10:
		temp = n // 10
		n -= temp * 10
		ans += temp * 10
		n += temp
	if n != 0:
		ans += n
	return ans
t = int(input())
for i in range(t):
	a = int(input())
	if a < 10:
		print(a)
	else:
		print(ans1(a))


import math
t = int(input())
for i in range(t):
	s = int(input())
	sw = False
	count = 0
	while sw == False:
		burles = s // 10 * 10
		count += burles
		total = s - burles
		s = s // 10 + total
		if s < 10:
			count += s
			sw = True
	print(count)


import math
t = int(input())
for i in range(t):
	n = int(input())
	count = 0
	while n >= 10:
		count += n // 10 * 10
		n = n % 10 + n // 10
	print(math.floor(count + n))


t = int(input())
for x in range(t):
	s = int(input())
	p = s
	sum = 0
	while s > 9:
		a = s // 10
		b = s % 10
		s = a + b
		sum = sum + a
	print(p + sum)


import math
from decimal import *
import random
mod = int(1000000000.0) + 7
for _ in range(int(input())):
	n = int(input())
	ans = 0
	while n // 10 >= 1:
		val = int(n // 10)
		ans += val * 10
		n -= val * 10
		n += val
	ans += n
	print(ans)


n = int(input())
for i in range(n):
	s = int(input())
	maxi = s
	while True:
		div = s // 10
		maxi += div
		s = s - div * 10 + div
		if div < 1:
			break
	print(maxi)


import sys

def fastio():
	from io import StringIO
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()

def debug(*var, sep=' ', end='\n'):
	print(*var, file=sys.stderr, end=end, sep=sep)
INF = 10 ** 20
MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
from math import gcd
from math import ceil
from collections import defaultdict as dd, Counter
from bisect import bisect_left as bl, bisect_right as br
(t,) = I()
while t:
	t -= 1
	(n,) = I()
	ans = 0
	while n >= 10:
		k = n % 10
		ans += n - k
		n = k + n // 10
	ans += n
	print(ans)


import sys
import math
from collections import defaultdict, Counter
input = sys.stdin.readline

def print(x):
	sys.stdout.write(str(x) + '\n')
t = int(input())
for i in range(t):
	s = int(input())
	s1 = s
	c = 0
	while s > 9:
		d = s // 10
		c += d
		s -= d * 10
		s += d
	print(s1 + c)


t = int(input())
for x in range(t):
	s = int(input())
	ans = 0
	while s >= 10:
		a = s // 10 * 10
		ans += a
		s = s - a + a / 10
	ans += s
	print(int(ans))


for i in range(int(input())):
	s = int(input())
	ans = 0
	f = 0
	while 1:
		if s < 10:
			print(ans + s)
			break
		ans += s // 10 * 10
		f = s
		s -= s // 10 * 10
		s += f // 10


from collections import Counter
from collections import defaultdict
import math
import random
import heapq as hq
from math import sqrt
import sys
from functools import reduce

def input():
	return sys.stdin.readline().strip()

def iinput():
	return int(input())

def tinput():
	return input().split()

def rinput():
	return map(int, tinput())

def rlinput():
	return list(rinput())
mod = int(1000000000.0) + 7

def factors(n):
	return set(reduce(list.__add__, ([i, n // i] for i in range(1, int(n ** 0.5) + 1) if n % i == 0)))
for _ in range(iinput()):
	n = iinput()
	spend = 0
	while n > 9:
		temp = n
		spend += 10 * (n // 10)
		n -= 10 * (n // 10)
		n = temp % 10 + temp // 10
	print(spend + n)


for _ in range(int(input())):
	s = int(input())
	s += (s - 1) // 9
	print(s)


T = int(input())
for t in range(T):
	n = int(input())
	ans = 0
	while True:
		rem = n % 10
		spn = n - rem
		if spn == 0:
			ans += rem
			break
		ans += spn
		n = n - spn + spn // 10
	print(ans)


t = int(input())
while t > 0:
	t -= 1
	n = int(input())
	ans = 0
	while True:
		r = n - n % 10
		ans += r
		n = n - r + r // 10
		if n < 10:
			ans += n
			break
	print(ans)


t = int(input())
for i in range(t):
	x = int(input())
	sumi = 0
	start = x
	while True:
		remain = start % 10
		sumi += start - remain
		start = start // 10
		start = start + remain
		if start < 10:
			sumi += start
			break
	print(sumi)


for _ in range(int(input())):
	s = int(input())
	cnt = 0
	while s >= 10:
		cnt += s // 10
		s = s // 10 + s % 10
	print(cnt * 10 + s)


for _ in range(int(input())):
	s = input()
	n = int(s)
	ans = 0
	while n is not 0:
		r2 = n % 10
		n = int(n / 10)
		ans = ans + n * 10
		if n is not 0:
			n = n + r2
	print(ans + r2)


for s in range(int(input())):
	n = int(input())
	add = 0
	add = n
	while True:
		d = n // 10
		r = n % 10
		if d + r >= 10:
			add += d
		else:
			add += d
			break
		n = d + r
	print(add)


for _ in range(int(input())):
	n = int(input().strip())
	ans = 0
	temp = n // 9
	temp2 = n - temp * 9
	ans = n // 9 * 10 + temp2
	if n % 9 == 0:
		ans -= 1
	print(ans)


for i in range(int(input())):
	a = int(input())
	b = [a // 10 * 10]
	i = 0
	while True:
		cashback = a % 10 + b[i] // 10
		a = cashback
		b.append(a // 10 * 10)
		i += 1
		if a < 10:
			break
	print(sum(b) + a)


for _ in range(int(input())):
	total = 0
	spent = 0
	n = input()
	a = int(n)
	while a > 0:
		n = str(a)
		spent = int(n[0]) * 10 ** (len(n) - 1)
		a -= spent
		total += spent
		a += spent // 10
	print(total)


t = int(input())
for i in range(t):
	n = int(input())
	z = 0
	while n > 9:
		z += n // 10 * 10
		n = n % 10 + n // 10
	print(z + n)


def calculate(s):
	a = s // 9
	if s % 9 == 0:
		print(a + s - 1)
	else:
		print(a + s)
t = int(input())
l = []
for i in range(t):
	s = int(input())
	l.append(s)
for i in range(len(l)):
	calculate(l[i])


def f(n):
	a = str(n)
	return int(a[-1])

def st(n):
	a = str(n)
	return n - int(a[-1])
t = int(input())
for _ in range(t):
	n = int(input())
	ans = 0
	while n >= 10:
		ans += st(n)
		temp = n // 10
		n = f(n)
		n += temp
	ans += n
	print(ans)


from sys import stdin
input = stdin.readline
for xoxo in range(1):
	for _ in range(int(input())):
		n = int(input())
		ans = 0
		while n >= 10:
			k = n
			ans += k - k % 10
			n -= k - k % 10
			n += (k - k % 10) // 10
		print(ans + n)


def max_spend(s):
	first = s[0]
	spent = int(first) * 10 ** (len(s) - 1)
	if len(s) > 1:
		return spent + max_spend(str(int(s[1:]) + int(spent / 10)))
	else:
		return spent
t = int(input())
for _ in range(t):
	s = input()
	m = max_spend(s)
	print(m)


n = int(input())
for i in range(n):
	burl = int(input())
	c = 0
	while burl >= 10:
		c += 10 * int(burl / 10)
		burl = int(burl / 10) + burl % 10
	c += burl
	print(c)


for i in range(int(input())):
	n = int(input())
	c = 0
	while n >= 10:
		a = n // 10
		b = n - a * 10
		d = a + b
		n = d
		c += a * 10
	print(c + n)


import math
for _ in range(int(input())):
	s = int(input())
	anz = s
	while s > 9:
		anz += s // 10
		rem = s % 10
		s = s // 10 + rem
	print(anz)


testCase = int(input())
for i in range(testCase):
	remainder = 0
	quotient = 0
	val = int(input())
	if val < 10:
		print(val)
	else:
		remainder = val % 10
		quotient = val // 10
		ans = val + quotient
		while remainder + quotient >= 10:
			r = (remainder + quotient) % 10
			quotient = (remainder + quotient) // 10
			ans = ans + quotient
			remainder = r
		print(ans)


for _ in range(int(input())):
	n = int(input())
	ans = n
	while n >= 10:
		x = n % 10
		y = n // 10
		ans += y
		y += x
		n = y
	print(ans)


t = int(input())
for _ in range(t):
	n = int(input())
	x = n % 9
	y = n // 9 * 10
	if x:
		print(y + x)
	else:
		print(y - 1)


def solve():
	n = int(input())
	a = 0
	y = 1
	while y:
		y = n // 10
		x = n % 10
		a = a + y * 10
		n = x + y
	a = a + x
	print(a)
t = int(input())
while t:
	solve()
	t = t - 1


def sol(s):
	r = s % 10
	t = s - r
	s = r + s // 10
	if s == r:
		return s
	return t + sol(s)
for i in range(int(input())):
	print(sol(int(input())))


import sys
testcases = int(input())
answerlist = []
for k in range(testcases):
	burles = int(sys.stdin.readline())
	csum = int(burles)
	while burles >= 10:
		additive = str(burles)[0:-1] + '0'
		burles += -int(additive)
		burles += int(additive) // 10
		csum += int(additive) // 10
	answerlist.append(str(csum))
for s in answerlist:
	sys.stdout.write('\n' + s)


import math
test = int(input())
for i in range(test):
	num = int(input())
	sumlist = list()
	while 1:
		r = num % 10
		val = num - r
		gained = math.floor(val / 10)
		summ = gained + r
		if val == 0:
			sumlist.append(summ)
			break
		else:
			num = summ
			sumlist.append(val)
	print(sum(sumlist))


import sys
import math
input = sys.stdin.readline
t = int(input())
for _ in range(t):
	ans = 0
	s = int(input())
	while s > 0:
		curr = s % 10
		if s < 10:
			ans += curr
			s = 0
		else:
			ans += s - curr
			s = curr + s // 10
	print(ans)


for i in range(int(input())):
	a = int(input())
	ans = int(0)
	while a > 9:
		ans += a // 10 * 10
		a = a // 10 + (a - a // 10 * 10)
	print(ans + a)


from sys import stdin
import math
inp = lambda : stdin.readline().strip()
t = int(inp())
for i in range(t):
	n = int(inp())
	spend = n
	while n >= 10:
		if n >= 10:
			mod10 = n // 10
			n -= mod10 * 10
			n += mod10
			spend += mod10
	print(spend)


A = int(input())
a = 0
while a < A:
	ris = 0
	N = int(input())
	while N > 0:
		s = N
		if s > 10:
			while s % 10 != 0:
				s = s - 1
		ris = ris + s
		N = N - s + s // 10
	print(ris)
	a = a + 1


t = int(input())
for i in range(t):
	s = int(input())
	r = 0
	while s != 0:
		x = s // 10
		r += x * 10
		s = s - x * 10 + x
		if s < 10:
			r += s
			s = 0
			print(r)


for trt in range(int(input())):
	n = int(input())
	ans = n
	v = 0
	while n > 9:
		ans += n // 10
		n = n // 10 + n % 10
	print(ans)


for x in range(int(input())):
	n = int(input())
	count = 0
	while n > 9:
		count += n // 10 * 10
		k = n // 10
		n = k + n % 10
	print(count + n)


from sys import stdin
T = int(stdin.readline().strip())
for caso in range(T):
	n = int(stdin.readline().strip())
	ans = 0
	while n >= 10:
		x = n // 10
		ans += x * 10
		n += -x * 10 + x
	ans += n
	print(ans)


from math import *
from sys import stdin, stdout
import itertools
import os
import sys
import threading
from collections import deque, Counter, OrderedDict, defaultdict
from heapq import *
from fractions import Fraction
mod = int(pow(10, 9) + 7)

def ii():
	return int(input())

def si():
	return str(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())

def fii():
	return int(stdin.readline())

def fsi():
	return str(stdin.readline())

def fmi():
	return map(int, stdin.readline().split())

def fli():
	return list(fmi())
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}

def getKey(item):
	return item[0]

def sort2(l):
	return sorted(l, key=getKey)

def d2(n, m, num):
	return [[num for x in range(m)] for y in range(n)]

def isPowerOfTwo(x):
	return x and (not x & x - 1)

def decimalToBinary(n):
	return bin(n).replace('0b', '')

def ntl(n):
	return [int(i) for i in str(n)]

def powerMod(x, y, p):
	res = 1
	x %= p
	while y > 0:
		if y & 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res
graph = defaultdict(list)
visited = [0] * 1000000
col = [-1] * 1000000

def bfs(d, v):
	q = []
	q.append(v)
	visited[v] = 1
	while len(q) != 0:
		x = q[0]
		q.pop(0)
		for i in d[x]:
			if visited[i] != 1:
				visited[i] = 1
				q.append(i)
		print(x)

def make_graph(e):
	d = {}
	for i in range(e):
		(x, y) = mi()
		if x not in d:
			d[x] = [y]
		else:
			d[x].append(y)
		if y not in d:
			d[y] = [x]
		else:
			d[y].append(x)
	return d

def gr2(n):
	d = defaultdict(list)
	for i in range(n):
		(x, y) = mi()
		d[x].append(y)
	return d

def connected_components(graph):
	seen = set()

	def dfs(v):
		vs = set([v])
		component = []
		while vs:
			v = vs.pop()
			seen.add(v)
			vs |= set(graph[v]) - seen
			component.append(v)
		return component
	ans = []
	for v in graph:
		if v not in seen:
			d = dfs(v)
			ans.append(d)
	return ans

def primeFactors(n):
	s = set()
	while n % 2 == 0:
		s.add(2)
		n = n // 2
	for i in range(3, int(sqrt(n)) + 1, 2):
		while n % i == 0:
			s.add(i)
			n = n // i
	if n > 2:
		s.add(n)
	return s

def find_all(a_str, sub):
	start = 0
	while True:
		start = a_str.find(sub, start)
		if start == -1:
			return
		yield start
		start += len(sub)

def SieveOfEratosthenes(n, isPrime):
	isPrime[0] = isPrime[1] = False
	for i in range(2, n):
		isPrime[i] = True
	p = 2
	while p * p <= n:
		if isPrime[p] == True:
			i = p * p
			while i <= n:
				isPrime[i] = False
				i += p
		p += 1
	return isPrime

def dijkstra(edges, f, t):
	g = defaultdict(list)
	for (l, r, c) in edges:
		g[l].append((c, r))
	(q, seen, mins) = ([(0, f, ())], set(), {f: 0})
	while q:
		(cost, v1, path) = heappop(q)
		if v1 not in seen:
			seen.add(v1)
			path = (v1, path)
			if v1 == t:
				return (cost, path)
			for (c, v2) in g.get(v1, ()):
				if v2 in seen:
					continue
				prev = mins.get(v2, None)
				next = cost + c
				if prev is None or next < prev:
					mins[v2] = next
					heappush(q, (next, v2, path))
	return float('inf')

def binsearch(a, l, r, x):
	while l <= r:
		mid = l + (r - 1) // 2
		if a[mid]:
			return mid
		elif a[mid] > x:
			l = mid - 1
		else:
			r = mid + 1
	return -1
t = ii()
for _ in range(t):
	n = ii()
	c = n
	while n > 0:
		c += n // 10
		n = n - n // 10 * 10 + n // 10
		if n < 10:
			break
	print(c)


in1 = int(input())
for _ in range(in1):
	in2 = int(input())
	ans = in2
	while int(in2 / 10) > 0:
		ans += int(in2 / 10)
		in2 = in2 % 10 + int(in2 / 10)
	print(ans)


def f(n):
	if n <= 9:
		return n
	else:
		return n - n % 10 + f(n // 10 + n % 10)
t = int(input())
for _ in range(t):
	print(f(int(input())))


t = int(input())
mas = [None] * t
for i in range(t):
	mas[i] = int(input())
for i in range(t):
	s = mas[i]
	trat = 0
	ans = 0
	while s >= 10:
		trat = 10 * (s // 10)
		kash = trat // 10
		s += kash - trat
		ans += trat
	print(ans + s)


t = int(input())
for i in range(t):
	x = int(input())
	sum = x
	y = 1
	while y != 0:
		y = x // 10
		sum = sum + y
		z = x % 10
		x = y + z
	print(sum)


t = int(input())
for i in range(t):
	n = int(input())
	a = n
	res = 0
	while True:
		if len(str(n)) < 2:
			break
		r = n // 10
		res += r
		n = n - 10 * r + r
	print(a + res)


for _ in range(int(input())):
	s = int(input())
	ans = 0
	while s > 0:
		if s >= 10:
			t = s // 10
			s -= t * 10
			s += t
			ans += t * 10
		else:
			ans += s
			s = s // 10
	print(ans)


t = int(input())
for i in range(t):
	m = 0
	s = int(input())
	while s > 9:
		p = s - s % 10
		m += p
		s -= p
		s += p // 10
	m += s
	print(m)


import collections, heapq

def main():
	T = int(input().strip())
	for _ in range(T):
		n = int(input().strip())
		res = 0
		while n >= 10:
			res += n - n % 10
			n = n % 10 + n // 10
		res += n
		print(res)
main()


div3 = int(input())
for codeforces in range(div3):
	ans = 0
	r = input()
	p = int(r)
	while p:
		ssd = len(str(p))
		eer = str(p)
		bbt = '1' + (ssd - 1) * '0'
		bbo_bb = int(bbt)
		sssd = int(eer[0]) * bbo_bb
		ans += sssd
		p = p - sssd
		p += sssd // 10
	print(ans)


t = int(input())
while t > 0:
	res = 0
	Have_in_a_box = int(input())
	while Have_in_a_box > 0:
		price = Have_in_a_box
		factor = 1
		while price > 10:
			price = price // 10
			factor *= 10
		price *= factor
		res += price
		Have_in_a_box = Have_in_a_box - price + price // 10
	print(res)
	t -= 1


n = int(input())
for i in range(n):
	m = int(input())
	s = 0
	while m > 9:
		k = m // 10
		s += k * 10
		m = m % 10 + k
	if m != 0:
		s += m
	print(s)


t = int(input())
for _ in range(t):
	n = int(input())
	burels = 0
	while n >= 10:
		burels += n - n % 10
		n = n // 10 + n % 10
	burels += n % 10
	print(burels)


t = int(input())
for i in range(t):
	n = int(input())
	if n < 10:
		print(n)
	else:
		r = n // 10
		t = n // 10 + n % 10
		count = r * 10
		while t >= 10:
			p = t // 10
			count = count + p * 10
			t = t // 10 + t % 10
		count = count + t
		print(count)


def one():
	return int(input())

def two():
	return map(int, input().split())

def lis():
	return list(map(int, input().split()))

def st():
	return input()
for i in range(one()):
	s = one()
	summ = 0
	while s:
		if s < 10:
			summ += s
			s = 0
		else:
			c = s // 10 * 10
			summ += c
			s += c // 10
			s -= c
	print(summ)


T = int(input())
t = 0
while t < T:
	s = int(input())
	somma = 0
	x = 0
	while True:
		x = s // 10 * 10
		somma += x
		s = s - x * 9 / 10
		if x < 10:
			somma += s
			sommax = int(somma)
			break
	print(sommax)
	t = t + 1


def ii():
	return int(input())

def ai():
	return list(map(int, input().split()))

def mi():
	return map(int, input().split())
for _ in range(ii()):
	n = ii()
	ans = n
	while n >= 10:
		a = n // 10
		ans += a
		n -= a * 9
	print(ans)


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


from collections import deque
from math import ceil, floor, sqrt, gcd

def ii():
	return int(input())

def mi():
	return map(int, input().split())

def li():
	return list(mi())

def si():
	return input()
t = 1
t = ii()
while t:
	t -= 1
	n = ii()
	s = 0
	while n:
		if n < 10:
			s += n
			break
		else:
			x = n // 10
			s += 10 * x
			n %= 10
			n += x
	print(s)


def result(n):
	temp = 0
	sm = 0
	while n >= 10:
		temp = n // 10 + n % 10
		sm += n // 10 * 10
		n = temp
	return sm + n

def main():
	for _ in range(int(input())):
		n = int(input())
		print(result(n))
main()


n = int(input())
while n > 0:
	n = n - 1
	t = int(input())
	k = 0
	while t >= 10:
		k = k + t // 10
		t = t // 10 + t % 10
	print(k * 10 + t)


t = int(input())
count = 0
ans = []
while count < t:
	x = int(input())
	spend = 0
	cb = x // 10
	spend += cb * 10
	left = x - spend + cb
	while left >= 10:
		cb = left // 10
		spend += cb * 10
		left -= cb * 10
		left += cb
	spend += left
	ans.append(spend)
	count += 1
for y in ans:
	print(y)


import math
from bisect import bisect_left, bisect_right
from sys import stdin, stdout
input = lambda : stdin.readline().strip()
print = lambda s: stdout.write(s)
t = int(input())
for i in range(t):
	n = int(input())
	s = n
	while n > 0:
		nxt = int(int(str(n)[0]) * 10 ** (len(str(n)) - 1))
		n -= nxt - nxt // 10
		s += nxt // 10
	print(str(s) + '\n')


for _ in range(int(input())):
	n = int(input())
	if n < 10:
		print(n)
	else:
		x = n
		sum1 = 0
		while x // 10:
			sum1 = sum1 + x // 10 * 10
			t = x % 10
			p = x // 10
			x = t + p
		print(sum1 + x)


t = int(input())
for _ in range(t):
	s = int(input())
	res = 0
	while s >= 10:
		k = s // 10
		res += k * 10
		s -= k * 9
	res += s
	print(res)


for _ in range(int(input())):
	n = int(input())
	ans = 0
	while True:
		if n < 10:
			ans = ans + n
			break
		if n == 10:
			ans = ans + 11
			break
		temp = int((n - n % 10) / 10)
		ans += int(n - n % 10)
		n = n % 10 + temp
	print(ans)


import math
from sys import stdin, stdout
T = int(stdin.readline())
for i in range(T):
	N = int(stdin.readline())
	ans = 0
	while N >= 10:
		ans += N - N % 10
		N = N % 10 + N // 10
	ans += N
	print(ans)


def solve():
	T = int(input())
	for t in range(T):
		n = int(input())
		s = 0
		while n != 0:
			if n >= 10:
				s += n - n % 10
				n = n // 10 + n % 10
			else:
				s += n
				n = n // 10
		print(s)
solve()


def solve(s, ans):
	total = 0
	while s >= 10:
		total += 10 * (s // 10)
		s = s // 10 + s % 10
	total += s % 10
	ans.append(total)

def main():
	ans = []
	t = int(input())
	for i in range(t):
		s = int(input())
		solve(s, ans)
	for i in ans:
		print(i)
main()


t = int(input())
for _ in range(t):
	n = int(input())
	tot = n
	while n >= 10:
		rem = n % 10
		n = n // 10
		tot += n
		n += rem
	print(tot)


t = int(input())
for _ in range(t):
	s = int(input())
	ans = 0
	while s:
		x = s // 10
		lef = s % 10
		if x == 0:
			ans += lef
			break
		else:
			ans += x * 10
		s = x + lef
	print(ans)


def main():
	n = int(input())
	ans = n
	while n > 9:
		extra = n // 10
		rem = n % 10
		ans += extra
		n = extra + rem
	print(ans)
	return

def test():
	t = int(input())
	while t:
		main()
		t -= 1
test()


from sys import stdin, stdout
import collections
import itertools
import operator
import functools

def ii():
	return int(stdin.readline())

def mi():
	return map(int, stdin.readline().split())

def li():
	return list(mi())

def si():
	return stdin.readline()
for _ in range(ii()):
	s = ii()
	ans = s
	a = 0
	while s >= 10:
		a = s // 10
		s = s % 10 + a
		ans += a
	print(ans)


for _ in range(int(input())):
	n = int(input())
	if n < 10:
		print(n)
	else:
		cnt = 0
		while True:
			if n < 10:
				cnt += n
				break
			else:
				cnt += n // 10 * 10
				x = n % 10
				n = n // 10
				n += x
		print(cnt)


import math
c = int(input())
for i in range(c):
	n = int(input())
	s = 0
	while n >= 10:
		spend = n - n % 10
		s += spend
		n = math.floor(spend / 10) + n % 10
	if n > 0:
		s += n
	print(s)


for _ in range(int(input())):
	n = int(input())
	cay = n
	dem = 0
	while n >= 10:
		dem += n // 10
		n = n % 10 + n // 10
	print(int(dem + cay))


t = int(input())
for case in range(t):
	n = int(input())
	s = 0
	while n > 0:
		if n < 10:
			s += n
			n = 0
		else:
			s += 10 * (n // 10)
			n = n % 10 + n // 10
	print(s)


for _ in range(int(input())):
	n = int(input())
	s = 0
	while True:
		a = n // 10
		s += a * 10
		if n < 10:
			s += n
			break
		n = n - a * 10 + a
	print(s)


import math
import random
import sys
import collections

def In():
	return map(int, sys.stdin.readline().split())
input = sys.stdin.readline

def foodbuying():
	for _ in range(int(input())):
		x = int(input())
		print((x - 1) // 9 + x)
foodbuying()


for i in range(int(input())):
	b = int(input())
	b2 = b
	bonus = 0
	bonus2 = 0
	while int(b / 10) != 0:
		bonus = int(b / 10)
		b = int(b % 10) + bonus
		bonus2 += bonus
	print(b2 + bonus2)


t = int(input())
for k in range(t):
	n = int(input())
	sum = 0
	r = int(n / 10)
	while int(n / 10) > 0:
		r = n % 10
		sum += n - r
		n = int(n / 10) + r
	sum += n
	print(sum)


def acumulados(n):
	acumulado = 0
	residuo = 0
	valor = 0
	for i in reversed(range(2, len(n) + 1)):
		valor = int(n[i - 1])
		acumulado += int(n[:i]) - valor
		residuo += valor
	residuo += int(n[0])
	if residuo > 9:
		return acumulado + acumulados(str(residuo))
	else:
		return acumulado + residuo

def main():
	for i in range(int(input())):
		print(acumulados(input()))
main()


alph = 'abcdefghijklmnopqrstuvwxyz'
t = int(input())
for i in range(t):
	s = int(input())
	E = 0
	while s >= 10:
		k = 10 ** (len(str(s)) - 1)
		s = s - k + k // 10
		E += k
	E += s
	print(E)


t = int(input().strip())
for _ in range(t):
	s = int(input().strip())
	first = s
	remain = first % 10
	ans = s
	while first >= 10:
		ans += first // 10
		first = first // 10 + first % 10
	print(ans)


t = int(input())
ans = []
for i in range(t):
	s = int(input())
	max_s = 0
	res = s
	while res >= 10:
		max_s += res - res % 10
		cashback = res // 10
		res = res % 10 + cashback
	max_s += res
	ans.append(max_s)
for el in ans:
	print(el)


test = int(input())
for p in range(0, test):
	n = int(input())
	total = n + (n - 1) // 9
	print(total)


n = int(input())
for i in range(n):
	s = int(input())
	count = s
	while s >= 10:
		count += s // 10
		s = s // 10 + s % 10
	print(count)


import math, collections, sys
input = sys.stdin.readline

def case():
	s = int(input())
	ans = 0
	while s:
		spend = s // 10 * 10
		if spend == 0:
			spend = s
		ans += spend
		back = spend // 10
		s -= spend
		s += back
	print(ans)
for _ in range(int(input())):
	case()


import math
n = int(input())
for _ in range(n):
	b = int(input())
	if b == 1:
		print(b)
		continue
	sp = 0
	while b >= 10:
		x = b // 10 * 10
		sp = sp + x
		b = b - x + math.floor(x / 10)
	if b:
		sp = sp + b
	print(sp)


z = input
from math import *
for _ in range(int(z())):
	x = int(z())
	x = int(x // 0.9)
	print(x)


for _ in range(int(input())):
	n = int(input())
	if n % 9 == 0:
		x = n // 9 - 1
		y = x * 10
		z = y + 9
		print(z)
	else:
		x = (n - 9) // 9
		b = n - 9 - x * 9
		u = (n + 9 - b) // 9
		print((u - 1) * 10 + b)


for i in range(int(input())):
	x = int(input())
	sp = 0
	while x > 9:
		sp += x // 10 * 10
		x = x % 10 + x // 10
	print(sp + x)


t = int(input())
for i in range(t):
	a = int(input())
	ans = 0
	while 1:
		b = int(a / 10) * 10
		ans += b
		p = a - b
		a = p + int(a / 10)
		if a < 10:
			ans += a
			break
	print(ans)


t = int(input())
for i in range(t):
	n = int(input())
	ans = n + n // 9
	if n % 9 == 0:
		ans -= 1
	print(ans)


def fun(n, ans):
	if n < 10:
		return ans + n
	temp = n // 10
	ans += temp * 10
	n -= temp * 10
	n += temp
	return fun(n, ans)
for _ in range(int(input())):
	n = int(input())
	ans = 0
	print(fun(n, ans))


t = int(input())
for _ in range(t):
	n = int(input())
	res = 0
	while n >= 10:
		r = n - n % 10
		res += r
		n = n % 10 + r // 10
	res += n
	print(res)


t = int(input())
lis1 = []
for i in range(t):
	s = int(input())
	ans = rem = s
	while rem >= 10:
		k = rem // 10
		ans += k
		rem = rem % 10 + k
	lis1.append(ans)
for j in range(len(lis1)):
	print(lis1[j])


t = int(input())
output = []
for i in range(t):
	n = int(input())
	s = 0
	if n < 10:
		output.append(n)
		continue
	while n >= 10:
		q = n // 10
		r = n % 10
		s = s + q * 10
		n = r + q
	output.append(s + n)
for i in output:
	print(i)


t = int(input())
for i in range(t):
	money = int(input())
	ans = 0
	while money // 10 != 0:
		ans += money // 10 * 10
		money = money - money // 10 * 9
	ans += money
	print(ans)


t = int(input())
for i in range(t):
	a = int(input())
	s = a
	while 1:
		s += a // 10
		a = a // 10 + a % 10
		if a // 10 == 0:
			break
	print(s)


for _ in range(int(input())):
	n = int(input())
	rem = n
	spen = ans = 0
	while rem >= 10:
		k = rem // 10
		rem = rem - k * 10 + k
		ans += k * 10
	ans += rem
	print(ans)


x = int(input())
g = []
for i in range(x):
	r = 1
	s = 0
	l = int(input())
	while r:
		if l >= 0.01:
			s = s + l
			l = l / 10
		elif s - int(s) > 0:
			g.append(int(s))
			r = 0
		else:
			g.append(int(s))
			r = 0
i = 0
for i in range(len(g)):
	print(g[i])
	i += 1


out = []
for i in range(int(input())):
	num = int(input())
	sum = 0
	temp = num
	while temp > 0:
		val = num % 10
		tem = num - val
		sum = sum + tem
		temp = num // 10
		num = num // 10 + val
	sum += num
	out.append(sum)
for o in out:
	print(o)


t = int(input())
for g in range(t):
	n = int(input())
	s = 0
	while n > 9:
		d = n // 10
		s = s + d * 10
		n = n - 9 * d
	print(s + n)


t = int(input())
res = []
for i in range(t):
	s = int(input())
	a = s
	sum = 0
	while a > 9:
		c = (a - a % 10) // 10
		a = a % 10 + c
		sum += c
	res.append(s + sum)
for i in res:
	print(i)


def max_burles(n):
	total = 0
	additional = n % 10
	mod10 = n - additional
	total = int((10 * mod10 - 1) / 9)
	print(total + additional + int((total % 10 + additional) / 10))
t = int(input())
for _ in range(t):
	n = int(input())
	max_burles(n)


t = int(input().strip())
for case in range(t):
	n = int(input().strip())
	s = 0
	while n >= 10:
		s += n // 10 * 10
		n = n // 10 + n % 10
	s += n
	print(s)


q = int(input())
for k in range(q):
	n = int(input())
	if n < 10:
		print(n)
	else:
		sobrou = n
		while sobrou >= 10:
			cont = sobrou // 10
			sobrou = sobrou - cont * 10 + cont
			n += cont
		print(n)


t = int(input())
while t:
	a = int(input())
	total = a
	while a >= 10:
		total += a // 10
		a = a // 10 + a % 10
	t -= 1
	print(total)


import math

def solve(s):
	if s < 10:
		return s
	else:
		ans = 0
		while True:
			k = int(math.log10(s))
			ans += 10 ** k
			s = s - 10 ** k + 10 ** (k - 1)
			if s < 10:
				ans += s
				break
		return ans
t = int(input())
while t:
	s = int(input())
	print(solve(s))
	t = t - 1


def binarySearch(arr, x):
	l = 0
	r = len(arr) - 1
	while l <= r:
		mid = (l + r) // 2
		if arr[mid] == x:
			return mid
		elif arr[mid] < x:
			l = mid + 1
		else:
			r = mid - 1
	return -1

def js(arr, x):
	l = 0
	r = len(arr) - 1
	ans = -1
	while l <= r:
		m = (l + r) // 2
		if arr[m] <= x:
			ans = m
			l = m + 1
		else:
			r = m - 1
	return ans

def jg(arr, x):
	l = 0
	r = len(arr) - 1
	ans = -1
	while l <= r:
		m = (l + r) // 2
		if arr[m] >= x:
			ans = m
			r = m - 1
		else:
			l = m + 1
	return ans
from math import *
for __ in range(int(input())):
	n = int(input())
	count = 0
	while n >= 10:
		count += 10 * (n // 10)
		n = n - 10 * (n // 10) + n // 10
	print(count + n)


import sys
T = int(sys.stdin.readline())
for _ in range(T):
	x = int(sys.stdin.readline())
	result = 0
	while x // 10:
		burles = x // 10 * 10
		result += burles
		x -= burles * 9 // 10
	result += x
	print(result)


t = int(input())
while t:
	num = int(input())
	res = 0
	while num >= 10:
		balance = num % 10
		s_total = num - balance
		cashback = int(s_total / 10)
		res = res + s_total
		num = balance + cashback
	res += num
	print(int(res))
	t -= 1


def result(n):
	temp = 0
	if n < 10:
		print(n)
	else:
		while n > 9:
			x = n // 10 * 10
			temp = temp + x
			n = x // 10 + n % 10
		temp = temp + n
		print(temp)
t = int(input())
while t > 0:
	n = int(input())
	result(n)
	t = t - 1


from sys import stdin, stdout
t = 1
t = int(input())
for i in range(t):
	n = int(input())
	ans = 0
	while n >= 10:
		ans += n // 10 * 10
		n = n // 10 + n % 10
	print(ans + n)


t = int(input())
while t > 0:
	s = int(input())
	sumi = 0
	while s >= 10:
		sumi += int(s / 10) * 10
		rem = s % 10
		s = int(s / 10) + rem
	print(sumi + s)
	t -= 1


t = int(input())
for _ in range(t):
	s = int(input())
	b = s
	ans = 0
	c = 0
	while s > 10:
		ans = s % 10
		c += s // 10
		s = s // 10 + ans
	print(b + c + s // 10)


for _ in range(int(input())):
	N = int(input())
	ans = 0
	while N != 0:
		s = str(N)
		p = 10 ** (len(s) - 1)
		q = N // p
		N -= q * p
		ans += q * p
		N += q * p // 10
	print(ans)


n = int(input())
for i in range(n):
	m = int(input())
	o = m
	spent = 0
	if m % 9 == 0:
		m = m // 9 - 1
		o = o - m * 9
		print(m * 10 + o)
	elif m >= 10:
		m = m // 9
		o = o - m * 9
		print(m * 10 + o)
	else:
		print(m)


g = int(input())
for _ in range(g):
	k = int(input())
	u = k
	c = 0
	while k >= 10:
		d = k // 10
		h = k % 10
		k = h + d
		c += d
	print(c + u)


def solve(s):
	ans = 0
	while s:
		(q, r) = divmod(s, 10)
		if q == 0:
			ans += r
			return ans
		ans += 10 * q
		s = q + r
	return ans
T = int(input())
for t in range(T):
	s = int(input())
	print(solve(s))


from math import floor
t = int(input())
for i in range(t):
	n = int(input())
	ans = 0
	while n >= 10:
		ans += n - n % 10
		n = n // 10 + n % 10
	print(ans + n)


T = int(input())
for _ in range(T):
	N = int(input())
	s = 0
	while N > 9:
		x = N % 10
		s += N // 10 * 10
		N = N // 10 + x
	print(s + N)


from math import floor
t = int(input())
for _ in range(t):
	n = int(input())
	a = 0
	k = 0
	while n // 10 >= 10 or n >= 10:
		a += n // 10 * 10
		k = n // 10 * 10 // 10
		n = n % 10 + k
	else:
		a += n % 10
	print(a)


import sys
reader = (s.rstrip() for s in sys.stdin)
input = reader.__next__

def cashback():
	for _ in range(t):
		n = int(input())
		cash = n
		rem = 0
		res = 0
		while cash > 9:
			res += cash // 10
			cash = cash // 10 + cash % 10
		yield (res * 10 + cash)
t = int(input())
ans = cashback()
print(*ans, sep='\n')


import sys
sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep='\n')

def II():
	return int(sys.stdin.readline())

def MI():
	return map(int, sys.stdin.readline().split())

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number):
	return [LI() for _ in range(rows_number)]

def SI():
	return sys.stdin.readline()[:-1]

def main():
	t = II()
	for _ in range(t):
		ans = 0
		s = II()
		while s > 9:
			ans += s // 10 * 10
			s = s // 10 + s % 10
		ans += s
		print(ans)
main()


t = int(input())
for i in range(t):
	n = int(input())
	ans = 0
	while n >= 10:
		(q, r) = divmod(n, 10)
		ans += q * 10
		n = q + r
	print(ans + n)


f = int(input())
nums = []
for i in range(f):
	nums.append(int(input()))
for i in nums:
	copy = i
	final = 0
	while copy >= 10:
		d = copy // 10
		copy -= d * 10
		copy += d
		final += d * 10
	final += copy
	print(final)


import sys
from math import ceil, sqrt
read = sys.stdin.buffer.readline
mi = lambda : map(int, read().split())
li = lambda : list(mi())
cin = lambda : int(read())

def isp(n):
	i = 2
	while i * i <= n:
		if n % i == 0:
			return False
		i += 1
	return True
primes = []
for _ in range(cin()):
	n = cin()
	ans = 0
	while n != 0:
		k = n - n % 10
		if k == 0:
			k = n
		n = n - k + k // 10
		ans += k
	print(ans)


t = int(input())
for _ in range(t):
	n = int(input())
	s = 0
	m = n
	while n >= 10:
		s += n // 10 * 10
		l = n - n // 10 * 10
		n = l + n // 10 * 10 // 10
	print(s + n)


from math import floor
t = int(input())
for test_case in range(t):
	s = int(input())
	cashback = 0
	temp_s = s
	while temp_s >= 10:
		remainder = temp_s % 10
		divisible_by_ten_value_of_s = temp_s - remainder
		temp_s -= divisible_by_ten_value_of_s
		cashback += divisible_by_ten_value_of_s / 10
		temp_s += divisible_by_ten_value_of_s / 10
	print(int(s + cashback))


t = int(input())
for i in range(t):
	num = int(input())
	count = 0
	rem = 0
	while num >= 10:
		rem = int(num // 10)
		num = num % 10 + int(num // 10)
		count += rem * 10
	print(count + num)


def f(a):
	if a < 10:
		return a
	return a // 10 * 10 + f(a // 10 + a % 10)
t = int(input())
while t > 0:
	t -= 1
	print(f(int(input())))


import sys

def solution(n):
	spend = 0
	while n >= 10:
		spend += n - n % 10
		n = n // 10 + n % 10
	print(spend + n)
for line in sys.stdin:
	t = int(line)
	break
for line in sys.stdin:
	n = int(line)
	solution(n)


import math
for _ in range(int(input())):
	s = int(input())
	burls = 0
	while s:
		if s < 10:
			burls += s
			s = 0
		else:
			div = s // 10
			burls += div * 10
			s %= 10
			s += div
	print(burls)


from math import gcd, ceil, log
from collections import Counter, deque
from heapq import heappush, heappop, heapify

def rl():
	return list(map(int, input().split()))

def ans(n):
	a = n / 9
	b = n // 9
	return n + b if a != b else n + b - 1
for _ in range(int(input())):
	n = int(input())
	print(ans(n))


t = int(input())
for i in range(t):
	n = int(input())
	xx = str(n)
	op = 0
	while n >= 10:
		x = pow(10, len(xx) - 1)
		op += x
		n = n - x + x // 10
		xx = str(n)
	print(op + n)


n = int(input())
for i in range(n):
	a = int(input())
	count = 0
	while True:
		f = a % 10
		a = a - f
		count = count + a
		a = int(a / 10)
		a = a + f
		if a < 10:
			count = count + a
			break
	print(count)


t = int(input())
b = list()
for i in range(t):
	a = int(input())
	c = a
	if a > 9:
		while a > 9:
			d = int(a / 10)
			c = c + d
			a = a - d * 10 + d
	else:
		c = a
	b.append(c)
for i in b:
	print(i)


for t in range(int(input())):
	n = int(input())
	s = 0
	d = n
	while d > 0:
		if d < 10:
			break
		else:
			s += d // 10
			d = d // 10 + d % 10
	s += n
	print(s)


t = int(input())
ans = []
for kek in range(t):
	n = int(input())
	s = 0
	while n >= 10:
		k = n // 10
		s += k * 10
		n -= k * 10
		n += k
	s += n
	ans.append(s)
print(*ans, sep='\n')


import sys
input = sys.stdin.readline
Q = int(input())
Query = [int(input()) for _ in range(Q)]
for N in Query:
	ans = 0
	while N >= 10:
		(a, b) = (N // 10, N % 10)
		ans += a * 10
		N = b + a
	ans += N
	print(ans)


n = int(input())
for i in range(n):
	l = int(input())
	z = 0
	k = l
	while k >= 10:
		m = k // 10
		z += m
		k = m + k % 10
	print(z + l)


import sys
input = sys.stdin.readline
scan_int = lambda : int(input())
scan_string = lambda : input()
read_list = lambda : list(read())
read = lambda : map(int, input().split())
read_float = lambda : map(float, input().split())

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def factorial(x, m):
	val = 1
	while x > 0:
		val = val * x % m
		x -= 1
	return val

def fact(x):
	val = 1
	while x > 0:
		val *= x
		x -= 1
	return val

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // math.gcd(a, b)

def nCr(n, k):
	if k > n:
		return 0
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res)

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	(prime[0], prime[1]) = (False, False)
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def phi(n):
	result = n
	p = 2
	while p * p <= n:
		if n % p == 0:
			while n % p == 0:
				n = n // p
			result = result * (1.0 - 1.0 / float(p))
		p = p + 1
	if n > 1:
		result = result * (1.0 - 1.0 / float(n))
	return int(result)

def is_prime(n):
	if n == 0:
		return False
	if n == 1:
		return True
	for i in range(2, int(n ** (1 / 2)) + 1):
		if not n % i:
			return False
	return True

def next_prime(n, primes):
	while primes[n] != True:
		n += 1
	return n
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i
spf = [0 for i in range(MAXN)]

def factoriazation(x):
	res = []
	for i in range(2, int(x ** 0.5) + 1):
		while x % i == 0:
			res.append(i)
			x //= i
	if x != 1:
		res.append(x)
	return res

def factors(n):
	res = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			res.append(i)
			res.append(n // i)
	return list(set(res))

def int_array():
	return list(map(int, input().strip().split()))

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()

def binary_search(low, high, w, h, n):
	while low < high:
		mid = low + (high - low) // 2
		if check(mid, w, h, n):
			low = mid + 1
		else:
			high = mid
	return low

def check(beauty, s, n, count):
	pass
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
from itertools import permutations
import math
import bisect as bis
import random
import sys

def solve():
	s = scan_int()
	if s < 10:
		print(s)
		return
	if s == 10:
		print(11)
		return
	summ = 0
	while s >= 10:
		rem = s % 10
		summ += s - rem
		s //= 10
		s += rem
	summ += s
	print(summ)
for _ in range(int(input())):
	solve()


t = int(input())
for tt in range(t):
	n = int(input())
	ans = n // 10 * 10
	cashback = n // 10
	baaki = cashback + n % 10
	while baaki >= 10:
		ans += baaki // 10 * 10
		cc = baaki // 10
		baaki = cc + baaki % 10
	ans += baaki
	print(ans)


t = int(input())
for _ in range(t):
	n = int(input())
	spent = 0
	remaining = 0
	while True:
		spent += n - n % 10
		n = n % 10 + n // 10
		if n < 10:
			break
	print(spent + n)


mod = 10 ** 9 + 7
import math
from bisect import bisect_left
from collections import Counter
from itertools import combinations

def ain():
	return map(int, input().split())

def fain():
	return map(float, input().split())
for _ in range(int(input())):
	n = int(input())
	su = 0
	init = int(math.log10(n))
	while init > 0 and n >= 0:
		init = int(math.log10(n))
		val = n // 10 ** init
		su += val * 10 ** init
		n -= val * (10 ** init - 10 ** (init - 1))
	print(su + int(n))


t = int(input())
for _ in range(t):
	s = int(input())
	print((s - 10) * 10 // 9 + 11)


for _ in range(int(input())):
	n = int(input())
	ans = 0
	while n > 0:
		s = str(n)
		spend = int(s[0] + '0' * (len(s) - 1))
		ans += spend
		if len(s) > 1:
			n = int(s[1:]) + spend // 10
		else:
			n = spend // 10
	print(ans)


for _ in range(int(input())):
	x = int(input())
	diff = 0
	if x % 9 == 0:
		diff += 1
	print(10 * (x // 9) + x % 9 - diff)


t = int(input())
while t > 0:
	n = int(input())
	sum1 = 0
	while n > 0:
		k1 = n % 10
		n = n // 10
		sum1 += n * 10
		if n == 0:
			break
		else:
			n = n + k1
	print(sum1 + k1)
	t -= 1


import math
for _ in range(int(input())):
	N = int(input())
	cash = 0
	M = N
	while M >= 10:
		r = M % 10
		M = M // 10
		N += M
		M += r
	print(N)


for _ in range(int(input())):
	total = int(input())
	spent = 0
	while total > 9:
		cashback = total // 10
		spent_on = cashback * 10
		spent += spent_on
		total = total - spent_on + cashback
	spent += total
	print(spent)


import math
import sys
import itertools
import fractions
wtf = sys.stdin.read()
wtf = wtf.strip().split('\n')
t = int(wtf[0])
for s in wtf[1:]:
	n = int(s)
	ans = n
	while n >= 10:
		(q, r) = divmod(n, 10)
		n = q + r
		ans += q
	print(ans)


t = int(input())
for q in range(t):
	n = int(input())
	count = 0
	while n != 0:
		if n // 10 == 0:
			count += n
			break
		a = n % 10
		count += n - n % 10
		n = n // 10 + a
	print(count)


t = int(input())
for _ in range(t):
	s_current = int(input())
	s_total = s_current
	while s_current >= 10:
		remainder = s_current % 10
		s_current -= remainder
		multiplier = round(s_current / 10)
		s_current -= 9 * multiplier
		s_total += 1 * multiplier
		s_current += remainder
	print(s_total)


t = int(input())
f = ''
for _ in range(t):
	s = int(input())
	d = 0
	while s:
		n = s // 10
		if n == 0:
			d += s
			s = 0
		else:
			d += n * 10
			m = s % 10
			s = n + m
	f += str(d) + '\n'
print(f)


t = int(input())
for loop in range(t):
	s = int(input())
	ans = 0
	while s >= 10:
		ans += s // 10 * 10
		s = s % 10 + s // 10
	print(ans + s)


n = int(input())
for i in range(n):
	a = int(input())
	ans = a
	pw = 1000 * 1000 * 1000
	while a >= 10:
		while a < pw:
			pw = pw // 10
		ans = ans + pw // 10
		a = a - pw + pw // 10
	print(ans)


for nt in range(int(input())):
	n = int(input())
	ans = 0
	while n // 10 >= 1:
		ans += n - n % 10
		n = n // 10 + n % 10
	print(ans + n)