Solved LeetCode program · 364 of 1,000
#0492 · Construct the Rectangle
Original English source
The area is 4. The best is 1.
For every width from 1 to area.
If area modulo width is 0.
The height is area divided by width. If width is at most height and width is more than best, set best to width.
The other is area divided by best. Show best. Show other.
Expected stdout
2 2