1var countTriples = function (n) {2 let count = 0;3 for (let i = 1; i < n; i++) {4 for (let j = 1; j < n; j++) {5 let root = Math.sqrt(j * j + i * i);6 if (Number.isInteger(root) && root <= n) {7 count++;8 }9 }10 }1112 return count;13};
WPM •0 •0
ACC •0 •0
TIME •0