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