*

: i x 10 * floor ;
: j y 10 * floor ;
: has_bit swap 2 swap ** dup -rot 2 * mod swap >= ;

i j - 2 + 21 has_bit
i j + 7 - 21 has_bit
2 * + dup 1 >= swap 2 =

Based on: GalaxiesColliding - Christer Nilsson


comments powered by Disqus