# 5. Option 1.

The chocolate bar has the shape of a square with a side of 100 cm, divided into pieces with a side of 1 cm. The sweet tooth ate all the pieces along each of the four sides, as shown in the figure. How many pieces did the sweet tooth eat in total?

![](https://cdn.mathpix.com/cropped/2024_05_06_7eebe7f078c503a48a3eg-4.jpg?height=279&width=287&top_left_y=419&top_left_x=911)
Answer: 784.

Solution (1st method). The chocolate bar consists of $100 \times 100=10000$ pieces in total. If 2 rows of pieces are removed from each side, a square with a side length of 96 cm remains. Thus, the sweet tooth will eat $10000-96 \cdot 96=784$ pieces.

![](https://cdn.mathpix.com/cropped/2024_05_06_7eebe7f078c503a48a3eg-4.jpg?height=273&width=287&top_left_y=1002&top_left_x=911)

Solution (2nd method). First, let's count the pieces eaten along two opposite sides: $2 \cdot 100 \cdot 2=400$ pieces. Remove them. Notice that on the other two sides, there are 2 rows left to eat, each containing $100-4=96$ pieces. Thus, a total of $400+2 \cdot 96 \cdot 2=784$ pieces were eaten.

Solution (3rd method). Divide all the eaten pieces into 4 equal groups as shown in the figure:

![](https://cdn.mathpix.com/cropped/2024_05_06_7eebe7f078c503a48a3eg-4.jpg?height=279&width=282&top_left_y=1628&top_left_x=911)

Each of these groups forms a rectangle of $2 \times 98$. Therefore, a total of $2 \cdot 98 \cdot 4=784$ pieces were eaten.