226. Cubes and Squares. Here is an interesting, though not easy puzzle, the author of which could not be identified.

Three children had identical boxes of cubes. The first girl made a square frame from all her cubes, marked with the letter $A$ on the diagram. The second girl made a larger square $-B$. The third girl made an even larger square $-C$, but had 4 cubes left, which she placed at the corners, as shown in the diagram. Each girl used all her cubes.

What is the smallest number of cubes that could have been in each box? Do not assume that the true proportions between the sizes of the squares are maintained in the diagram.

![](https://cdn.mathpix.com/cropped/2024_05_21_56f37ca27ac3d928838dg-064.jpg?height=471&width=472&top_left_y=330&top_left_x=792)
226. The smallest number of cubes in the box is 1344. By building a frame around an empty square \(34 \times 34\), the first girl formed a square \(50 \times 50\), the second - a square \(62 \times 62\) and the third - a square \(72 \times 72\) with four extra cubes in the corners.