#P1548. [NOIP 1997 普及组] 棋盘问题
[NOIP 1997 普及组] 棋盘问题
Description
Given a chessboard with an grid , find how many squares and how many rectangles (excluding squares) it contains.
For example, when :

The number of squares is : there are squares of side length and squares of side length .
The number of rectangles is :
Specifically:
- There are rectangles of size :

- There are rectangles of size :

- There are rectangles of size :

- There is rectangle of size :

Input Format
One line with two integers .
Output Format
One line with two integers, the number of squares and the number of rectangles.
2 3
8 10
Hint
Translated by ChatGPT 5
京公网安备 11011102002149号