Re: [golf] Tangled Tale Results (2)
Georg Moritz <[email protected]>
| Newsgroups | gmane.comp.lang.perl.fun |
|---|---|
| Message-ID | <[email protected]> |
From the keyboard of Ton Hospel [02.07.04,10:57]:
> >> map{15>push@x,$x+1or print"1 @x
> >> "while!$x{$x=vec"·ÇðèÊê´í
Ãñvµ©",$x*2|$_>>@x&1,4}++*$x;undef*x}0..2**15
> >
> > hmm, the vector doesn't seem to be right - it doesn't work. It should be
> >
> > map{15>push@x,$x+1or print"1 @x
> > "while!$x{$x=vec"{|¬(®KÞX<g[",$x*2|$_>>@x&1,4}++*$x;undef*x}0..2**15
> Actually since I wanted to keep the order of the original, mine *IS* the
> right vector. Remember that vec works in a little endian way, so you have
> to swap the hex digits. But since the program will explore both digits
> anyways it doesn't actually matter (except for the order in which solutions
> can be output).
> >
> > but then, we have those nasty control chars in the string...
> >
> That is the more likely cause of failure.
oops. copy&paste. Had I counted the bytes in the string.. :-)
greets,
georg
--
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s,/,($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e,e && print}