All submissions for this problem are available.
The Chef watched the movie TRANSFORMERS and admired the character of Optimus Prime.
He got so influenced by him that he started calculating prime numbers.
As always he added his spices to it and started adding them. Again as always he got tired and asked you to do that for him (LAZY FELLA).
//Boring part ends here
You would be provided with the upper bound of the range up to which you have to generate prime numbers and add them.
You have to generate primes from 0 to upper bound and add them.
N:The no. of test cases that follow
U: the upper bounds upto which the primes are to be added. U<1000000
The primes to be generated are < U and not <=U.
The sum of primes up to each U.
Input: 1 50 Output: 328 Explanation: 328=2+3+5+7+11+13+17+19+23+29+31+37+41+43+47
|Time Limit:||0.1 sec|
|Source Limit:||5000 Bytes|
|Languages:||C, JAVA, PYTH, PYTH 3.6, CS2, PAS fpc, PAS gpc, RUBY, PHP, GO, 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, CLOJ, FS|
Fetching successful submissions