Method 1:
AlgorithmAnalysis:
Why is it the same as "15?
Set the sum of the first row to X; The sum of the second row to X; and the sum of the third row to X.
3x = 1 + 2 + 3 +... + 9 = 45 you added all the nine numbers.
We can see that the number at the center is 5 after X = 15.
Set S = to add the second row (center row) + add the second column (center column) + oblique add twice (X ).
You found that the number of centers is added four times, and the other is added once. (Three more centers are added)
S = 4x = 4*15 = 60 = 1 + 2 + 3 +... + 9 + number of centers * 3
Number of centers = 5
The Four Corners cannot be odd. Otherwise, a problem may occur when adding oblique values.
Because: if the upper left is an odd number, odd + 5 + right bottom number = 15 right bottom must be an odd number
In this case, if the upper right corner is an odd number, the lower left must be an odd number, and eventually all are an odd number,
If the upper right corner is an even number, the lower left must be an even number, and the remaining spaces are all even numbers.
There are 6 even numbers, but the even number is only 2, 4, 6, and 8.
Therefore, the four corners cannot be odd. Then, place the four corners into and.
Method 2:
Solve the above Indefinite Equation
Set
ABC
Def
Ghi
Then
A + B + C = 15
D + E + F = 15
G + H + I = 15
A + D + G = 15
B + E + F = 15
C + F + I = 15
A + E + I = 15
C + E + G = 15
The above indefinite equation can be calculated.
In fact, this is the oldest type of data ide called a river map. The legend is the pattern of a turtle from the river. You can learn the traditional Chinese culture.
The general solution of DT independence is experiment and experience.
The method to remember this question isEven the odd side sitting at the heart 5. First-line dual-angle relative painting.