Question 30
Optional bonus question: the source awards 20 points for a correct answer, deducts 7 for an incorrect answer, and awards 0 for a blank. The import preserves positive marks but not this penalty.
If the answer is not an integer, give the nearest integer. If the calculated answer has more than five digits, give its last five digits.
The shown $6\times6$ grid contains 1 to 36 in row order. A rectangle whose sides follow grid lines is called good when the sum of its entries is divisible by 3. For example, the horizontal rectangle containing 1, 2 and the vertical rectangle containing 3, 9, 15 are good. How many good rectangles are there?



If the answer is not an integer, give the nearest integer. If the calculated answer has more than five digits, give its last five digits.
The shown $6\times6$ grid contains 1 to 36 in row order. A rectangle whose sides follow grid lines is called good when the sum of its entries is divisible by 3. For example, the horizontal rectangle containing 1, 2 and the vertical rectangle containing 3, 9, 15 are good. How many good rectangles are there?


