5
The program must print the following block of text of LED numbers exactly.
+-----------------------------------------------------------------+
| |
| 000 1 222 333 4 4 555 666 777 888 999 AAA B CCC D EEE FFF |
| 0 0 1 2 3 4 4 5 6 7 8 8 9 9 A A B C D E F |
| 0 0 1 222 333 444 555 666 7 888 999 AAA BBB C DDD EEE FFF |
| 0 0 1 2 3 4 5 6 6 7 8 8 9 A A B B C D D E F |
| 000 1 222 333 4 555 666 7 888 999 A A BBB CCC DDD EEE F |
| |
+-----------------------------------------------------------------+
Notice the 1-char padding inside the borders. The trailing newlines, and the types of the newlines are not significant. However, the whitespaces are the spaces you get when you press spacebars (ASCII 32).
Shortest code wins. Using data encoding (base64, gzip), or compressing with other Unicode characters is discouraged. You cannot use programs like cat
or gzip
since they are not programming languages.
The character count must be less than 600 to qualify.
There is
– YOU – 2011-05-24T01:31:45.033m4
which is turing complete language, so this is still possible, and one char less thancat
3
I always object to problems that have the form "solve this instance of a problem" rather than "write a program to solve any problem in this class". And if we make it general it becomes very similar to Code Golf - Banner Generation.
– dmckee --- ex-moderator kitten – 2011-05-24T01:34:11.147Didn't notice it is taken on Stack Overflow – Ming-Tang – 2011-05-24T01:42:35.637
5What do you mean by data encoding is discouraged? We can't use an array of encodings, say of a bit mapping of the characters to print from? – mellamokb – 2011-05-24T03:17:35.830
1This would have been far more interesting of a challenge if it had taken a number (hex? decimal?) on input and output it in that banner format. – MtnViewMark – 2011-05-28T23:21:40.537
I think [tag:kolmogorov-complexity] problems should be allowed to take auxiliary data for input, with the input length (in bytes) counted against the score. This could reduce overhead in languages that don't handle string literals well, and make it so the program can focus on the data complexity itself. – Joey Adams – 2011-05-29T02:16:20.707
Please answer mellamokb's question, because I want to ask the exact same thing. A bitmap is the most obvious approach.. is that why you discourage it? – Igby Largeman – 2011-05-29T06:06:13.313
because I don't want everyone to post solutions with full of Chinese characters like this. http://codegolf.stackexchange.com/questions/1682/an-old-irish-blessing/1692#1692 I mean, "data encoding" is defined as "creating a hard-coded data, and decoding the data. However, generating the data instead of hard-coding is not 'data encoding' I am talking about".
– Ming-Tang – 2011-05-29T19:04:05.3271The obvious solution is to count length in bytes after encoding with UTF-8 rather than counting characters. – Peter Taylor – 2011-05-31T19:11:27.553
@Peter I think perhaps the byte/char count isn't what SHiNKiROU turned off by. maybe he just finds Asian characters annoying. Anyway, not allowing encoding to unicode is probably a good idea as it encourages us to find new solutions. – Igby Largeman – 2011-06-01T01:17:52.003