For the number n divisible by 4, we can construct magic square as follows:
1. From left to right, from the first line to the nth line, in the order of 1, 2 And n ^ 2 fills this matrix.
2. Divide the above matrix into m ^ 2 small 4×4 matrices. For the number a on the two diagonals of each 4×4 small matrix, replace a with the complement of a, the square of N + 1-A.
That is: A & lt; – n ^ 2 + A-1
Read More:
- Python’s direct method for solving linear equations (5) — square root method for solving linear equations
- Internalerror: blas GEMM launch failed: A. shape = (100, 784), B. shape = (784, 10), M = 100, n = 10… Problem solving
- Python — magic identify file types
- Lingerror last 2 dimensions of the array must be square
- Remove M Characters “Control M” or “^M” or “CTRL M” Characters in a UNIX file
- Constructing docker image of multi arch
- R load(xxx.Rdata) Error bad restore file magic number (file may be corrupted) — no data loaded
- Python judge perfect square number
- Square root of X (implementation of binary search)
- Video prediction beyond mean square error
- In machine learning, the prediction errors in sklearn, such as mean square error, etc
- Higher order components in react
- Initialization order of Java objects
- Inheritance relationship causes class loading order
- Mybatis property loading order [How to Solve]
- The influence of the loading order of props, data and computed in Vue
- Binary tree traversal (preorder, middle order, postorder, hierarchy traversal, depth first, breadth first)
- SAP Migo 101 receives the work order and reports an error – check table tfbefu_ CR entry 10 does not exist – Countermeasures
- VBA returns “n / a” and other error information
- SAP mm receives the purchase order and reports an error – table t169p entry znmi does not exist-