Medium
Recursion > Basic Recursion

Think of a sorted array of integer X where ith element of X is
X[i]= 2^p * 3^q * 5^r * 7^s * 11^t * 13^u where p,q,r,s,t,u>=0
in other word , if you prime factorize any element of X you can get only 2,3,5,7,11 and/or 13
so the array is looks like
X={1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,18,20,21,22,24,……..}
you have to calculate the ith element of X
Input:
------
First line a positive integer **T<=30000**
then T lines contain a non negative integer i
Output:
-------
You have to print X[i] in a line for each test cases.
You can assume **X[i]<=1000000000**
Sample input:
-------------
6
0
20
15
100
1000
25000
Sample output:
--------------
1
24
16
216
20800
682628310

#### Please login to submit solution to this problem.