Vertical and horizontal nine grid, 1 ~ 9, nine numbers filled in the grid, so that the horizontal, vertical, oblique addition is equal to 15, can not be repeated, I want to answer in detail! I only need the detailed answer, how to solve it ~ don't just give me the answer, I will search for the answer myself!

Vertical and horizontal nine grid, 1 ~ 9, nine numbers filled in the grid, so that the horizontal, vertical, oblique addition is equal to 15, can not be repeated, I want to answer in detail! I only need the detailed answer, how to solve it ~ don't just give me the answer, I will search for the answer myself!

Isn't this the nine palace map? Huang Rong has figured it out
Algorithm analysis:
Why and must it be 15?
Let the sum of the first row be x; the sum of the second row be x; and the sum of the third row be X
3X=1+2+3+..+9=45
You are adding up all the nine numbers
Then determine that the most central number is 5
Let s = add the second row horizontally (center row) + add the second column vertically (center column) + add twice obliquely (x)
You find that the center number is added four times, and the others are added once
S = 4x = 4 * 15 = 60 = 1 + 2 + 3 +.. + 9 + center number * 3
Number of centers = 5
The four corners can't be odd. Otherwise, adding them obliquely will cause problems
Because: if the upper left is odd, odd + 5 + lower right = 15, the lower right must be odd
At this point:
If the upper right is odd, the lower left must be odd, and eventually all are odd,
If the upper right is even, the lower left must be even, and all the remaining spaces are even. There are six even numbers, but only 2468 is not enough
So the four corners can't be odd
Then the four corners into 2468, their own together