Find total number of Rectangles (excluding squares) in a N*N cheesboard.
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.
Each seperate line showing the maximum number of rectangles possible.
1 ≤ T ≤ 1000
1 ≤ N ≤ 10000
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.
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.