Solución de programación de cubo mágico
e =Ojo(5), A =Magia(5),
r1=E+A, r2=E-A, r3=E*A, r4=E./A,
A_2=A.^2
E =
1 0 0 0 0
0 1 0 0 0
0 0 1 0 0
0 0 0 1 0
0 0 0 0 1
A =
17 24 1 8 15
23 5 7 14 16
4 6 13 20 22
10 12 19 21 3
11 18 25 2 9
r1 =
18 24 1 8 15
23 6 7 14 16
4 6 14 20 22
10 12 19 22 3
11 18 25 2 10
r2 =
-16 -24 -1 -8 -15
-23 - 4 -7 -14 -16
-4 -6 -12 -20 -22
-10 -12 -19 -20 -3
-11 -18 -25 -2 -8
r3 =
17 24 1 8 15
23 5 7 14 16
4 6 13 20 22
10 12 19 21 3
11 18 25 2 9
r4 =
0.0588 0 0 0 0 p>
0 0.2000 0 0 0
0 0 0.0769 0 0
0 0 0 0.0476 0
0 0 0 0 0.1111
A_2 =
289 576 1 64 225
529 25 49 196 256
16 36 169 400 484
100 144 361 441 9
121 324 625 4 81
& gt& gt