Python | Leetcode Python题解之第492题构造矩形
题目:
题解:
class Solution:def constructRectangle(self, area: int) -> List[int]:w = int(sqrt(area))while area % w:w -= 1return [area // w, w]
题目:
题解:
class Solution:def constructRectangle(self, area: int) -> List[int]:w = int(sqrt(area))while area % w:w -= 1return [area // w, w]