class Solution(object):
def constructRectangle(self, area):
"""
:type area: int
:rtype: List[int]
"""
w = int(math.sqrt(area))
while area % w != 0:
w -= 1
return area//w, w

@Shield_David Thank you for sharing your solution.
I have a question: how do you know that
while(ab!=area){
if(ab>area) a--;
if(a*b<area) b++;
}
will make axb converge to the area?