题目

Into each row of a 9×9 grid, Nigel writes the digits 1~9 inorder, starting at one of the digits and returning to 1 after 9:for example, one row might contain 7,8,9,1,2,3,4,5,6. The grid is gorgeous if each nine-digit number read along a row or column or along the diagonal from the top-left corner to the bottom-right corner or the diagonal from the bottom-left corner to the top-right corner is divisible by 9. How many of the possible grids are gorgeous? Nigel 在 9×9 网格的每一行中按照这样的顺序写下数字1、2、3、4、5、6、7、8、9: 从其中某一个数字开始写到数字9,然后返回数字1继续写。例如,某一行的数字可能为7、8、9、1、2、3、4、5、6。如果网格中每一行、每一列、每一条从左上角到右下角或从左下角到右上角的对角线中的9位数都可以被9整除,那么这个网格就达到最佳状态。请问在 个可能的网格中,有多少个网格能达到最佳状态? ——关联:、、、

解答

基础分析

  1. 每一行,始终可以被9整除
  2. 只要第一列能被9整除,则所有列都被9整除 将从9变到1,视为:9+1-9 故,任意列与第1列的差,均为9的倍数
  3. 对角线与第一列的差,也是9的倍数 对角线和=第1列和+0+1+2+…+8=第1列和+36
  4. 综上,只需第1列满足条件(9的倍数)即可

整除分析

  1. 所有情况有 种
  2. 如果只考虑前8行,不考虑最后一行,有 种情况
  3. 最后一行,首数字有 1~9,供9种情况 这9种情况 和 种情况交叉组合,得到所有情况
  4. 取 中任一情况,与 1~9 组成 9中情况 这9中情况的数字和,是 连续的9个自然数 9个连续的自然数中,有且只有一个是9的倍数
  5. 故:满足条件的个数是

附注

👍☆☆☆☆💯🏅🙇✶✷✸✹✺ 创建时间: 2026-03-09 14:58