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.
First line specifies T, the number of test cases.
Next T lines each gives 1 number, K
Output 1 line for each test case giving the Kth element of this series.
1 <= T <= 1000
1 <= K <= 2000000
Input: 4 2 3 5 7 Output: 10 14 21 26
just take care of size while implementing seive costed me overflow and RTE
how to find bounds? hint please
Francky, your 0.00s here is such an eyesore ;) Can it be reproduced or is it a result of some server instability?
Please add Haskell.
Phew! Took 6 hours to get AC, after 3 TLEs.
i can't beliveve ac after so many tle :D :D:
took 3 hours to determine the bounds and 1 hour to remove Sigsegv error...finally AC
NZEC in Java for Test Case 5..pls hlp :(
|Added by:||dce coders|
|Cluster:||Cube (Intel G860)|
|Languages:||ASM32-GCC MAWK BC C-CLANG C C++ 4.3.2 CPP CPP14 CPP14-CLANG COBOL COFFEE D-CLANG D-DMD DART ELIXIR FANTOM FORTH GOSU GRV JAVA JS-MONKEY KTLN NIM NODEJS OBJC OBJC-CLANG OCT PICO PROLOG PYPY PY_NBC R RACKET RUST CHICKEN SQLITE SWIFT UNLAMBDA VB.NET|