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++,
Clojure,
C#,
D,
Erlang,
F#,
Go,
Groovy,
Haskell,
Java,
Java 8,
JavaScript(Rhino),
JavaScript(Node.js),
Lisp,
Lisp (SBCL),
Lua,
Objective-C,
OCaml,
Octave,
Pascal,
Perl,
PHP,
Python,
Python 3,
R(RScript),
Racket,
Ruby,
Rust,
Scala,
Scala 2.11.8,
Swift,
Visual Basic

Initializing Code Editor...

{"ecdf71e": "/pagelets/suggested-problems/algorithm/prime-6/", "ecdf6fc": "/pagelets/show-submission/algorithm/prime-6/", "ecdf76c": "/pagelets/recommended-problems/algorithm/prime-6/", "ecdf757": "/pagelets/problems-hint/algorithm/prime-6/", "ecdf741": "/pagelets/problem-author-tester/algorithm/prime-6/"}

{}

realtime.hackerearth.com

80

a49bfc5a755bc848f2261dd52c7b6831fd91b27d

58a29e5cae2309f04b28

/realtime/pusher/auth/