Note that there are some explanatory texts on larger screens.

plurals
  1. POCode Golf - Banner Generation
    text
    copied!<p>When thanking someone, you don't want to just send them an e-mail saying "Thanks!", you want to have something FLASHY:</p> <pre><code>Input: THANKS!! Output: TTT H H AAA N N K K SSS !!! !!! T H H A A NNN K K S !!! !!! T HHH AAA NNN KK SSS !!! !!! T H H A A N N K K S T H H A A N N K K SSS !!! !!! </code></pre> <p>Write a program to generate a banner. You only have to generate upper-case A-Z along with spaces and exclamation points (what is a banner without an exclamation point?). All characters are made up of a 3x5 grid of the same character (so the S is a 3x5 grid made of S). All output should be on one row (so no newlines). Here are all the letters you need:</p> <pre><code>Input: ABCDEFGHIJKL Output: AAA BBB CCC DD EEE FFF GGG H H III JJJ K K L A A B B C D D E F G H H I J K K L AAA BBB C D D EE FF G G HHH I J KK L A A B B C D D E F G G H H I J J K K L A A BBB CCC DD EEE F GGG H H III JJJ K K LLL Input: MNOPQRSTUVWX Output: M M N N OOO PPP QQQ RR SSS TTT U U V V W W X X MMM NNN O O P P Q Q R R S T U U V V W W X M M NNN O O PPP Q Q RR SSS T U U V V WWW X M M N N O O P QQQ R R S T U U V V WWW X M M N N OOO P QQQ R R SSS T UUU V WWW X X Input: YZ! Output: Y Y ZZZ !!! Y Y Z !!! YYY Z !!! Y Z YYY ZZZ !!! </code></pre> <p>The winner is the <strong>shortest source code</strong>, as counted by the number of bytes it takes to store the file in <strong>utf-8 encoding</strong>. Source code should read input from stdin, output to stdout. You can assume input will only contain <code>[A-Z! ]</code>. If you insult the user on incorrect input, you get a 10 character discount =P.</p> <p>I was going to require these exact 28 characters, but to make it more interesting, you can choose how you want them to look - whatever makes your code shorter! To prove that your letters do look like normal letters, show the output of the last three runs.</p> <hr> <p>Shortest codes so far, in characters (utf8 encoding if non-ASCII present):</p> <h2>133 J</h2> <h2>205 Python</h2> <h2>209 Ruby</h2> <h2>313 Haskell</h2> <h2>345 C89</h2> <h2>382 F#</h2>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload