Equilibrium index: Difference between revisions

m
(→‎{{header|jq}}: use foreach; now also works with jaq)
Line 1,546:
def array(n;init): reduce range(0;n) as $i ([]; . + [0]);
 
count( array(1e410000;0) | equilibrium_indices )</syntaxhighlight>
{{out}}
$ jq -M -n -f equilibrium_indices.jq
2,442

edits