Problem Statement:
Consider a convex polygon with N vertices, with the additional property that no three diagonals intersect in a single point. Find the number of intersections between pairs of diagonals in such a polygon.

The figure below shows one such polygon with 6 vertices.

Note: a polygon is convex if all of its interior angles are less than 180 degrees.

Input Format:
The first line contains T denoting the number of test cases. T blocks follow. For each test case, there is a line containing a single integer N, 3 ≤ N ≤ 100.

Output Format:
For each test case, output the number of intersections on a single line.

Sample Input:
3 3 4 6

Sample Output:
0 1 15

Added by: ahm.kam_92
Added at: 2014-09-17 18:29:24 UTC
Time Limit: 1 second
Partial score: No
Source:AAST Individuals Qualification 2014 #3