in reply to Symmetrical Numbers (GOLF)


This was an attempt to save space by using only one reverse(). 61 chars:
sub sym_num { +{map{(($x=$_.$_*$_.$_)&&$x==reverse$x)?($_,$_*$_):()}1..pop} }

John.
--

Replies are listed 'Best First'.
Re: Re: Symetrical Numbers (GOLF)
by MeowChow (Vicar) on Jul 12, 2001 at 01:32 UTC
    Nice! This technique is a winner at 53 chars:
    +{map$x-reverse($x=$_.$_*$_.$_)?():($_,$_*$_),1..pop}
       MeowChow                                   
                   s aamecha.s a..a\u$&owag.print