x/masx200_leetcode_test/construct-the-rectangle/index.ts
12345678export default function constructRectangle(area: number): number[] { let w = Math.floor(Math.sqrt(area)); while (area % w !== 0) { --w; } return [Math.floor(area / w), w];}