In the following magic square, every integer from 1 to 25 can be placed in the small squares so that the sums of all rows, columns, and diagonals are the same. Given that the number in the center of the square is 18, what is the value of the sum of the numbers written in the shaded squares?

![](https://cdn.mathpix.com/cropped/2024_05_01_a50b5476db779c3986d5g-12.jpg?height=429&width=428&top_left_y=2030&top_left_x=693)

#
Solution

Since the sum of all numbers in the magic square is $1+2+\ldots+25=325$, the sum of the numbers in each row, column, or diagonal is $325 / 5=65$. By adding all the numbers from the two diagonals, the middle row, and the middle column, we are summing all the numbers that are not shaded, thus obtaining $4 \cdot 65=260$. However, the central square has been added four times, and we can conclude that the sum of all the numbers not shaded is $260-3 \cdot 18=206$. Therefore, the sum of the numbers in the shaded squares is $325-206=119$.