1x~@;
This node by shmem gave me the idea, and may give you a hint as well.
Now for the challenge ... what's the shortest program which does the same thing? My guess is the obvious:
1x~0
with any digit in place of '0' working equally well, as does any digit except '0' exchanged for the '1'.
How about the smallest program that does the same thing slowly? The following takes about 11 seconds on my laptop:
sub _{_()}_
I have no idea if a shorter such program exists.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Guess what it does ... and a challenge
by blokhead (Monsignor) on May 24, 2008 at 19:36 UTC | |
by locked_user mtve (Deacon) on May 31, 2008 at 19:35 UTC | |
by tye (Sage) on May 31, 2008 at 20:23 UTC | |
by locked_user mtve (Deacon) on Jun 02, 2008 at 11:06 UTC | |
|
Re: Guess what it does ... and a challenge
by kyle (Abbot) on May 24, 2008 at 20:04 UTC | |
|
Re: Guess what it does ... and a challenge
by ambrus (Abbot) on May 25, 2008 at 11:40 UTC | |
|
Re: Guess what it does ... and a challenge
by shmem (Chancellor) on May 24, 2008 at 22:53 UTC | |
|
golf! (now this title is more than one word)
by locked_user mtve (Deacon) on May 31, 2008 at 18:59 UTC | |
|
Re: Guess what it does ... and a challenge
by ambrus (Abbot) on May 25, 2008 at 11:54 UTC |