LeetCode 633. Sum of Square Numbers Posted on 2021-04-28 Edited on 2024-11-24 In LeetCode 1234567891011class Solution {public: bool judgeSquareSum(int c) { for (long a = 0; a * a <= c; a++) { double b = sqrt(c - a * a); if (b == (int) b) return true; } return false; }};