You are given a special set of pure numbers.
A pure number has the following properties:
For example, 4444,5445,44 are the pure numbers while 12,444,4545 are not. You have to generate a list of pure numbers in an ascending order. So, purenumber[1] < purenumber[2].
The first few elements in the list are as follows: 44,55,4444,....
You will be given an integer N and you have to find Nth pure number from the generated list.
Example
Consider N = 2. You must determine the Nth pure number from the generated list.
The 2nd pure number in the list is 55.
Therefore the answer is 55.
Function description
Complete the solve function provided in the editor. This function takes the following 1 parameter and returns the Nth pure number from the generated list.
Input format
Note: This is the input format that you must use to provide custom input (available above the Compile and Test button).
Output format
Constraints
1≤T≤106
1≤N≤106
Code snippets (also called starter code/boilerplate code)
This question has code snippets for C, CPP, Java, and Python.
Here, T=3 that means there are 3 test cases
In the 1st test case N=1, so we have to print the 1st pure number that is 44
Similarly, in 2nd and 3rd Test cases, we have to print the 2nd and 3rd pure number in the series. Hence, we have to print 55 and 4444 respectively.