用开方的思想来解题. bool judgeSquareSum(int c) { int h = pow(c, 0.5); ; i <= h; i++) { ), 0.5); if (left - int(left) == 0.0) { return true; } } return false; } 补充一个phthon的实现,使用双指针思想: class Solution: def judgeSquareSum(self, c: int) -> bool: i=0 j=int(c ** 0.…