1
var judgeSquareSum = function (c) {
2
if (c === 0) {
3
return true;
4
}
5
for (let a = 0; a * a < c; a++) {
6
let b = Math.sqrt(parseFloat(c - a * a));
7
if (b - Math.round(b) === 0) {
8
return true;
9
}
10
}
11
return false;
12
};

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0