4. Pete was given a new electric jigsaw for his birthday, with a function to count the length of the cuts made. To try out the gift, Pete took a square piece of plywood with a side of $50 \mathrm{cm}$ and cut it into squares with sides of 10 cm and squares with sides of 20 cm. How many squares in total were obtained, if the electric jigsaw shows a total length of cuts of 2 m $80 \mathrm{cm}$?
Answer: 16. Solution. Each protruding edge is part of the perimeter of two figures, in addition, the perimeter of the original square must be taken into account, from which we get that the total perimeter of the resulting small squares is $280 \cdot 2+200=760$. Now we can denote the number of squares through $x$ and $y$ respectively and solve the system $\left\{\begin{array}{c}10^{2}-x+20^{2}-y=50^{2}, \\ 4-10-x+4 \cdot 20-y=760,\end{array}\right.$, or follow the following reasoning. If all the squares had a side of 10, there would be $6 \mathbf{~} 25$ pieces, then the total perimeter would be $25 \cdot 40=1000$. If we replace four small squares $10 \times 10$ with a square $20 \times 20$, the perimeter will increase by $160-80=80 \mathrm{cm}$. To get 760 from 1000, this needs to be done 3 times. This means there will be 3 squares 20x20 and 13 squares 10x10 - a total of 16 squares.