资 源 简 介
设有n*m个方格的棋盘(1<=m,n<=100),求出该棋盘中包含多少个正方形、多少个长方形(不包括正方形)。
例如:当n=3,m=2 时
正方形的个数有8个;即边长为1的正方形有6个;边长为2的正方形有2个。
-with n* m box at the chessboard (1LT; = M, 4; = 100), obtained the chessboard includes the number of square, the number of rectangular (including square). For example : when n = 3, m = 2 square with the number 8; That is a side length of the square is 6; Side 2 is the square two.