SOLVE

LATER

We love pirates!

Problem

Editorial

Analytics

Compact Disk Digital Audio, or CD, are encoded using prime numbers as encryption key. The pirate king of the batch, Sanjay Prajapat, has the CD of his favorite WWE fight clip, featuring Stone Cold scaring the pants off Ronald Krump. He wants to upload the clip to a famous torrent website which features a pirate ship as its symbol. Since uploading the clip requires the CD be decoded, one must know about prime numbers. Sanjay doesn't know how to check whether a number is prime or not. So he took the help of his friend Bissu (the Java Collections God), who unwillingly gave some prime numbers to Sanjay. Thus Sanjay knows some prime numbers less than or equal to ** N**. Since decoding requires bigger prime numbers, Sanjay wants to find how many distinct prime numbers he can make using the sum of at least two consecutive prime numbers less than or equal to

** T**, the number of test cases

Each of the next T lines contain a number

For each value of ** N**, output the required number in a new line.

1 <= ** T** <= 1000

1 <=

Explanation

For first case, ** N** = 5

There are 3 prime numbers less than or equal to 5: 2 , 3 ,5.

Desired prime numbers are : 2+3 = 5

For second case,

There are 4 prime numbers less than or equal to 10 : 2 , 3 , 5 , 7.

Desired prime numbers are : 2+3 = 5 , 2+3+5+7 =17.

So the answer is 2.

Time Limit:
1.0 sec(s)
for each input file.

Memory Limit:
256 MB

Source Limit:
1024 KB

Marking Scheme:
Marks are awarded when all the testcases pass.

Allowed Languages:
C,
C++,
C++14,
Clojure,
C#,
D,
Erlang,
F#,
Go,
Groovy,
Haskell,
Java,
Java 8,
JavaScript(Rhino),
JavaScript(Node.js),
Julia,
Kotlin,
Lisp,
Lisp (SBCL),
Lua,
Objective-C,
OCaml,
Octave,
Pascal,
Perl,
PHP,
Python,
Python 3,
R(RScript),
Racket,
Ruby,
Rust,
Scala,
Swift,
Visual Basic

Initializing Code Editor...

{"0463cd7": "/pagelets/recommended-problems/algorithm/prime-6/", "3672587": "/pagelets/problems-hint/algorithm/prime-6/", "ccba48f": "/pagelets/show-submission/algorithm/prime-6/", "537fda2": "/pagelets/problem-author-tester/algorithm/prime-6/", "880c926": "/pagelets/suggested-problems/algorithm/prime-6/"}

realtime.hackerearth.com

80

a49bfc5a755bc848f2261dd52c7b6831fd91b27d

58a29e5cae2309f04b28

/realtime/pusher/auth/