BETA
This is a school problem. Successful submissions of this are not counted in user ratings.

Submissions : 5183 Accuracy :

9.45

Sum of all prime numbers between 1 and N.
     

Given a positive integer N, calculate the sum of all prime numbers between 1 and N.

Input:
The first line of input contains an integer T denoting the number of test cases.
The first line of each test case is N.

Output:
Print the sum of all prime numbers between 1 and N.

Constraints:
1 ≤ T ≤ 50
1 ≤ N ≤ 1000000

Example:
Input:
2
5
10

Output:
10
17

**For More Examples Use Expected Output**


Set Default Code

					   
Result:
It is recommended to test your code before clicking 'Submit' button!



                   



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.