Rectangles in N*N Board
Submissions: 13428   Accuracy:

40.01%

  Difficulty: Easy   Marks: 2

Find total number of Rectangles (excluding squares) in a N*N cheesboard.

Input:

The first line contains an integer T, depicting total number of test cases. 
Then following T lines contains an integer N that is the side of the chessboard.


Output:

Each seperate line showing the maximum number of rectangles possible.


Constraints:

1 ≤ T ≤ 1000
1 ≤ N ≤ 10000

 

Example:

Input :

2
1
2

Output :

0
4

 

Explanation :

For n=1 there is only one square possible and no rectangles so answer will be 0. 

For n=2 there will be 2 rectangles of dimension 1*2 and 2 rectangles of dimension 2*1. So answer if 4. 

 

** For More Input/Output Examples Use 'Expected Output' option **

Author: abhiraj26


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



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


to report an issue on this page.