All submissions for this problem are available.
Sugam is very interested in participating in IIIT Delhi’s annual Tech Fest Esya. He wants to pair with his friend for Esya’s Techathalon events. But his friend is very choosy. He asks Sugam to solve a problem if he wants to team up with him.
Can you help Sugam in solving the problem?
Problem : Find the sum of all the prime numbers between K and N(K and N are inclusive), where K is the total number of events being held in Esya’14 and N is taken as input from the user.
Refer esya website if required. Or you can also decode the value of K from the sample input/output.
The first line of the input contains an integer T denoting the number of test cases.
Each test case contains an integer N
A single integer value which is the sum of primes.
- 1 ≤ T ≤ 100
- k ≤ N ≤ 1000
|Time Limit:||1 sec|
|Source Limit:||50000 Bytes|
|Languages:||C, CPP14, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, NODEJS, HASK, SCALA, D, PERL, FORT, WSPC, ADA, CAML, ICK, BF, ASM, CLPS, PRLG, ICON, SCM qobi, PIKE, ST, NICE, LUA, BASH, NEM, LISP sbcl, LISP clisp, SCM guile, JS, ERL, TCL, PERL6, TEXT, PYP3, CLOJ, FS|
Fetching successful submissions
If you are still having problems, see a sample solution here.