BETA

Difficulty Level: Easy

Submissions: 183 Accuracy:

45.9%

Nth number made of prime digits
       

Given a number 'N', we need to find the Nth number whose each digit is a prime number i.e 2, 3, 5, 7. In other words you have to find nth number of this sequence : 2, 3, 5, 7, 22, 23 ,.. and so on.

INPUT:
The first line contains a single integer T i.e. the number of test cases. The first and only line of each test case consists of an integer N

OUTPUT: 
In one line print the nth number of the given sequence made of prime digits.

CONSTRAINTS:
1<=T<=100
1<=N<=100

EXAMPLES:
INPUT:

2
10
21

OUTPUT:
33
222
     

 

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Saksham Ashtputre

Set Default Code

					   
It is recommended to 'Compile & Test' your code before clicking 'Submit'!

Compilation/Execution Result:

Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.