We are given 7 squares of side lengths 1, 2, 2, 2, 3, 4, 5. They can be fitted to form a rectangle, with no overlap or gaps in-between. What is the perimeter of the rectangle?

32

To find the perimeter of the rectangle formed by the given squares, we need to identify the lengths of the sides of the rectangle.

To do so, let's arrange the squares in a way that they form a rectangle without any overlap or gaps.

The largest square is 5x5. We can place it at the bottom of the rectangle.

Next, we can place the square with side length 4 horizontally on top of the 5x5 square, forming a 5x9 shape.

Then, we can place the 3x3 on top of the 4x5 shape, forming a 5x12 shape.

Now, we have a 5x12 rectangle. We need to fit the remaining squares with side lengths 2, 2, 2, and 1 into the remaining space.

We can place the three 2x2 squares horizontally on top of the rectangle, forming a 7x12 shape.

Lastly, we can place the 1x1 square on the remaining space, beside the 2x2 squares, forming a 7x13 rectangle.

Therefore, the rectangle formed by the given squares has sides measuring 7 and 13.

To calculate the perimeter, we add up the lengths of all four sides of the rectangle:

Perimeter = 2 * (length + width)
= 2 * (7 + 13)
= 2 * 20
= 40

So, the perimeter of the rectangle formed by the given squares is 40 units.