leetcode_492
Solutions
class Solution {
public:
vector<int> constructRectangle(int area) {
int w = sqrt(area);
while (area % w != 0) --w;
return {area / w, w};
}
};Last updated
class Solution {
public:
vector<int> constructRectangle(int area) {
int w = sqrt(area);
while (area % w != 0) --w;
return {area / w, w};
}
};Last updated