OILS
/
benchmarks
/
javascript
/ squares.js
View on Github
|
oilshell.org
16 lines, 13 significant
1
#!/usr/bin/env node
2
3
var n = 1000
4
var x = 10000
5
6
function main() {
7
for (var i = 0; i < n; ++i) {
8
for (var j = i; j < n; ++j) {
9
if (i*i + j*j == x) {
10
console.log(i, j)
11
}
12
}
13
}
14
}
15
16
main()