TDKPRIME - Finding the Kth Prime
The problem statement is really simple. There are some queries. You are to give the answers.
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.
Q lines with the answer of each query: the Kth prime number.
Input: 7 1 10 100 1000 10000 100000 1000000 Output: 2 29 541 7919 104729 1299709 15485863
Codechef compiler showed 1.76 sec on given test cases yet I got AC.
can I get some suggestion for solve this problem with java. I access the memory with 99000001.but it show's the run time error
can we solve this using python,it is giving TLE,any idea for thisLast edit: 2021-01-08 08:06:28
Can we solve the problem using python??
use array of size 90000001 with type boolLast edit: 2020-12-20 07:02:18
how to reduce time limit i got it 1.11 second in c++
C++ implementation gives a TLE with Memory of 731 mb using array of size 87000009.
not getting why my solution failed using Java, help please!
do the queries need to be in ascending order?
|Added by:||Alfonso² Peterssen|
|Cluster:||Cube (Intel G860)|
|Languages:||All except: ASM32 ASM64 BF CLPS LISP sbcl LISP clisp ERL HASK ICON ICK JS-RHINO LUA NEM NICE OBJC OCAML PHP PIKE PRLG-swi SCALA SCM qobi SCM guile ST SQLITE TCL WHITESPACE|
|Resource:||Thanks to TDuke|