5. Petya cut an $8 \times 8$ square along the cell boundaries into parts of equal perimeter. It turned out that not all parts were equal. What is the maximum number of parts he could have obtained? 

#
# Answer: 21.

Solution: Let $S$ be the smallest area among the figures obtained by Petya.

If $S=1$, then this figure is a $1 \times 1$ square and its perimeter is 4. Then all of Petya's figures have a perimeter of 4, meaning they are all $1 \times 1$ squares. But this means that all figures are equal, which contradicts the condition.

Similarly, if $S=2$, then this figure is a $2 \times 1$ rectangle and its perimeter is 6. Then all of Petya's figures have a perimeter of 6, meaning they are all $2 \times 1$ rectangles. But this means that all figures are equal, which contradicts the condition.

If $S=3$, then the total number of figures is no more than $64 / 3$, meaning no more than 21. An example with 21 figures is easy to construct - from 10 $2 \times 3$ rectangles, each made of two L-shaped figures of three cells, and one $2 \times 2$ square. Both the L-shaped figure and the square have a perimeter of 8.

Finally, if $S \geq 4$, then the number of figures is no more than $64 / 4 = 16$.

Grading criteria: Correct answer with all necessary explanations 7 points.

If it is proven that there are no more than 21 figures, but no example of cutting is provided - 5 points.

If an example of cutting into 21 parts is provided, but it is not proven that more is impossible - 2 points.