9. Alex colours all the small squares that lie on the two longest diagonals of a square grid. She colours 2017 small squares. What is the size of the square grid?
A $1009 \times 1009$
B $1008 \times 1008$
C $2017 \times 2017$
D $2016 \times 2016$
E $2015 \times 2015$
9. A The two longest diagonals of an $n \times n$ square grid each contain $n$ squares. When $n$ is an odd number, the two diagonals meet at the square in the centre of the grid and hence there are $2 n-1$ squares in total on the diagonals. Alex coloured 2017 squares and hence $2 n-1=2017$, which has solution $n=1009$. Therefore the size of the square grid is $1009 \times 1009$.