Note that the number at the end of the $n$th row is $n^2$, so 400
will lie at the end of the 20th row. The row below will end in
21$^2$, i.e., 441, so the number directly below 400 will be 440.
This problem is taken from the UKMT Mathematical Challenges.