in reply to Re: Symetrical Numbers (GOLF)
in thread Symmetrical Numbers (GOLF)
BTW, I note that the description says to start with 0, but the example output starts with 1... I decided to start with 0. 0*0 = 0, and both 0 and 0 are symmetrical, so 0 should be in the output. :)sub symmetrical_squares { +{map reverse^$_|reverse($x=$_**2)^$x?():($_,$x),0..pop} }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Symetrical Numbers (GOLF)
by MeowChow (Vicar) on Jul 12, 2001 at 00:15 UTC |