TDKPRIME  Finding the Kth Prime
The problem statement is really simple. There are some queries. You are to give the answers.
Input
An integer stating the number of queries Q(equal to 50000), and Q lines follow, each containing one integer K between 1 and 5000000 inclusive.
Output
Q lines with the answer of each query: the Kth prime number.
Example
Input: 7 1 10 100 1000 10000 100000 1000000 Output: 2 29 541 7919 104729 1299709 15485863
hide comments
rockingcoder97:
20200130 19:54:20
getting a runtime error


sanket17:
20200122 11:02:52
Apply sieve till 87000008


aryan29:
20191014 14:15:43
precalculate all and submit 0.04 sec thats it 

akashbhalotia:
20190522 19:53:11
In Java, I had to use Fast IO, and bitwise sieve+bitset to get AC. 

maxboom321:
20180919 18:01:03
Took 0.76 sec using bitwise_seive.How to improve? 

eagleshadow:
20180908 16:58:10
used bitwise sieve


himanshu_159:
20180114 07:29:58
@ayushgupta1997 how you got the max value


ayushgupta1997:
20171209 11:53:04
Simple Problem ,attempted after 1 year AC in one go :)


Sushant Moon:
20171006 00:01:57
Is there some problem with the test cases, i checked/compared/doublechecked the prime numbers generated by my sieve for first 5million primes, with 5million primes from https://primes.utm.edu/lists/small/millions/, they check out all of them are correct. But the test cases is giving me WA.


kmkhan_014:
20170828 13:20:24
took 0.6 s...how to improve upon time

Added by:  Alfonso² Peterssen 
Date:  20100406 
Time limit:  1.240s 
Source limit:  10000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM32 ASM64 BF CLPS LISP sbcl LISP clisp ERL HASK ICON ICK JSRHINO LUA NEM NICE OBJC OCAML PHP PIKE PRLGswi SCALA SCM qobi SCM guile ST SQLITE TCL WHITESPACE 
Resource:  Thanks to TDuke 