We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- All Contests
- ProjectEuler+
- Project Euler #10: Summation of primes
Project Euler #10: Summation of primes
Project Euler #10: Summation of primes
This problem is a programming version of Problem 10 from projecteuler.net
The sum of the primes below is .
Find the sum of all the primes not greater than given .
Input Format
The first line contains an integer i.e. number of the test cases.
The next lines will contains an integer .
Constraints
Output Format
Print the value corresponding to each test case in separate line.
Sample Input 0
2
5
10
Sample Output 0
10
17
Explanation 0
- For , we have primes as and the sum is .
- For , we have primes as and the sum is .