Current location - Training Enrollment Network - Mathematics courses - Math expert, please come in! Urgent! Urgent! ! Urgent! ! !
Math expert, please come in! Urgent! Urgent! ! Urgent! ! !
46 1 1 35 07 13 14 49

19 40 24 42 29 05 16

09 23 06 38 20 47 32

48 17 22 25 28 33 02

18 03 30 12 44 27 4 1

34 45 2 1 08 26 10 3 1

0 1 36 37 43 15 39 04

Satisfy:

Center number 25, upper left corner 46, upper right corner 49, lower left corner 1, lower right corner 4.

There are many answers.

In fact, you can make (the number in row I and column J)+(row (8-i) and column (8-j)) = 50.

So as long as you add 24 spaces in the upper left corner, you can determine the one in the lower right corner.

Write a program that can randomly generate magic squares to meet the problem.

List a few more answers.

46 27 08 32 02 1 1 49

45 34 12 35 03 13 33

22 09 07 44 26 3 1 36

30 10 29 25 2 1 40 20

14 19 24 06 43 4 1 28

17 37 47 15 38 16 05

0 1 39 48 18 42 23 04

46 17 1 1 2 1 26 05 49

32 43 35 10 37 16 02

28 06 3 1 36 09 23 42

12 03 20 25 30 47 38

08 27 4 1 14 19 44 22

48 34 13 40 15 07 18

0 1 45 24 29 39 33 04

46 3 1 1 1 16 20 02 49

17 45 37 2 1 09 22 24

07 14 18 42 35 47 12

40 06 23 25 27 44 10

38 03 15 08 32 36 43

26 28 4 1 29 13 05 33

0 1 48 30 34 39 19 04

46 05 22 09 17 27 49

1 1 18 44 03 43 35 2 1

14 48 20 19 38 26 10

34 42 37 25 13 08 16

40 24 12 3 1 30 02 36

29 15 07 47 06 32 39

0 1 23 33 4 1 28 45 04

If the four corners of the magic square are required to be specified numbers, in fact, many magic squares can be constructed to meet the problem.