## On the Subject of Magic Cube

Like a magic square, only in 3D

Normally this module would generate a magic cube, but something went wrong and it got shuffled.

### What to do

To solve this module, the magic cube needs to be fixed.

In order to do this, press any of the * arrow* buttons to

*that row or column in that*

**shift***.*

**direction**The * top left screen* shows the currently selected

*of the magic cube.*

**3×3 layer**Press the * button to the right* of that screen to

*.*

**switch between layers**### What is a magic cube

A magic cube is a * n×n×n cube* with numbers in each cell ranging from

*in such a way that the*

**1 to n³ once each***on*

**sums of the numbers***and on*

**each row, each column, each pillar***are equal to the*

**each of the four main space diagonals***.*

**magic constant**The * magic constant* is calculated with the following formula:

*.*

**M = (n(n³+1))/2**Each number may be modified by the same offset * x*. In this case, the magic constant is

*.*

**M = M+3x**