Best one liner

Taketo Konno
Tokyo, Japan

Judges' comments:

To build:

make konno

To run:

./konno N
# where N is 0 to 255


./konno 30

Selected Judges Remarks:

This entry is a good one-liner to analyze completely.

For extra credit, what are the minimal changes to convert it to 64-bit integers so that it could print 32 lines?

Author’s comments:


This program outputs elementary cellular automaton patterns.


./konno 30
./konno 90
./konno 102
./konno 109
./konno 165

There are 256 (from 0 to 255) possible rules.


This program uses bit operations. I think


is an intersting operation. This isn’t equal to


operation. What is the operation doing?


This program assumes that the size of int is 4.

Creative Commons License

© Copyright 1984-2015, Leo Broukhis, Simon Cooper, Landon Curt Noll - All rights reserved
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.