public class Solution {

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

}