N’th Smart Number
Submissions: 188   Accuracy:

19.15%

  Difficulty: Easy   Marks: 2

Smart number is a number which has at least three distinct prime factors. Given a number n, find the n’th smart number.

Input:

The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. The first line of each test case contains the integer N.

Output:

Print the n'th smart number for each test case in a new line.


Constraints:

1<= T <=100

1<= N <=1000000


Example:

Input:

3

1

50

1000

Output:

30

273

2664

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

Contributor: Sujnesh Mishra
Author: sujnesh


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



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

to report an issue on this page.