题目描述
Problem Description:
A pyramid has been constructed using bricks. All these bricks are made of gold. However the quality of gold varies from brick to brick. The value of the bricks has been marked equivalent to nCr. Where n is the nth row of the pyramid from the top, and r is the number of the brick in that row (Both n and r start from 0). One day an invader comes and takes away all the outermost bricks of the pyramid. This disrupts the outermost shield and now some weird things happen.
1. All the rows in which the outermost golden bricks(after the invasion) have value which is not a prime number, magically disappear.
2. The value of the outermost brick can neither be a prime number nor a composite number. So now, the value of the bricks in each row gets magically divided by the value of the outermost brick.
Find out the total amount magically lost.
Input:
The first line of the input contains an integer T denoting the number of test cases. The description of T test cases follows.
The first line of each test case contains a single integer N denoting the number of Bricks.
Output:
For each test case, print the net amount that gets magically lost.
Constraints:
30 Points :
1 ≤ T ≤ 30
1 ≤ N ≤ 125
70 Points :
1 ≤ T ≤ 50
1 ≤ N ≤ 500
Example:
Sample Input:
2
10
21
Sample Output:
5
43
输入格式
见题面
输出格式
见题面