Problem title
Difficulty
Avg time to solve

Count Even Odd
Moderate
20 mins
Minimum Direction Changes
Hard
50 mins
Sorting Of A Rotated Sorted Array
Easy
10 mins
Sum of Bit Difference Among all Pairs
Easy
15 mins
Word Boggle
Ninja
--
Social Networking Graph
Moderate
15 mins
Minimum Cost to Make at Least One Valid Path in a Grid
Moderate
20 mins
Allocate Books
Hard
--
Generate all binary strings from pattern
Moderate
10 mins
Pair Difference K
Moderate
15 mins 3

# Nth Number

Difficulty: HARD
Avg. time to solve
50 min
Success Rate
40%

Problem Statement

#### In a series of numbers where each number is such that the sum of its digits equals 10. Given an integer value 'N', your task is to find the N-th positive integer whose sum of digits equals to 10.

##### Input Format:
``````The first line contains an Integer 'T' which denotes the number of test cases/queries to be run.
Then the test cases follow.

The first line of input for each test case/query contains an integer N, the Nth number to find.
``````
##### Output Format:
``````For each test case, print the N-th positive integer whose sum of digits equals 10.

Output for every test case will be printed in a separate line.
``````

#### Note

``````You do not need to print anything, it has already been taken care of. Just implement the given function.
``````
##### Constraints:
``````1 <= T <= 100
1 <= N <= 10^7

Time Limit: 1sec
``````
##### Sample Input 1:
``````2
1
4
``````
##### Sample Output 1:
``````19
46
``````
##### Explanation of Sample Input 1:
``````Since N=1 here, therefore, the first number having a sum of digits equal to 10 is 19. Therefore, the output here is 19.

Since N=4 here, therefore, The first four numbers having a sum of digits equal to 10 are 19, 28, 37, and 46. Therefore, the output here becomes 46.
``````
##### Sample Input 2:
``````2
5
9
``````
##### Sample Output 2:
``````55
91
``````   Console