Problem 2. A square sheet of paper, composed of a whole number of unit squares (there are no parts of squares on the sheet), has been cut into a square consisting of a whole number of such unit squares. How many squares did the original sheet of paper contain if the number of remaining squares is 124?
Solution. Let the side of the sheet be $a$ units. Then there will be as many unit squares along the side of the sheet. This means there are a total of $a^{2}$ in number, since according to the condition of the problem, there are no parts of unit squares on the sheet. Let the cut-out square be as shown in the diagram and let its side be $b$, i.e., it contains $b^{2}$ unit squares. This means

![](https://cdn.mathpix.com/cropped/2024_06_05_dc4d34c0a9dd2a3ba572g-08.jpg?height=389&width=447&top_left_y=1149&top_left_x=1014)
that for the remaining 124 unit squares, the following holds

$$
a^{2}-b^{2}=124 \text { i.e. }(a-b)(a+b)=1 \cdot 2 \cdot 2 \cdot 31
$$

This means

$$
a-b=1, a+b=124 \text { or } a-b=2, a+b=62 \text { or } a-b=4, a+b=31 \text {. }
$$

Since the solutions of the first and third systems are not integers, it follows that the solution is $a=32, b=30$, i.e., the sheet of paper contains $32 \cdot 32=1024$ squares.