# 5 Favorite Letters

The challenge is actually extremely simple. Pick 5 distinct letters (you can just pick the 5 that allow you the shortest code if you like) and output them to the console. However, the twist is that they must be from the following list:

 AAA      BBBB       CCCC     DDDD      EEEEE     FFFFF      GGG      H   H
A   A     B   B     C         D   D     E         F         G         H   H
AAAAA     BBBB      C         D   D     EEEE      FFFF      G  GG     HHHHH
A   A     B   B     C         D   D     E         F         G   G     H   H
A   A     BBBB       CCCC     DDDD      EEEEE     F          GGG      H   H

IIIII         J     K   K     L         M   M     N   N      OOO
I           J     K  K      L         MM MM     NN  N     O   O
I           J     KKK       L         M M M     N N N     O   O
I       J   J     K  K      L         M   M     N  NN     O   O
IIIII      JJJ      K   K     LLLLL     M   M     N   N      OOO

PPPP       QQQ      RRRR       SSSS     TTTTT     U   U     V   V     W   W
P   P     Q   Q     R   R     S           T       U   U     V   V     W   W
PPPP      Q   Q     RRRR       SSS        T       U   U     V   V     W   W
P         Q  QQ     R  R          S       T       U   U      V V      W W W
P          QQQQ     R   R     SSSS        T        UUU        V        W W

X   X     Y   Y     ZZZZZ
X X       Y Y         Z
X         Y         Z
X X        Y        Z
X   X       Y       ZZZZZ


• 5 of the same letter is not allowed, no repeat choices.
• Each letter must use the capital of itself as the ascii-character to draw it.
• Each letter output must be on the "same line" and have 5 spaces between each letter.
• You may choose any 5 letters that you want, this will allow you to reuse some code and lower your byte count. Figuring out which letters will allow you to do this most efficiently is part of the challenge.
• Trailing spaces are acceptable.
• A single trailing newline is acceptable, no more than one trailing newline though.
• This is code-golf, lowest byte-count wins.

# Examples:

A B C D E

 AAA      BBBB       CCCC     DDDD      EEEEE
A   A     B   B     C         D   D     E
AAAAA     BBBB      C         D   D     EEEE
A   A     B   B     C         D   D     E
A   A     BBBB       CCCC     DDDD      EEEEE


E F L I P

EEEEE     FFFFF     L         IIIII     PPPP
E         F         L           I       P   P
EEEE      FFFF      L           I       PPPP
E         F         L           I       P
EEEEE     F         LLLLL     IIIII     P


C R A Z Y

 CCCC     RRRR       AAA      ZZZZZ     Y   Y
C         R   R     A   A        Z       Y Y
C         RRRR      AAAAA       Z         Y
C         R  R      A   A      Z          Y
CCCC     R   R     A   A     ZZZZZ       Y


Don't be afraid to submit more than one answer with different letters or different strategies each time, this can be accomplished various different ways.

• I like that you get to choose which letters to output; that adds another layer to the golfing. Minor issues with the ASCII art: there's a ton of trailing spaces, and two Js. – ETHproductions Nov 15 '16 at 15:16
• Can you add a bonus for taking 5 letters as input? – Mukul Kumar Nov 15 '16 at 18:22
• Bonuses are frowned upon and there are too many answers to make a drastic change such as that. But I will give you an upvote ;). – Magic Octopus Urn Nov 15 '16 at 19:05
• @Titus I don't know why you'd need them; trailing makes more sense. If you can logically explain how a limitation of the language you are using and not the logic you've written is causing a leading \n, I will allow it. – Magic Octopus Urn Nov 18 '16 at 14:26
• @Titus then no. The trailing newlines and spaces are due to programmatic limitations of certain languages. – Magic Octopus Urn Nov 18 '16 at 17:31

# Jelly, 41 bytes

### LICTE

“LICTE”Kż
141D+“ȷɓSɠ’“ðƁ ƥ“JrŀṘ’jḃ11Ç€ŒṙY


TryItOnline!

### Idea

Use a run length decode with letters that have as similar middle as possible with only one run length of each "pixel value" per row per letter.

Put a flat start like "L" to avoid different run length decode values for the rows.

Place the one different letter (could not find 5) of the three middle rows at the end so the smallest difference may be added arithmetically.

Output wanted; the run lengths; and these converted from base 11:

                                                  L,  , I,  , C,  , T,  , E   value
-------------------------
L         IIIII      CCCC     TTTTT     EEEEE     1, 9, 5, 6, 4, 5, 5, 5, 5   399633415
L           I       C           T       E         1,11, 1, 7, 1,11, 1, 7, 1   431646160+1
L           I       C           T       EEEE      1,11, 1, 7, 1,11, 1, 7, 4   431646160+4
L           I       C           T       E         1,11, 1, 7, 1,11, 1, 7, 1   431646160+1
LLLLL     IIIII      CCCC       T       EEEEE     5, 5, 5, 6, 4, 7, 1, 7, 5   1179122455


The three values 399633415, 431646160, and 1179122455 in base 250 as Jelly code page indices are then ðƁ ƥ, ȷɓSɠ, and JrŀṘ which can be used to encapsulate the run-length information.

### The code

“LICTE”Kż - Link 1, make a run length encoding for a row of the output: row's run lengths
“LICTE”    - list of characters "LICTE"
K   - join with spaces   "L I C T E"
ż  - zip with input     e.g. [['L',1],[' ',9],['I',5],[' ',6],['C',4],[' ',5],['T',5],[' ',5],['E',5]]

141D                            - 141 as a decimal list: [1, 4, 1]
“ȷɓSɠ’                     - 431646160
+                           - add: [431646161, 431646164, 431646161]
“ðƁ ƥ“JrŀṘ’          - list [399633415,1179122455]
j         - join: [399633415, 431646161, 431646164, 431646161, 1179122455]
ḃ11      - convert to bijective base 11: [[1, 9, 5, 6, 4, 5, 5, 5, 5], [1, 11, 1, 7, 1, 11, 1, 7, 1], [1, 11, 1, 7, 1, 11, 1, 7, 4], [1, 11, 1, 7, 1, 11, 1, 7, 1], [5, 5, 5, 6, 4, 7, 1, 7, 5]]
Œṙ  - run-length decode e.g. [['L',1],[' ',9],['I',5],...]
-> "L         IIIII..."
Y - join with line feeds

• You did the idea I had initially that I was not smart enough to do in 05AB1E!!! Amazing job man. – Magic Octopus Urn Nov 15 '16 at 19:04

## Charcoal, 51 49 bytes (ECXKI)

Ｇ←⁵↓³→⁴EＭ⁷→Ｇ↑²↗²→⁴CＭ⁶→ＧＨ↘↗³XＭ⁶→ＧＨ↓→↗³KＭ⁸→ＰTIII‖Ｏ↓


Outputs

EEEEE      CCCC     X   X     K   K     IIIII
E         C          X X      K  K        I
EEEE      C           X       KKK         I
E         C          X X      K  K        I
EEEEE      CCCC     X   X     K   K     IIIII


Try it online!

Using characters that are vertically symmetrical, draws the top halves and then reflects. Most of these make use of Polygon (Ｇ) and PolygonHollow (ＧＨ) to draw a series of connected line segments with a particular character. I can more easily be done with MultiPrint (Ｐ), using T as the direction.

Note: PolygonHollow just draws the segments specified, without completing the polygon or filling it. Polygon will complete and fill (not what we want) if the polygon can be completed with a simple line in one of the eight cardinal or intercardinal directions. Otherwise, it behaves like PolygonHollow, for a savings of one byte.

The order of characters was chosen to require only horizontal moves from the endpoint of one to the start of the next. Here's how the cursor proceeds:

• Nice. I was trying a charcoal solution but the lack of documentation honestly killed me – Bassdrop Cumberwubwubwub Nov 16 '16 at 8:43
• @Bassdrop Yeah, we're... um... working on that. [goes to add ＧＨ to the docs] – DLosc Nov 16 '16 at 16:31

## PowerShell v2+, 138128114112106 105 bytes (LICTD)

"L1    IIIII1 CCCC1TTTTT1DDDD
$("L11 I1 C11 T1 D D "*3)LLLLL1IIIII1 CCCC1 T1 DDDD"-replace1,' '  The idea is to maximize the spaces between the letters so we can get repeated compressions. Borrows the middle-row deduplication trick from Florent's answer. Saved 6 bytes thanks to Ben Owen by using string multiplication for the middle three rows, and an additional byte thanks to Matt. Output is like the following at 227 bytes, for a 53.7% reduction -- PS C:\Tools\Scripts\golfing> .\5-favorite-letters.ps1 L IIIII CCCC TTTTT DDDD L I C T D D L I C T D D L I C T D D LLLLL IIIII CCCC T DDDD  • I love it when the first answer is something you didn't expect at all. Neat method. – Magic Octopus Urn Nov 15 '16 at 15:43 • How about $("L11 I1 C11 T1 D Dn"*3) instead of the middle 3 lines – Ben Owen Nov 15 '16 at 16:45
• @BenOwen Excellent idea - thanks! – AdmBorkBork Nov 15 '16 at 16:50

# JavaScript, 110 109 bytes (CLOUD)

 CCCC5L9 OOO6U3U5DDDD
${x=C9L9O3O5U3U5D3D ,x+x+x} CCCC5LLLLL6OOO7UUU6DDDD.replace(/\d/g,c=>" ".repeat(c))  console.log(  CCCC5L9 OOO6U3U5DDDD${x=C9L9O3O5U3U5D3D
,x+x+x} CCCC5LLLLL6OOO7UUU6DDDD.replace(/\d/g,c=>" ".repeat(c))
)

Output is 227 bytes:

 CCCC     L          OOO      U   U     DDDD
C         L         O   O     U   U     D   D
C         L         O   O     U   U     D   D
C         L         O   O     U   U     D   D
CCCC     LLLLL      OOO       UUU      DDDD

• Nice use of deduplication in the middle three rows. – AdmBorkBork Nov 15 '16 at 16:21

# ES6 (Javascript), 194, 181 bytes (IGOLF/ANY)

This one is long, and is not really optimized (not yet at least), but can be modified to print any particular message, by only changing the bitmap data.

EDIT: Replaced inner reduce with map, use bit shift for padding

Golfed

[0x1f73a1f,0x484610,0x49c61e,0x48c610,0x1f73bf0].map(r=>[0,1,2,3,4].map(p=>('0000'+(r>>(20-p*5)<<5).toString(2)).substr(-10).replace(/(1|0)/g,b=>' IGOLF'[(p+1)*b])).join).join\n


Demo

[0x1f73a1f,0x484610,0x49c61e,0x48c610,0x1f73bf0].map(r=>[0,1,2,3,4].map(p=>('0000'+(r>>(20-p*5)<<5).toString(2)).substr(-10).replace(/(1|0)/g,b=>' IGOLF'[(p+1)*b])).join).join\n

IIIII      GGG       OOO      L         FFFFF
I       G         O   O     L         F
I       G  GG     O   O     L         FFFF
I       G   G     O   O     L         F
IIIII      GGG       OOO      LLLLL     F


Theory

Take a letter:

IIIII
I
I
I
IIIII


convert it to binary matrix (bitmap)

11111
00100
00100
00100
11111


do the same for other 4 letters, scan a line, by taking "top" 5 bits off each

11111 01110 01110 10000 11111

convert to a hexadecimal string (should be using base36 or even printable ASCII here)

0x1f73a1f

apply the same algorithm to other 4 lines, to get the bitmap.

Render in the reverse order.

• You can remove the parentheses in the regex to save 2 bytes :-) – ETHproductions Nov 16 '16 at 0:04
• [32979487,4736528,4834846,4769296,32979952] is shorter than its hexadecimal representation – Florent Nov 16 '16 at 7:50
• @ETHproductions True, will make use of this, when I'll be back to optimize it. Thx! – zeppelin Nov 16 '16 at 8:32
• You could replace /(1|0)/g by /\d/g to save a few bytes. Also \n could be replace by an actual new line. – Florent Nov 16 '16 at 9:27
• >is shorter than its hexadecimal representation Yep, that is true (due to 0x), at least for these specific letters, I'll probably compress this into a continuous hex (or even Base32/Base36/ASCII) string, on the next iteration. >You could replace /(1|0)/g by /\d/g to save a few bytes. Also \n could be replace by an actual new line. Yep, thank you for your tips, I will make use of them once I'm back to this one. – zeppelin Nov 16 '16 at 19:19

# PHP, 10710410294 86 bytes

Ok I'm confident I have the smallest possible source with this method now. I wrote a script to generate and then gzip every possible combination of five letters. There are two solutions that match for the shortest compressed -- LODIC and LDOIC. I'm going with the former because it's more fun to say.

Source:

<?=gzinflate(base64_decode('81GAA39/fwjDBQggLE8QgDCdgYDLB6EYioGqoRisHkrTSCUIEOtWAA'));


Output:

% php foo.php
L          OOO      DDDD      IIIII      CCCC
L         O   O     D   D       I       C
L         O   O     D   D       I       C
L         O   O     D   D       I       C
LLLLL      OOO      DDDD      IIIII      CCCC

• you can save 2 bytes by dropping the 's: the string will get treated as a constant with a value of itself. – user59178 Nov 15 '16 at 17:45
• Damnit, I always forget to do that. :) – Alex Howansky Nov 15 '16 at 18:23
• If L was your last letter you'd save more bytes too. – Magic Octopus Urn Nov 15 '16 at 19:03
• Nice exploiting of a loophole. – Ismael Miguel Nov 17 '16 at 19:58
• Creativity is subjective and immeasurable. The goal of the challenge is to minimize code size and this is the shortest entry for a non-golfing language. – Alex Howansky Nov 22 '16 at 18:35

# 05AB1E, 44 bytes

This was a fun one.
I feel like I need to come back and try and golf it some more when I have time.

Uses CP-1252 encoding.

ECOIH

‘ÓÑOIHH‘SðýJ3×S•Td<UÕ‘áÓ?Â¢tWvkÔÚ•S)øü×J3äû»


Try it online!

Explanation

‘ÓÑOIHH‘ pushes the string "ECOOIHH".

SðýJ3×S joins the string by spaces, repeats it thrice and converts it to a list.
The resulting list is ['E', ' ', 'C', ' ', 'O', ' ', 'O', ' ', 'I', ' ', 'H', ' ', 'H', 'E', ' ', 'C', ' ', 'O', ' ', 'O', ' ', 'I', ' ', 'H', ' ', 'H', 'E', ' ', 'C', ' ', 'O', ' ', 'O', ' ', 'I', ' ', 'H', ' ', 'H'].

•Td<UÕ‘áÓ?Â¢tWvkÔÚ• pushes the number 564631055513119191317171314619131717500.

S)ø zips the list and the number together.

ü×J does pairwise string repetition and joins them together.
The result is the string EEEEE CCCC OOO IIIII H HE C O O I H HEEEE C O O I HHHHH.

3äû»splits that into 3 pieces, adds the first and second piece in reverse order and joins by newlines.

• "•Td<UÕ‘áÓ?Â¢tWvkÔÚ• pushes the number 564631055513119191317171314619131717500" because why wouldn't it... – geisterfurz007 Nov 16 '16 at 10:58
• @geisterfurz007: To be more precise, it's the base-214 representation of the base-10 number :) – Emigna Nov 16 '16 at 11:10
• So potentially if you could go up to a higher base, your string would get shorter? – geisterfurz007 Nov 16 '16 at 11:12
• @geisterfurz007: If we could yes. Unfortunately 214 is the max in 05AB1E. – Emigna Nov 16 '16 at 11:25
• You can beat Jelly, I believe in you; 3 bytes left to go haha! – Magic Octopus Urn Nov 16 '16 at 17:33

# JavaScript (ES6), 96 bytes (DIOCL)

${x="DDDD6IIIII6OOO7CCCC5L"}${y=D3D7I7O3O5C9L
,y+y+y+x}LLLL.replace(/\d/g,d=>" ".repeat(d))


The idea here is to not only make the middle three lines identical, but also make the first line nearly identical to the last. Since there are only 4 letters that perfectly fit this description CDIO, L is the next best option, as it only requires 4 added characters at the end of the string.

As with Florent's answer, this is a snippet that returns the result. Add 3 bytes if it needs to be a function.

### Test snippet

console.log(${x="DDDD6IIIII6OOO7CCCC5L"}${y=D3D7I7O3O5C9L
,y+y+y+x}LLLL.replace(/\d/g,d=>" ".repeat(d)))

• You can save a byte by putting the D first. – Neil Nov 16 '16 at 11:12
• @Neil Thanks. I had to move the C past the I and O as well – ETHproductions Nov 16 '16 at 16:41
• Ah, right, you can't have the I immediately after the C, although interestingly doing that improves my Batch solution, for the same reason. – Neil Nov 16 '16 at 20:20

## Bash+coreutils with figlet, 55440 solutions, 112 106 bytes each

 set H E L P D;for l;do figlet -f banner $l|sed "s/.//3;s/.//5;s/#/$l/g;2d;5d">$l;done;paste$@|expand -t10


Output:

H   H     EEEEE     L         PPPP      DDDD
H   H     E         L         P   P     D   D
HHHHH     EEEE      L         PPPP      D   D
H   H     E         L         P         D   D
H   H     EEEEE     LLLLL     P         DDDD


Hey, we already have a program for ASCII art! The banner font almost does the job, except it outputs 7x7 letters. Hmm, let's just remove the 3rd and 5th columns, and the 2nd and 5th lines, and see what it gives...

It turns out that many letters will be output the required way, namely, B D E F H J L P T U Z.

It suffices to replace the arguments of the first set command with any combination of those letters to still obtain a correct result! Hence, this gives us 11*10*9*8*7=55440 solutions, each of those being 106 bytes long.

• My first thought when reading the challenge was "one has to use figlet to solve this" – FliiFe Nov 22 '16 at 18:01

# 05AB1E, 1029089 69 bytes (EOIXC)

•Cv¶ÉH&9;´ß{ø‰¿šq3d$µ_©Û¶«K>Ò±sÒ9ÍÊC4ÊÚúNÏŒº9¨gÚSÞ•34B2ð:2ôvy×}J3äû»  Try it online! ## Output (230 bytes): EEEEE OOOO IIIII X X CCCC E O O I X X C EEEE O O I X C E O O I X X C EEEEE OOOO IIIII X X CCCC  69 / 230 = 70% Compression ## Explanation: The theory was to pick vertically symmetrical letters, then encode the first 3 lines an palindromize them. Basically, I encoded as {#} of {Letter} in 2 byte pairs. I'm sure there's a better way to do this. •Cv¶ÉH&9;´ß{ø‰¿šq3d$µ_©Û¶«K>Ò±sÒ9ÍÊC4ÊÚîòvÅrè‘¾)jM•34B
<decodes to>
"E5 6O4 5I5 5X1 3X1 6C4E1 9O1 4O1 6I1 8X1 1X1 6C1 4E4 6O1 4O1 6I1 9X1 7C1 4"

2ô            # Split into encoded pairs.
vy   }      # Loop through each letter and number pair.
×        # Add the letter X number of times.
J      # Join together.
3ä    # Split into 3 parts length.
û   # Palindromize.
»  # Print separated by newlines.


-20 bytes thanks to Emigna, I'll be in the chat to ask some questions soon ;).

• You can save 19 bytes by replacing the string with •Cv¶ÉH&9;´ß{ø‰¿šq3d$µ_©Û¶«K>Ò±sÒ9ÍÊC4ÊÚîòvÅrè‘¾)jM•34B2ð:. Hop in the 05AB1E chat if you have questions about encoding. – Emigna Nov 15 '16 at 19:48 • Also, 45ô can be 3ä. – Emigna Nov 15 '16 at 19:52 • @Emigna A is not vertically symmetrical, and neither is F. Going to guess that once you start using G or higher it'll ruin what you're talking about right? Also, with my compression methodology I wanted to avoid letters that had more than 1 occurrence per row. If you want to golf that solution and beat me I'd welcome the example :). – Magic Octopus Urn Nov 15 '16 at 19:54 • There's a 0 in the O (center row, right side) – ETHproductions Nov 15 '16 at 20:09 • •Cv¶ÉH&9;´ß{ø‰¿šq3d$µ_©Û¶«K>Ò±sÒ9ÍÊC4ÊÚúNÏŒº9¨gÚSÞ• fixes the O at the same byte count. – Emigna Nov 15 '16 at 20:53

# JavaScript ES6, 168 bytes, CHAMP

We can stop looking guys, we have a CHAMP over here

f=_=>
C3cHaHdA2dMaMcP3
CgHaHcAaAcMM MMcPaP
CgH4cA4cM M McP3
CgHaHcAaAcMaMcP
C3cHaHcAaAcMaMcP.replace(/[a-z\d]/g,(a,i,c)=>+a?c[i-1].repeat(a):' '.repeat(parseInt(a,36)-7))

a.innerHTML = f()
<pre id=a>

# Brainf*** 512 411 Bytes

Better redo:

This one does a better job at optimizing the tape, sacrificing setup characters for printing characters. The tape in this one looks like 'C' 'E' ' ' 'F' 'I' 'L' '\n', improving efficiency. I chose these because they lack internal spaces, making it so that they don't have to go back and forth between character and space more than necessary

++++++++[>+++++++++>+++++++++>++++>+++++++++>+++++++++>+++++++++>+<<<<<<<-]>----->--->>-->+>++++>++<<<<.<<....>>.....<.....>.....>.....<.....>>.....<<.....>>>.>.<<<<<<.>>.........<.>.........>.<...........>>.<<.......>>>.>.<<<<<<.>>.........<....>......>....<........>>.<<.......>>>.>.<<<<<<.>>.........<.>.........>.<...........>>.<<.......>>>.>.<<<<.<<....>>.....<.....>.....>.<.........>>.....<<.....>>>.....


If you want to read what it's doing:

Set the tape with 67,69,32,70,73,76,10
++++++++[>+++++++++>+++++++++>++++>+++++++++>+++++++++>+++++++++>+<<<<<<<-]>----->--->>-->+>++++>++<<<<
.<<....>>.....<.....>.....>.....<.....>>.....<<.....>>>.>.<<<<<< First Line
.>>.........<.>.........>.<...........>>.<<.......>>>.>.<<<<<< Second Line
.>>.........<....>......>....<........>>.<<.......>>>.>.<<<<<< Third Line
.>>.........<.>.........>.<...........>>.<<.......>>>.>.<<<< Fourth Line
.<<....>>.....<.....>.....>.<.........>>.....<<.....>>>..... Fifth Line


Output:

 CCCC     EEEEE     FFFFF     IIIII     L
C         E         F           I       L
C         EEEE      FFFF        I       L
C         E         F           I       L
CCCC     EEEEE     F         IIIII     LLLLL


Former Submission:

++++++++[>++++<-]>[>++>++>++>++>++>+<<<<<<-]>+>++>+++>++++>+++++>>++++++++++<.<<<<<...>>>>>......<<<<....>>>>.......<<<....>>>.....<<....>>......<.....>>.<<<<<<.>>>>>...<<<<<.>>>>>.....<<<<.>>>>...<<<<.>>>>.....<<<.>>>.........<<.>>...<<.>>.....<.>>.<<<<<<.....>>>>>.....<<<<....>>>>......<<<.>>>.........<<.>>...<<.>>.....<....>>.<<<<<<.>>>>>...<<<<<.>>>>>.....<<<<.>>>>...<<<<.>>>>.....<<<.>>>.........<<.>>...<<.>>.....<.>>.<<<<<<.>>>>>...<<<<<.>>>>>.....<<<<....>>>>.......<<<....>>>.....<<....>>......<.....


I chose to go with ABCDE because it make setting up the tape for output much easier, but the time and characters I wasted in going from the letter to ' ' for all the negative space inside the A, B, and D and the placement of the endline at the end of the tape kinda killed me, I think.

I ended up with a tape that had the values 0 0 'A' 'B' 'C' 'D' 'E' ' ' \n and then output from there

++++++++[>++++<-]>[>++>++>++>++>++>+<<<<<<-]>+>++>+++>++++>+++++>>++++++++++     This all sets up the tape as 0 0 A B C D E ' ' '\n'
<.<<<<<...>>>>>......<<<<....>>>>.......<<<....>>>.....<<....>>......<.....>>.<<<<<< First Line
.>>>>>...<<<<<.>>>>>.....<<<<.>>>>...<<<<.>>>>.....<<<.>>>.........<<.>>...<<.>>.....<.>>.<<<<<< Second Line
.....>>>>>.....<<<<....>>>>......<<<.>>>.........<<.>>...<<.>>.....<....>>.<<<<<< Third Line
.>>>>>...<<<<<.>>>>>.....<<<<.>>>>...<<<<.>>>>.....<<<.>>>.........<<.>>...<<.>>.....<.>>.<<<<<< Fourth Line
.>>>>>...<<<<<.>>>>>.....<<<<....>>>>.......<<<....>>>.....<<....>>......<..... Last Line


Output:

 AAA      BBBB       CCCC     DDDD      EEEEE
A   A     B   B     C         D   D     E
AAAAA     BBBB      C         D   D     EEEE
A   A     B   B     C         D   D     E
A   A     BBBB       CCCC     DDDD      EEEEE

• You can use [<]> on 3 occasions to save 6 bytes. – Jo King Jan 20 '18 at 11:51

# Vim, 116 bytes 99 bytes

### ELITC

Golfed it under 100 with the help of @DrMcMoylex.

9i59Yo191919171
E L I T CPqqjx:%s/\d/\=repeat('"',submatch(0))
q8@q3bi  Y7w.PP4rE{wl4r 22wl.2x


This contains unprintable characters, so I've added them in below (Vim style), so you can see them.

9i5^[9^AYo191919171
E L I T C^[Pqqjx:%s/\d/\=repeat('^R"',submatch(0))
q8@q3bi  ^[Y7w.PP4rE{wl4r 22wl.2x


TryItOnline!

It basically uses the same run-length decode that the jelly answer does. I used letters where I could (hopefully) repeat the top on the bottom, and the middles would all 3 be the same. Once the tops, bottoms, and middles are created I edit the characters to make them correct:

1. Add two spaces to the I (more on that below)
2. Add two spaces to the T
3. Add the bar of the E
4. Remove the top of the L
5. Remove the bottom of the T (and delete the 2 spaces)

I have to add two spaces to the I, because I didn't allow two digit numbers (so I wouldn't need a separator. This leads to a 9 space run where I need 11.

• Welcome to PPCG, nice answer :). – Magic Octopus Urn Nov 16 '16 at 17:30
• I was almost begging for a Vim answer. – Zoltán Schmidt Nov 17 '16 at 18:53
• I always upvote vim. :) Some improvements I see. 1) you don't need the trailing slash on your substitute command. 2) Some useful synonyms: Y instead of Vy, FI instead of ?I<cr>, { instead of gg, w instead of fl. 3) If you use r instead of R, you can remove the <esc>. – DJMcMayhem Nov 17 '16 at 22:35

# MATL, 49 bytes

5:lyI&(g84*t0*ytP+g73*yy!qy5XyPl5LY(90*yy!P12-&hc


Try it online!

This produces the letters TIHZN:

TTTTT     IIIII     H   H     ZZZZZ     N   N
T         I       H   H        Z      NN  N
T         I       HHHHH       Z       N N N
T         I       H   H      Z        N  NN
T       IIIII     H   H     ZZZZZ     N   N


### Explanation

T is relatively easy to build from scratch. I can be obtained essentially as T plus its vertical reflection. H is I transposed. N is Z transposed and vertically reflected.

5:        % Push [1 2 3 4 5]
lyI&(     % Write [1 ;2; 3; 4 ;5] in the third column, filling with zeros.
% This gives the shape of the 'T'
g84*      % Change nonzeros into 84 (ASCII for 'T'). Zeros will be displayed
% as spaces
t0*       % Duplicate and multiply by zeros. This gives the separator
y         % Duplicate from below: pushes the 'T' again
tP+       % Duplicate, flip vertically, add. Gives the shape of the 'I'
g73*      % Change nonzeros into 73 (ASCII for 'I')
yy        % Duplicate separator and 'I' array
!         % Transpose. Gives the shape of the 'H'
q         % Subtract 1. Transformss 73 into 72 (ASCII for 'H'), and 0 into -1,
% which will later be changed back into 0 when converting to char
y         % Duplicate separator
5XyP      % Size-5 identity matrix flipped vertically: gives slash of the 'Z'
l5LY(     % Fill first and last rows with ones. Gives the shape of the 'Z'
90*       % Multiply by 90 (ASCII for 'Z')
yy        % Duplicate separator and 'Z' array
!P        % Transpose and flip vertically. Gives shape of the 'N'
12-       % Subtract 12 to yield ASCII code for 'N'. 0 is converted to -12
&h        % Concatenate the nine arrays horizontally
c         % Convert to char. Implicitly display


# V, 62, 53 bytes

iC±  I· D³ Dµ O³ O¸ Z3ñYp$XñS ´Cµ µIµ ´D· ³O¶ µZYHP  Try it online! This outputs C I D O Z:  CCCC IIIII DDDD OOO ZZZZZ C I D D O O Z C I D D O O Z C I D D O O Z CCCC IIIII DDDD OOO ZZZZZ  ## Perl, 109 bytes (ABCDE) Note: this contains unprintable characters, escaped for ease of testing here, xxd dump below. $_="\x0e\x1e\x0f\x1e\x1f
\x11\x11\x10\x11\x10
\x1f\x1e\x10\x11\x1e
\x11\x11\x10\x11\x10
\x11\x1e\x0f\x1e\x1f";s!.!(eval'(sprintf"%5b",ord$&)=~y/01/ '.(A..E)[$i++%5].'/r').$"x5!ge;print  Stores the binary representation of the letter positions as a number, then unpacks back into binary, replacing 0s with spaces and 1s with the corresponding letter, using a lookup. Storing the letter representations is quite easy, but replacing them turned out more tricky than I'd hoped. I'm sure there are better ways to do this so I might well continue to play with this. To recreate the file, run xxd -r > favourite-letter.pl, paste in the below and press Ctrl+D: 0000000: 245f 3d22 0e1e 0f1e 1f0a 1111 1011 100a$_="............
0000010: 1f1e 1011 1e0a 1111 1011 100a 111e 0f1e  ................
0000020: 1f22 3b73 212e 2128 6576 616c 2728 7370  .";s!.!(eval'(sp
0000030: 7269 6e74 6622 2535 6222 2c6f 7264 2426  rintf"%5b",ord$& 0000040: 293d 7e79 2f30 312f 2027 2e28 412e 2e45 )=~y/01/ '.(A..E 0000050: 295b 2469 2b2b 2535 5d2e 272f 7227 292e )[$i++%5].'/r').
0000060: 2422 7835 2167 653b 7072 696e 74         $"x5!ge;print  ### Usage perl favourite-letter.pl AAA BBBB CCCC DDDD EEEEE A A B B C D D E AAAAA BBBB C D D EEEE A A B B C D D E A A BBBB CCCC DDDD EEEEE  # Python 2, 124 bytes d,i,o,c,l,s,n='DIOCL \n' T=d*4+s*6+i*5+s*6+o*3+s*7+c*4+s*5+l M=d+s*3+d+s*7+i+s*7+o+s*3+o+s*5+c+s*9+l+n print T+n,M,M,M,T+l*3  Similar to my other answer, but with better letter choices. Outputs this: DDDD IIIII OOO CCCC L D D I O O C L D D I O O C L D D I O O C L DDDD IIIII OOO CCCC LLLL  # Befunge, 120 bytes (CKYTF) Source #&49+14489+56*1449135*44711425*:12p9138*7+:89+:56*55*v_@ -1g05$$_\#!:2#-%#16#\0#/g#20#,g#+*8#4<80\9*2p06%5p05:<^:,g2!%5:  Output  CCCC K K Y Y TTTTT FFFFF C K K Y Y T F C KKK Y T FFFF C K K Y T F CCCC K K Y T F  Try it online! In case it matters, I should point out that my output has a leading space on each line. The rules didn't explicitly prohibit that, so I'm hoping that's OK. If not, please just consider this a non-competing entry. Explanation The letters of the word are encoded as a simple sequence of 25 integers, each integer being a binary representation of 5 pixels. Since Befunge requires you to perform a calculation to instantiate any integer greater than 9, the letters were chosen so as to minimize the number of calculations required, and ordered so potential repeating values could be duplicated rather than recalculated. We also need to store the ASCII value of each letter, offset by 32, in an array which is indexed by the modulo 5 of a decrementing index (so it goes 0 4 3 2 1 ...). The reason for offsetting by 32 is so the value can be multiplied by a pixel bit (1 or 0) and then added to 32 to produce either a space or the character required. This array of letter values is stored in the first 5 bytes of the code, so it's easy to access. This also then influenced the choice of letters, since those values needed to be meaningful when interpreted as a code sequence. This is the sequence #&49+. The # jumps over the & and the 49+ just pushes 13 onto the stack which is subsequently ignored. • You're asking for integer input with the &, but your program doesn't actually take input...what's going on? – Brian Gradin Nov 16 '16 at 0:06 • That character is skipped by '#' – 12Me21 Feb 5 '18 at 19:30 • @12Me21 I explained the reasoning behind that in the last paragraph. – James Holderness Feb 11 '18 at 13:47 # Ruby, 110107 102 bytes (DOCIL) puts a=?D*4+(t=' '*7)+?O*3+t+?C*4+(s=' '*5)+?I*5+s+?L,['D D'+s+'O O'+s+?C+' '*11+?I+t+?L]*3,a+?L*4  Prints DDDD OOO CCCC IIIII L D D O O C I L D D O O C I L D D O O C I L DDDD OOO CCCC IIIII LLLLL  EDIT: Saved some chars by avoiding join and moving things around # Befunge-98, 109 98 bytes (FUNGE / ANY) :5%!2>j#4_;$&\#;\:0!#@_:::'@/'@*-\'@/2%*' +,:'@/:2/-'@*-\1+:5%!2>j#4_;' 3k:4k,#;:55*%!2>j#4_;a,;  Try it online! ## Input (115 characters): 2022 1141 1134 935 2021 102 1141 1262 103 101 998 1141 1390 1639 997 102 1141 1646 1127 101 102 949 1134 935 2021 0  Input is the integer version of a binary number with the format aaaaabbbbbb where aaaaa is a reversed map of the character to print (for example, the second row in the N is NN N, so the mask is 10011), and bbbbbb is the ascii character to print, minus 32. I also created a befunge-98 program to create my inputs: 4k~44p34p24p14p04p v +1.+-**244g4%5\**88_@#0:&::<  Try it online! ## Output (255 characters): FFFFF U U N N GGG EEEEE F U U NN N G E FFFF U U N N N G GG EEEE F U U N NN G G E F UUU N N GGG EEEEE  (255 - (115 + 98)) / 255 = 16% compression ## Explanation: :5%!2>j#4_;$&\#;\:0!#@_ Get input if it is available, else end program :::'@/'@*-\'@/2%*' +, Output the current input character (or a space, if the mask dictates so) :'@/:2/-'@*- Throw away current mask bit \1+ Swap loop iterator to top of stack, increment it :5%!2>j#4_;' *3k:4k,#; If iterator % 5 == 0, print five spaces :55*%!2>j#4_;a,; If iterator % 25 == 0, print newline character  This is probably pretty golfable; I've spent barely any time thinking about potential reductions. Theoretically this can print any sequence of 5x5 ascii art. Thanks to James Holderness for helping me get out of triple digits! • To take the idea further, 48* can be replaced with '  (since this is 98 after all), and 88* can be replaced with '@. Thanks for helping me get out of triple digits! – Brian Gradin Nov 16 '16 at 19:32 # C#, 290279267 265 Bytes Edit: Saved 12 bytes thanks to @milk! And 2 more thanks to @TheLethalCoder Golfed: void F(){string g=" ",h="H H",A="A A",B=h+"|"+A;Func<string,string>j=a=>a.Replace("|",g)+"\n";Console.Write(j(" SSSS|"+h+"| AAA |RRRR |PPPP")+j("S |"+B+"|R R|P P")+j(" SSS |HHHHH|AAAAA|RRRR |PPPP")+j(" S|"+B+"|R R |P")+j("SSSS |"+B+"|R R|P"));}  Ungolfed: public void F() { string g = " ", h = "H H", A = "A A", B = h + "|" + A; Func<string, string> j = a => a.Replace("|", g) + "\n"; Console.Write(j(" SSSS|" + h + "| AAA |RRRR |PPPP") + j("S |" + B + "|R R|P P") + j(" SSS |HHHHH|AAAAA|RRRR |PPPP") + j(" S|" + B + "|R R |P") + j("SSSS |" + B + "|R R|P")); }  Outputs:  SSSS H H AAA RRRR PPPP S H H A A R R P P SSS HHHHH AAAAA RRRR PPPP S H H A A R R P SSSS H H A A R R P  • There was a second where I thought that your C code was 290279 bytes in length. – Steven H. Nov 16 '16 at 0:17 • @StevenH. It feels that way Golfing in C# :) – Pete Arden Nov 16 '16 at 0:30 • -12 bytes if you define the local function like this Func<string,string>j=a=>a.Replace("|",g)+"\r\n"; – milk Nov 16 '16 at 6:46 • @milk Cool, thanks! :) – Pete Arden Nov 16 '16 at 11:07 • Do you need the \r in the \r\n? Would save 2 bytes – TheLethalCoder Nov 17 '16 at 17:00 # Stax, 33 bytes "BCDEO" ┌☼&.àτ▲█╟;c♦▌ΩÅ╡≤♫¿(┌▲▲≡3*╤J s*è«  Run and debug it I picked letters that • have vertical symmetry • whose middle three columns are identical These properties mean that each letter can be represented by a 3x3 grid. Here are the 9 regions, represented by digits. 12223 45556 78889 45556 12223  Consider the letter "B". It can be represented by 3 octal digits: 656. Each digit contains three bits, which control which regions are enabled for that letter. This technique also works for "CDEO". Unpacked, ungolfed, and commented, the program looks like this. "!^*14>G2eo"! crammed integer literal [63672, 54545, 64565] |p palindromize [63672, 54545, 64565, 54545, 63672] m for each, run this and output... E extract decimal digits to array [6, 3, 6, 7, 2] )"+0 compressed string literal "BCDEO" \ zip arrays [[6, 66], [3, 67], [6, 68], [7, 69], [2, 79]] { map array using block E explode array 6, 66 Z\ tuck a zero under, and make pair 6, [0, 66] :B custom base convert [66, 66, 0] 3) pad to length 3 [66, 66, 0] 3O\ tuck a one under a 3 and pair [66, 66, 0], [1, 3] :B repeat elements corresponding times [66, 66, 66, 66, 0] A( pad right to length 10 [66, 66, 66, 66, 0, 0, 0, 0, 0, 0] m  Run this one ## Python 3, 234228227 166 bytes (CLOUD): import base64,gzip;b=b'ABzY86gn$d0{>HR1_A{T@KJyRe}8nBNU1i6kLFS%Nec$q1YdaQ51tPO;sx(oDBkK&Q=Hwg(wC)8vxUXJX_-c000';print(gzip.decompress(base64.b85decode(b)).decode())  Prints:  CCCC L OOO U U DDDD C L O O U U D D C L O O U U D D C L O O U U D D CCCC LLLLL OOO UUU DDDD  # Python 3, 178 bytes e,f,i,t,h,s='EFITH ' p=print S=s*5 D=i+s*9+t+s*7 A=e*5+S F=S+i*5+S B=e+s*9+f+s*11+D+h+s*3+h C=h+s*3+h p(A+f*5+F+t*5+S+C) p(B) p(e*4+s*6+f*4+s*8+D+h*5) p(B) p(A+f+s*4+F,s+t+s*7+C)  Won't win, but does not use any compression. It makes this: EEEEE FFFFF IIIII TTTTT H H E F I T H H EEEE FFFF I T HHHHH E F I T H H EEEEE F IIIII T H H  Any help is welcome, I probably missed something. I didn't use Python 2 because you can't do the p=print, and that saves 17 bytes. Try it on repl.it. • What is up with that F? – Destructible Lemon Nov 15 '16 at 22:03 • @DestructibleWatermelon I don't know how I missed that, but it is fixed now. – nedla2004 Nov 15 '16 at 22:14 • Golfed below original size: 160 bytes, Python 2 – CalculatorFeline Nov 17 '16 at 1:07 • Rather than using p=print, you can use a single print statement with the kw argument sep='\n'. – Luca Citi Mar 29 '18 at 8:29 # Ruby, 101 bytes (TIFLE) "o@h@u".bytes{|i|k=3+i%2;puts "%-10s"*5%"TIFLE".chars.map{|j|i/=2;(i/16>i%2*3?' ':'')+j+j*k*(i%2)}} TTTTT IIIII FFFFF L EEEEE T I F L E T I FFFF L EEEE T I F L E T IIIII F LLLLL EEEEE  I picked letters that required a single block of letters (1,4 or 5 letters long) on each line. F,L and E are left justified, but T and I require leading spaces where a single letter (vertical part) is printed. The code for adding these spaces looks like it could be improved. ungolfed "o@h@u".bytes{|i| #for each byte (64 always set, 32...2 bits set for horiz bar, 1 bit=length of bar) k=3+i%2 #decode least sig. bit for no of chars printed if a 1 is found puts "%-10s"*5% #puts "%-10s%-10s%-10s%-10s%-10s" format string (expects array of subsitutes) "TIFLE".chars.map{|j| #for each letter i/=2 #halve i (i/16>i%2*3?' ':'')+ #if i large enough and i%2 zero, add leading space (or T and I) j+j*k*(i%2) #print the letter once, then additional letters if bar required. } }  # C 176 bytes If implicit ints are allowed then it's possible to cut off another 8 bytes. #define C ,//11 bytes #define R(r)r r r r r//21 bytes T(int l){int c=324;printf(R(R("%c")R(" "))"\n" R(R(C(++c,l>>=1)&1?c/5:32)));}//77 bytes f(){T(67010460);T(34702434);T(66160574);T(34702434);T(67010466);}//65 bytes  Output: E D C B A EEEEE DDDD CCCC BBBB AAA E D D C B B A A EEEEE D D C BBBB AAAAA E D D C B B A A EEEEE DDDD CCCC BBBB A A  How it works: The macro R just repeats a piece of code 5 times. Given how often fives appear in this problem, very useful. Now: here's what T(int) does. T takes an integer, and uses it as a bit field to determine where to print letters and where to print white space. For example, if given T(0b11111111100111111110011100), it will output: EEEEE DDDD CCCC BBBB AAA. It progressively counts down as to what letter it prints. First it prints E, then D, then C, then B, then A. Calling f() will print the entire thing. ## Batch, 135 bytes (DOCILe) @set b= @set s=@echo DDDD%b% OOO%b% CCC%b% IIIII%b%L @set t=@echo D D%b%O O%b%C%b%%b% I%b% L %s% %t% %t% %t% %s%LLLL  Note: the first line ends in 5 spaces. # BASH, 95, 111 bytes (EBASH) Golfed base64 -d<<<4ADlADhdACLpBDSMnNdRTj0Ob2qBPVT3HkdMRZzZ3kL+yIb6mhkz06EM+KOspSDy2EBoUKKL6pfwNo0akV0zAA==|xz -dqFraw  Explanation Base64 over raw LZMA byte stream Demo >base64 -d<<<4ADlADhdACLpBDSMnNdRTj0Ob2qBPVT3HkdMRZzZ3kL+yIb6mhkz06EM+KOspSDy2EBoUKKL6pfwNo0akV0zAA==|xz -dqFraw EEEEE BBBB AAA SSSS H H E B B A A S H H EEEE BBBB AAAAA SSS HHHHH E B B A A S H H EEEEE BBBB A A SSSS H H  Disclaimer Yes, I'm well aware that this is not really portable, that's why I've paid a byte to suppress the xz warnings with -q in the first case >:) # Python 2, 208194 193 bytes This is my first ever code golf ;) Fun to do for i in range(0,25,5): for c,p in {'M':18732593,'O':15255086,'N':18667121,'T':32641156,'Y':18157700}.items(): print format(p,'025b')[i:i+5].replace('0',' ',).replace('1',c)+' ', print  Output: Y Y M M TTTTT OOO N N Y Y MM MM T O O NN N Y M M M T O O N N N Y M M T O O N NN Y M M T OOO N N  Using a dictionary destroys the sort order of the letters, but that was not a requirement • It could do -4 if we take letters that do not use the upper left corner. This would result in a 24 bit (instead of a 25 bit) number which takes up one less digit in hex. – Pleiadian Nov 17 '16 at 15:22 ## perl 94 bytes. The first 4 letters (D, O, I, C) are specifically chosen to have the upper and lower lines similar, and the middle ones similar. As there is not any other similar letter, I chose the "L" to be able to apply the same algorithm and add the missing 4L. for(($a="D5 6O3 6I5 6C4 5L")."
","D 3D 5O 3O 7I 7C 9L
"x3,$a."4L "){s/(.)(\d)/$1x\$2/eg;print}


I saved some extra bytes by replacing the \n in the code with a real new line.

Result:

DDDD       OOO      IIIII      CCCC     L
D   D     O   O       I       C         L
D   D     O   O       I       C         L
D   D     O   O       I       C         L
DDDD       OOO      IIIII      CCCC     LLLLL
`