A cube-shaped cake is completely covered with chocolate, including the bottom. We want to share the cake among $K$ people so that everyone gets the same amount of dough and the same amount of chocolate coating. We want to achieve this by dividing the cake into $N \times N \times N$ identical small cubes, and giving each person the same number of pieces, ensuring that the total area of the chocolate-coated sides of the pieces received by each person is the same. Is this possible for any $K$? What is the minimum number of pieces the cake must be divided into if $K=1997$?
The cake must be divided among $K$ people, with each person receiving $\frac{N^{3}}{K}$ small cubes and $\frac{6 N^{2}}{K}$ $1 \times 1$ chocolate strips. These fractions must be integers, so if $K$ is prime, then $K$ must be a divisor of $N$.

First, we show that the desired distribution is possible for every natural number $K \geq 2$. Assume for now that $K \geq 4$, and let $K=N$. Cut the cake with vertical planes into $L$ "vertical slices." The vertical slice on the left side of the diagram is drawn with a thick line. The two outer slices contain $4 K + K^{2}$ strips, while the others (inner slices) contain $4 K$ strips. Each "vertical slice" can be cut into $K$ vertical columns. These columns can be divided into three groups: corner columns, marked with $S$ on their top, edge-center columns, marked with $E$; and inner columns, marked with $B$. An $E$-marked column has $K$ more strips than a $B$-marked one, and an $S$-marked column has $K$ more strips than an $E$-marked one. Then, the cake is divided among the $K$ people such that each person gets one "vertical slice," and the two who get the outer slices exchange their $K-2$ $E$-marked columns for $B$-marked ones with those who received inner slices, ensuring that two columns are exchanged in each inner slice. The exchange is possible because with $K \geq 4$, there are $K-2$ inner slices, and each inner slice has at least two $B$-marked columns. After the exchanges, each person will have $6 K$ strips. Indeed, for the two outer slices, the number of strips decreases by $K(K-2)$, while for the inner slices, it increases by $2 K$.

If $K=2$, cutting the cake into 8 small cubes ensures that each person gets 4 identical pieces. The case $K=3$ is also easily solvable.

Since 1997 is prime, and as we established, $K$ must be a divisor of $N$, in the case $K=1997$, the cake must be cut into at least $1997^{3}$ pieces.

Tamás Birkner (Budapest, Deutsche Schule, 5th grade)

![](https://cdn.mathpix.com/cropped/2024_05_02_9f30a844912a27437061g-1.jpg?height=421&width=469&top_left_y=993&top_left_x=817)