Fill in nine grids from 1 to 9, so that the three numbers of the vertical and horizontal slopes are equal.

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.