The TransCompilator

Solved LeetCode program · 364 of 1,000

#0492 · Construct the Rectangle

Easy Math chunk-08.md

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.

Open in Playground Browse all 1,000 problems

Expected stdout

2
2