python coding contest

Shane Hathaway shane at hathawaymix.org
Fri Dec 30 00:32:33 EST 2005


Andrew Durdin wrote:
> On 12/28/05, Shane Hathaway <shane at hathawaymix.org> wrote:
> 
>>I just found a 125 character solution.  It's actually faster and more
>>readable than the 133 character solution (though it's still obscure.)
> 
> 
> Having spent a good deal of time and effort, and not getting below 144
> characters, I am now very eager to see how these shorter versions
> work, particularly the 6  120-character solutions. I also expect that
> someone (I'll certainly give it a try) will produce a yet shorter
> version after the contest closes, based on the knowledge from the
> winning solutions.

Roberto Alsina fully documented his 120 byte solution here:

http://www.pycs.net/lateral/weblog/2005/12/29.html#P333

My 120 byte solution is equivalent.  Many others probably did the same 
thing.  Python's philosophy of one way to do it seems to be leading us 
all down the same road.

However, it still feels like there's room for improvement.  I have a 123 
byte solution based on a fairly repetitive 21 character string; if I 
could compress the representation of the string, it could win.

Shane



More information about the Python-list mailing list