题目描述
Find total number of Rectangles (excluding squares) in a NN chessboard.7
Example 1:
Input:
N = 1
Output:
0
Explanation:
There is only 1 square on a 11 chess
board. There are no Proper Rectangles.
Example 2:
Input:
N = 2
Output:
4
Explanation:
There are 4 rectangles in a 2*2 chessboard.
Your Task:
You don't need to read input or print anything. Your task is to complete the function rectanglesInChessBoard() which takes an Integer N as input and returns the number of rectangles in a N*N chess board.
Expected Time Complexity: O(1)
Expected Auxiliary Space: O(1)
Constraints:
1 <= N <= 10^{4}
输入格式
见题面
输出格式
见题面
样例输入
N = 1
样例输出
0