Question 30
Answer-format rule: round a non-integer answer to the nearest integer. If the calculated answer has more than five digits, give its last five digits.
The 6×6 grid shown contains 1–36 in row order. A rectangle formed by whole grid cells is called good if the sum of its entries is divisible by 3. The horizontal rectangle [1,2] and vertical rectangle [3,9,15] are examples. How many good rectangles are there?



The 6×6 grid shown contains 1–36 in row order. A rectangle formed by whole grid cells is called good if the sum of its entries is divisible by 3. The horizontal rectangle [1,2] and vertical rectangle [3,9,15] are examples. How many good rectangles are there?


