in reply to Re: "Countdown" (golf)
in thread "Countdown" (golf)
@_=sort@_;$"='?';push@{$,[length]},$_ for grep{(join'',sort split//)=~ +m!^$/@_?$!}<D>;@{pop@,}
Update: 92 characters.
@_=sort@_;$"='?';push@{$,[length]},$_ for grep{(join'',sort split//)=~ +m!$/@_?$!}<D>;@{pop@,}
Update2: 89 characters.
@_=sort@_;$"='?';push@{$,[length]},$_ for grep{(join'',sort/./sg)=~m!$ +/@_?$!}<D>;@{pop@,}
Update2: 88 characters.
perl -l @_=sort@_;$"='?';push@{$,[length]},$_ for grep{(join'',sort/./sg)=~/$\ +@_?$/}<D>;@{pop@,}
------
We are the carpenters and bricklayers of the Information Age.
Don't go borrowing trouble. For programmers, this means Worry only about what you need to implement.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: "Countdown" (golf)
by blakem (Monsignor) on Dec 01, 2001 at 07:47 UTC | |
|
Re: Re: Re: "Countdown" (golf)
by stuffy (Monk) on Dec 01, 2001 at 08:17 UTC | |
by blakem (Monsignor) on Dec 01, 2001 at 08:38 UTC |