DWITE Online Computer Programming Contest

Sum of Primes

May 2010
Problem 2

Let’s keep this simple.

The input file DATA2.txt will contain 5 lines, integers 2 ≤ N ≤ 100,000.

The output file OUT2.txt will contain 5 lines, the integer sums of all prime numbers up to N (inclusive).

Sample Input:
2
3
4
5
100000
Sample Output:
2
5
5
10
454396537