Re: python coding contest

Discussion in 'Python' started by Tim Peters, Dec 26, 2005.

  1. Tim Peters

    Tim Peters Guest

    Over at

    http://spoj.sphere.pl/problems/SIZECON/

    the task is to come up with the shortest program that solves a
    different problem. There's a twist in this one:

    Score equals to size of source code of your program except symbols with
    ASCII code <= 32.

    So blanks, newlines and tabs aren't counted at all. However, no
    "control characters" of any kind are counted, and I found a convoluted
    way to transform any Perl program so that only 7 "readable" characters
    remain. That's currently the shortest solution known (given the
    stated metric -- my Perl source is actually over 400 bytes! all but 7
    of them have ord < 33, though).

    There's probably still room for improvement in the "shortest" Python
    program known for this task. No deadlines, no prizes, and you don't
    get to see anyone else's code, but as a form of programming
    masturbation it's great ;-)

    http://spoj.sphere.pl/problems/KAMIL/

    is another program-size task, but this one counts all bytes.
     
    Tim Peters, Dec 26, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Simon Hengel

    python coding contest

    Simon Hengel, Dec 25, 2005, in forum: Python
    Replies:
    23
    Views:
    713
    Claudio Grondi
    Jan 2, 2006
  2. Simon Hengel

    Re: python coding contest

    Simon Hengel, Dec 25, 2005, in forum: Python
    Replies:
    92
    Views:
    1,427
    Alex Martelli
    Jan 2, 2006
  3. Christian Tismer

    Re: python coding contest

    Christian Tismer, Dec 25, 2005, in forum: Python
    Replies:
    4
    Views:
    297
    Alex Martelli
    Dec 26, 2005
  4. Tim Hochberg

    Re: python coding contest

    Tim Hochberg, Dec 25, 2005, in forum: Python
    Replies:
    3
    Views:
    293
    Alex Martelli
    Dec 26, 2005
  5. Jean-Paul Calderone

    Re: python coding contest

    Jean-Paul Calderone, Dec 27, 2005, in forum: Python
    Replies:
    2
    Views:
    283
    Tim Hochberg
    Dec 28, 2005
Loading...

Share This Page