1. Consider a $2 \times 3$ grid where each entry is one of 0,1 , and 2 . For how many such grids is the sum of the numbers in every row and in every column a multiple of 3 ? One valid grid is shown below.
$$
\left[\begin{array}{lll}
1 & 2 & 0 \\
2 & 1 & 0
\end{array}\right]
$$
Answer:
9
Any two elements in the same row fix the rest of the grid, so $3^{2}=9$.