Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.

Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).

public static boolean judgeSquareSum(int c) { for (int i=0;i<=Math.sqrt(c);i++) if (Math.floor(Math.sqrt(c-i*i)) == Math.sqrt(c-i*i)) return true; return false; }

Very awesome!

Thanks for sharing!, BTW, Does it need to add?

if(c == 0) return true;

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.