Taasha's round integer

5

1 votes
Problem

Taasha defines an integer round if it is greater than 0 and the sum of its digits in decimal representation is a multiple of 10. She wants you to find for her the Nth smallest round integer.

________________________________________________________________

INPUT

  • The first line of the input contains a single integer T denoting the number of test cases. The description of T test cases follows.
  • The first and only line of each test case contains a single integer N.

______________________________________________________________

OUTPUT

For each test case, print a single line containing the N-th round integer.

______________________________________________________________

CONSTRAINTS

1 <= T <=10^5

1<= N <= 10^18

 

Sample Input
1
2
Sample Output
28
Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

19 is the 1st round integer ( 1st number to have sum of digits as a multiple of 10)  and 28 is the 2nd round integer.

Editor Image

?