The Min Perimeter Rectangle challenge brings us back to a lot of math. I had a gut feeling on this one and I only checked with a few examples but the minimum perimeter of a rectangle for a given area happens when the rectangle is in fact a square.
For those of you who want a to be 100% sure of this, here is a proper demonstration.
So all we need to do in this case is to find the closest integer number to the square root which is a dividing factor for the given area.
And that’s it.
Here you can see how it works and the full description of the problem.