Guddu on a Date

All submissions for this problem are available.
### Read problem statements in [Hindi](http://www.codechef.com/download/translated/JUNE19/hindi/KS2.pdf), [Bengali](http://www.codechef.com/download/translated/JUNE19/bengali/KS2.pdf), [Mandarin Chinese](http://www.codechef.com/download/translated/JUNE19/mandarin/KS2.pdf), [Russian](http://www.codechef.com/download/translated/JUNE19/russian/KS2.pdf), and [Vietnamese](http://www.codechef.com/download/translated/JUNE19/vietnamese/KS2.pdf) as well. Guddu likes a girl that loves playing with numbers. She agreed to go on a date with Guddu, but only if he can solve the following problem: An integer is *round* if it is greater than $0$ and the sum of its digits in decimal representation is a multiple of $10$. Find the $N$th smallest round integer. However, Guddu does not like playing with numbers at all and he is unable to solve this problem, so he begs you to solve it for him. In return, he will definitely give you a treat. ### 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. It is guaranteed that this number is smaller than $2^{64}$. ### Constraints  $1 \le T \le 10^5$  $1 \le N \le 10^{18}$ ### Subtasks **Subtask #1 (30 points):**  $1 \le T \le 10$  $1 \le N \le 10^5$ **Subtask #2 (70 points):** original constraints ### Example Input ``` 1 2 ``` ### Example Output ``` 28 ``` ### Explanation **Example case 1:** The smallest round integer is $19$ and the second smallest is $28$.Author:  kartik_354 
Tags  kartik_354 
Date Added:  25042019 
Time Limit:  1 sec 
Source Limit:  50000 Bytes 
Languages:  C, CPP14, JAVA, PYTH, PYTH 3.6, PYPY, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, rust, SCALA, swift, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, kotlin, PERL6, TEXT, SCM chicken, PYP3, CLOJ, R, COB, FS 
Comments
 Please login at the top to post a comment.
SUCCESSFUL SUBMISSIONS
Fetching successful submissions
HELP
If you are still having problems, see a sample solution here. 