xinyu04

导航

Mathproblem 58 Chessboard problem #2

How many subsquares can you form on chessboard with \(n*n\) unit squares? Subsquares must be an integer squared.

Solution

很明显的方法就是枚举正方形的边长,然后统计该边长的正方形的个数。所以显然易见:

\[\sum_{i=1}^{n}i^2=\frac{n\cdot(n+1)\cdot(2n+1)}{6} \]

posted on 2022-08-29 16:43  Blackzxy  阅读(12)  评论(0编辑  收藏  举报