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
hridoymia001:
20231023 12:52:05
sieve of erastothenes code gives time limit 

rik_01_11:
20231007 00:16:56
having trouble see this explanation https://www.youtube.com/watch?v=DHwPoAV_0&list=PLN4aKSfpk8TQDJz7KLiwGFgnoUUwzfl1i&index=3&t=688s 

arjunac_7:
20230926 15:35:59
can anyone share the solution in java!!???


pseudofool:
20230304 10:25:19
For those who are asking how to find that there are 5 million primes under 90 million:


iangkur:
20230115 12:38:35
How do you guys know that there are 5 million primes under 90 million? I mean, is there any equation? 

shelby_sravan:
20221231 12:03:58
If any one have python code please share it


ayush_7901:
20221220 10:40:54
Used sieve of erastothenes solved in 1 go 

kodershut:
20221129 19:00:37
how to guess the value of n, like under which we can generate 5million primes. Last edit: 20221130 05:37:38 

prateek7248:
20220829 13:07:33
how can we solve it in python? 

kalinga:
20220813 11:18:48
what java code will use? tried all attempt getting TLE/Sigterm

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 guile SCM qobi ST SQLITE TCL WHITESPACE 
Resource:  Thanks to TDuke 