How many non-attacking knights K(n) can be placed on an n x n chessboard.
Recall that a knight can attack another knight if their vertical distance on the chessboard is 2 and their horizontal distance is 1, or if their vertical distance is 1 and their horizontal distance is 2. Only one knight may be placed on each square of the chessboard.
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. Each test case consists of a single line containing an integer N.
Print number of places where non-attacking knights can be placed.
1 ≤ T ≤ 100
2 ≤ N ≤ 1000
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.