DCEPC505  Bazinga!
Sheldon is very proud of his intelligence. To test his intelligence Howard designs a puzzle and asks him to solve it. The puzzle consists of special numbers which can be obtained by multiplying exactly two distinct prime numbers. Sheldon has to tell Howard what is the Kth element of this series. Help him.
For Example 6, 10, 14, 15 are the first few members of this series whereas 4, 9 and 12 are not.
Input
First line specifies T, the number of test cases.
Next T lines each gives 1 number, K
Output
Output 1 line for each test case giving the Kth element of this series.
Constraints
1 <= T <= 1000
1 <= K <= 2000000
Example
Input: 4 2 3 5 7 Output: 10 14 21 26
hide comments
magnesium12:
20230608 14:38:13
More refined N = 10527450, although this would hardly make any difference. Last edit: 20230608 14:39:07 

ayu_031201:
20220109 13:01:40
N= 10600000 . and check if d is prime and n/d should also be a prime where dn. Last edit: 20220109 13:06:40 

dhruv788:
20200714 11:22:49
Just solved it after a hell lot of work, Try using sieve with linear complexity 

ni_kill12:
20191008 18:14:38
what could be for k=6 and tell me how ? plis


y17prashant:
20190108 21:10:14
just take care of size while implementing seive costed me overflow and RTE 

sphere913:
20181022 16:56:48
how to find bounds? hint please 

nadstratosfer:
20180630 11:44:35
Francky, your 0.00s here is such an eyesore ;) Can it be reproduced or is it a result of some server instability?


Ricardo Bittencourt:
20150211 14:00:41
Please add Haskell. 

Bharath Reddy:
20140928 15:42:27
Phew! Took 6 hours to get AC, after 3 TLEs.


Rishav Goyal:
20140610 23:49:14
i can't beliveve ac after so many tle :D :D: 
Added by:  dce coders 
Date:  20120418 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All 
Resource:  Own Problem 