| Bytes | Lang | Time | Link |
|---|---|---|---|
| nan | 250708T210339Z | Md mamun | |
| 100 | Vyxal 3 | 250707T020933Z | pacman25 |
| 353 | C gcc | 170430T112449Z | jdt |
| 279 | Perl 5 | 250707T220210Z | Xcali |
| nan | Commodore 64 Assembler | 250707T203135Z | Jani Joe |
| 110 | Jelly | 170430T041905Z | fireflam |
| 9662 | Deadfish~ | 210401T013235Z | emanresu |
| 244 | Wolfram language | 170501T192215Z | Sauron |
| 389 | Wolfram language | 170501T080813Z | Not a tr |
| 323 | PHP | 170430T000721Z | Jör |
| 357 | Haskell | 160920T192612Z | michi7x7 |
| 172 | J | 141114T174022Z | FireFly |
| 322 | JavaScript ES6 | 141014T004209Z | NinjaBea |
| 361 | Bash+coreutils | 141013T225610Z | Digital |
| 227 | Ruby | 141014T101721Z | stevecro |
| 139 | CJam | 141013T211047Z | Optimize |
| 121 | CJam | 141013T205759Z | Dennis |
| 350 | JavaScript | 141013T223301Z | edc65 |
| 240 | Python 2 | 141013T211201Z | Greg Hew |
a='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
alert(r='tr20d,yxurj,soeyn,1migz,rbh14,5hqc,13w82y,z1c,iqx33,l8dmo,1swln,zokqa,tukfz,r8voh,jzd34,mflqi,jzjen,10gn1k,13ycc7,sn0bd,kbb0j,qm2hs,mvf4,13ydj3,18y9c,jzdah'.split(',').map((n,i)=>(1e10+(parseInt(n,36).toString(2))).slice(-26).replace(/./g,(m,j)=>+m?a[i]+a[j]+' ':' ')).join('\n'))
Vyxal 3, 100 bytes
m2ℭ"-•>¬O`⊐⤺ġ⚅ĿκøA⊠⊣≛␣⅟&⍟⨥b⤻[ƛGt∥ø
ø⦰≜ƛꜝ↸⇧⍾⁰◲×»⁰O∥n-⌊⑧QẄ≈ḧɾn>γ»3⎀⊖Fσʎ≊c⊆∥aW¶∆rϾ0D⑦▦⎶⊣²∻'∑“B∧0␣dr26Ϣ'
explanation (old):
m2ℭxBẄ∧0␣dr26Ϣ'
m2ℭ # all pairs of uppercase letters
xB # the big number jelly used notated as x converted to binary
Ẅ∧ # zip and reduce by logical and
0␣dr # replace zero with double space
26Ϣ # chunk 26
' # wait this is useful? joins inner lists on spaces and then the resulting list on newlines
💎
Created with the help of Luminespire.
C (gcc), 373 353 bytes
- -20 bytes thanks to ceilingcat!
i;main(j){for(char e[]="0BHJKVY|0CKP|0BEJQT|EGJKLMOYZ|0BDIJKLNOQXYZ|IJKLMORX|0JKOVXZ|KMNRTU|0AFGHIJKP|AEMOP|EGHIMNPRWYZ|ABCFIKRSTUVY|0BIJ|0BDHJKMNQSVWXY|AM|0BCDJOPQUVXZ|0BCDEFGHIJKL|0DFGJKQRTVXYZ|0PQW|0BEIQSUXY|AGKMSYZ|ACEGINU|FLOSV|0|ETUV|AMRWZ",*t,*p=e;t=strtok(p,"|");i++)for(j=64;p=++j<92;)printf(j-91?!index(t,j)^*t!=48?"%c%c ":" ":"\n",65+i,j);}
Perl 5, 279 bytes
$l=A;map{my$r;say map{$r//=A;($l.$r++,' ')[$_].$"}(sprintf'%026b',hex)=~/./g;$l++}qw(1058012 808400 1210240 3d657fc 143da07 3fc16fb 18815 3ff4e9f 21f8400 1dfd3ff 3d1caf4 6d7e0d 1030000 145b29e 1ffdfff 1c10e35 1ffc000 598357 608 12202a6 1f75f7c 155efdf 3efb76f 0 3dfff8f 1ffdef6)
Commodore 64 Assembler, 145 Bytes (6502/KickAssembler)
Similar to many other answers, the country code matrix is encoded into a long table of 676 bits (plus 4 for making complete 85 bytes), where 1 means country code should be printed, 0 that it shouldn't. The code rotates the whole table left 26 times (ie. a matrix row's worth), pushing each bit into stack, and then pulls them from stack and prints a country code for bit=1, empty space for bit=0. After the row is done, code loops until all 26 rows have been printed.
Code
* = $0841 // Run with SYS 2113
row: ldy #26 // 2 Rotate leftmost 26 bits of 676 to stack
roll: ldx #84 // 2 All 85 bytes are to be rotated 26 times
!: rol bits,x // 3 Rotate left with Carry. C -> LSB, MSB -> C.
dex // 1 Decrease bits table index
bpl !- // 2 Keep rotating until all bytes rotated once.
php // 1 Leftmost bit is now in C. Push it to stack
dey // 1 Decrease bit counter
bne roll // 2 Loop until leftmost 26 bits are in stack
ldx #'A' // 2 Load char 'A' to X
col: plp // 1 Pull the last pushed bit from stack to C
bcc empty // 2 If it is 0, print an empty cell
txa // 1 If not, move column char from X to A...
pha // 1 ...and push it to stack.
lda $14 // 2 Load row char to A ('A' on first iteration)
cmp #'Z'+1 // 2 Is row char gone past Z yet?
beq * // 2 If yes, we're done. Stop here.
bne print // 2 If not, print the country code
empty: lda #' ' // 2 Load space char to A (row char)...
pha // 1 ...and push it to stack (column char)
print: jsr $ffd2 // 3 Print A (row char)
pla // 1 Pull column char from stack...
jsr $ffd2 // 3 ...and print it.
cpx #'Z' // 2 Is column char Z yet?
beq next // 2 If it is, skip printing the trailing space.
lda #' ' // 2 If not, load space to A...
jsr $ffd2 // 3 ...and print it.
inx // 1 Increment column char
bne col // 2 Process next column. Branch always taken.
next: inc $14 // 2 Increment row char
lda #$0d // 2 Load control code for RETURN key to A...
jsr $ffd2 // 3 ...and print it. Effectively line feed.
bvc row // 2 Process next row. Branch always taken.
bits: .by %10110111,%11111110,%01011111,%01111111,%11110111,%10111111,%10111111,%11011011,%11110111,%10110111,%00000000,%01010110,%01010000
.by %00011111,%10100100,%00111101,%01001000,%00100101,%11110000,%00000101,%01111110,%11100111,%11111100,%00011010,%00110100,%00000000
.by %11111111,%11011110,%00000111,%10000000,%00001101,%00000001,%00011101,%00001010,%11000111,%01000001,%00111110,%00000101,%00100111
.by %11111111,%11111111,%00111111,%01100001,%10101100,%10010111,%01010000,%00000000,%01000000,%00000101,%01001110,%00111101,%11110001
.by %11111111,%11111100,%00000000,%01000101,%01001111,%10011001,%01111110,%11111001,%11111111,%11111110,%01101010,%11111110,%11101101
.by %11000001,%00000101,%00010000,%01000001,%00000010,%00010101,%01010000,%10010001,%00100000,%10000011,%11111111,%11111111,%11111111
.by %00001110,%00000000,%00000100,%00100100,%00100001,%00000000,%00010000 // 84.5 bytes = 676 bits (plus 4 zeroes for padding)
Usage
Run the program with SYS 2113.
Output
- Commodore 64's screen is only 40 chars wide, thus each table row gets split into two screen rows which makes the output look quite fugly. Ignoring this hardware limitation, the code does respect the formatting rules (for example no trailing whitespace is printed after the last
*Zcolumn, keeping each table row 77 chars wide). - Because our table takes 52 screen rows and 25 of them can fit on screen at once, some scrolling will occur. The screenshots below should display the whole table.
Jelly, 121 120 112 110 bytes
“VV&ØṖgḳeƘKo⁾lc<Ṗɗẋ⁾ÆȤ¡rżQ5¤ø^k&`v®tḊẒḂṁz®ṙṂþ°~7<¹ṢƝƒ4ṇæÇZt9ẈÇḞƲY!u`İŀo0*dḅḥmȯḊȧṛƓXĠƈṾ’Bx2ða»32øØAp`OFµỌs2s26G
-8 bytes thanks to @Dennis
-2 bytes thanks to @Dennis's idea of Cartesian products
How it works
Simple: The program multiplies one big binary list with another big list to get most of the output, then formats it
Medium: The program encodes the big binary list
1, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0, 0, 0, 1, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 1, 1, 0, 1, 0, 0, 1, 0, 0, 1, 1, 0, 1, 0, 1, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 1
into one big number, encoding which country codes are assigned. Each element is multiplied element-wise by each element of every possible country code to get a list of all assigned country codes, which is then formatted to the output list.
Lower level:
The bulk of the program uses data encoded in:
“VV&ØṖgḳeƘKo⁾lc<Ṗɗẋ⁾ÆȤ¡rżQ5¤ø^k&`v®tḊẒḂṁz®ṙṂþ°~7<¹ṢƝƒ4ṇæÇZt9ẈÇḞƲY!u`İŀo0*dḅḥmȯḊȧṛƓXĠƈṾ’
It is a base-250 integer which holds the decimal number 233462323092263584350936137603939798267906095227198731310610883427614237299604158551774020670253062350084519623333781892392013977676150946873601610983221266427394582295973500719992107281184544524840476937, which gets turned into the above binary list.
For brevity, let's call this value c and replace the long string with c in the explanation
cBx2ða»32øØAp`OFµỌs2s26G - main link, takes no input
c - literal value
B - convert this to binary to get a list
representing which codes are assigned
x2 - repeat each element twice
ða»32 - element-wise product (dealing with
spaces) with...
øØAp`OF - every possible country code in ASCII codes.
µỌs2s26G - format the output to be correct
Deadfish~, 9662 bytes
{iiiiii}iiiiicc{ddd}dddcccc{iii}iiiciic{ddd}dddddc{iii}iiiciiic{ddd}ddddddc{iii}iiiciiiic{dddd}iiic{iii}iiiciiiiic{dddd}iic{iii}iiiciiiiiic{dddd}icccc{iii}iiic{i}ddc{dddd}dccccccc{iii}iiic{i}ic{dddd}ddddc{iii}iiic{i}iic{dddd}dddddc{iii}iiic{i}iiic{dddd}ddddddc{iii}iiic{i}iiiic{ddddd}iiic{iii}iiic{i}iiiiic{ddddd}iic{iii}iiic{i}iiiiiic{ddddd}ic{iii}iiic{ii}dddc{ddddd}c{iii}iiic{ii}ddc{ddddd}dc{iii}iiic{ii}dc{ddddd}ddc{iii}iiic{ii}c{ddddd}dddcccc{iii}iiic{ii}iic{ddddd}dddddc{iii}iiic{ii}iiic{ddddd}ddddddcccc{iii}iiic{ii}iiiiic{{d}ii}c{iiiii}iiiiiicdc{ddd}dddc{iii}iiiicc{ddd}ddddcccc{iii}iiiiciic{ddd}ddddddc{iii}iiiiciiic{dddd}iiic{iii}iiiiciiiic{dddd}iic{iii}iiiiciiiiic{dddd}ic{iii}iiiiciiiiiic{dddd}c{iii}iiiic{i}dddc{dddd}dc{iii}iiiic{i}ddc{dddd}ddcccc{iii}iiiic{i}c{dddd}ddddc{iii}iiiic{i}ic{dddd}dddddc{iii}iiiic{i}iic{dddd}ddddddc{iii}iiiic{i}iiic{ddddd}iiicccc{iii}iiiic{i}iiiiic{ddddd}ic{iii}iiiic{i}iiiiiic{ddddd}c{iii}iiiic{ii}dddc{ddddd}dc{iii}iiiic{ii}ddc{ddddd}ddc{iii}iiiic{ii}dc{ddddd}dddc{iii}iiiic{ii}c{ddddd}ddddc{iii}iiiic{ii}ic{ddddd}dddddc{iii}iiiic{ii}iic{ddddd}ddddddc{iii}iiiic{ii}iiic{dddddd}iiic{iii}iiiic{ii}iiiic{{d}ii}c{iiiiii}dddcddc{ddd}dddcccc{iii}iiiiicc{ddd}dddddc{iii}iiiiicic{ddd}ddddddcccc{iii}iiiiiciiic{dddd}iic{iii}iiiiiciiiic{dddd}ic{iii}iiiiiciiiiic{dddd}c{iii}iiiiiciiiiiic{dddd}dcccc{iii}iiiiic{i}ddc{dddd}dddc{iii}iiiiic{i}dc{dddd}ddddc{iii}iiiiic{i}c{dddd}dddddc{iii}iiiiic{i}ic{dddd}ddddddc{iii}iiiiic{i}iic{ddddd}iiic{iii}iiiiic{i}iiic{ddddd}iicccc{iii}iiiiic{i}iiiiic{ddddd}c{iii}iiiiic{i}iiiiiic{ddddd}dcccc{iii}iiiiic{ii}ddc{ddddd}dddc{iii}iiiiic{ii}dc{ddddd}ddddc{iii}iiiiic{ii}c{ddddd}dddddc{iii}iiiiic{ii}ic{ddddd}ddddddc{iii}iiiiic{ii}iic{dddddd}iiic{iii}iiiiic{ii}iiic{{d}ii}c{ii}ii{c}cc{iii}iiiiiicic{dddd}iiicccc{iii}iiiiiiciiic{dddd}iccccccc{iii}iiiiiiciiiiiic{dddd}ddc{iii}iiiiiic{i}dddc{dddd}dddcccc{iii}iiiiiic{i}dc{dddd}dddddcccc{iii}iiiiiic{i}ic{ddddd}iii{cc}cccccccc{iii}iiiiiic{ii}ic{dddddd}iiic{iii}iiiiiic{ii}iic{{d}ii}c{iiiiii}dcddddc{ddd}dddcccc{iiii}dddcddc{ddd}dddddcccc{iiii}dddcc{dddd}iiic{iiii}dddcic{dddd}iic{iiii}dddciic{dddd}ic{iiii}dddciiic{dddd}{c}ccc{iiii}dddc{i}ddc{dddd}dddddccccccc{iiii}dddc{i}ic{ddddd}iicccc{iiii}dddc{i}iiic{ddddd}c{iiii}dddc{i}iiiic{ddddd}dc{iiii}dddc{i}iiiiic{ddddd}ddc{iiii}dddc{i}iiiiiic{ddddd}dddc{iiii}dddc{ii}dddc{ddddd}ddddc{iiii}dddc{ii}ddc{ddddd}dddddccccccccc{dd}ddc{ii}ii{cc}cccc{iiii}ddciiic{dddd}dc{iiii}ddciiiic{dddd}ddc{iiii}ddciiiiic{dddd}dddc{iiii}ddciiiiiic{dddd}ddddc{iiii}ddc{i}dddc{dddd}dddddcccc{iiii}ddc{i}dc{ddddd}iiiccccccc{iiii}ddc{i}iic{ddddd}{c}cccccc{iiii}ddc{ii}ddc{ddddd}ddddddcccccc{dd}ddc{iiiiii}icddddddc{ddd}dddc{iiii}dcdddddc{ddd}ddddc{iiii}dcddddc{ddd}dddddc{iiii}dcdddc{ddd}ddddddc{iiii}dcddc{dddd}iiic{iiii}dcdc{dddd}iic{iiii}dcc{dddd}ic{iiii}dcic{dddd}c{iiii}dciic{dddd}dccccccc{iiii}dciiiiic{dddd}ddddc{iiii}dciiiiiic{dddd}dddddc{iiii}dc{i}dddc{dddd}ddddddcccc{iiii}dc{i}dc{ddddd}iic{iiii}dc{i}c{ddddd}ic{iiii}dc{i}ic{ddddd}c{iiii}dc{i}iic{ddddd}dc{iiii}dc{i}iiic{ddddd}ddc{iiii}dc{i}iiiic{ddddd}dddcccc{iiii}dc{i}iiiiiic{ddddd}dddddcccc{iiii}dc{ii}ddc{dddddd}iiiccc{dd}ddc{ii}ii{cc}{c}{iiii}ciiic{dddd}dddcccc{iiii}ciiiiic{dddd}dddddc{iiii}ciiiiiic{dddd}dddddd{c}{iiii}c{i}c{ddddd}cccc{iiii}c{i}iic{ddddd}ddc{iiii}c{i}iiic{ddddd}ddd{c}ccccc{dd}ddc{ii}iiccc{iiii}ic{d}iiic{ddd}ddddc{iiii}icddddddc{ddd}dddddc{iiii}icdddddc{ddd}ddddddc{iiii}icddddc{dddd}iii{c}ccccccccc{iiii}iciiic{dddd}ddddc{iiii}iciiiic{dddd}dddddc{iiii}iciiiiic{dddd}ddddddc{iiii}iciiiiiic{ddddd}iiicccc{iiii}ic{i}ddc{ddddd}ic{iiii}ic{i}dc{ddddd}c{iiii}ic{i}c{ddddd}dc{iiii}ic{i}ic{ddddd}ddc{iiii}ic{i}iic{ddddd}dddc{iiii}ic{i}iiic{ddddd}ddddc{iiii}ic{i}iiiic{ddddd}dddddc{iiii}ic{i}iiiiic{ddddd}ddddddc{iiii}ic{i}iiiiiic{dddddd}iiic{iiii}ic{ii}dddc{{d}ii}c{iiiiii}iiiic{d}ic{ddd}ddd{c}{iiii}iicdddddc{dddd}iii{cc}cc{iiii}iiciiic{dddd}dddddcccc{iiii}iiciiiiic{ddddd}iiic{iiii}iiciiiiiic{ddddd}ii{cc}{c}{dd}ddc{ii}ii{c}cc{iiii}iiicddddddc{dddd}iiicccc{iiii}iiicddddc{dddd}ic{iiii}iiicdddc{dddd}c{iiii}iiicddc{dddd}d{c}{iiii}iiiciic{dddd}dddddc{iiii}iiiciiic{dddd}ddddddcccc{iiii}iiiciiiiic{ddddd}iicccc{iiii}iiic{i}dddc{ddddd}{c}ccc{iiii}iiic{i}iic{ddddd}dddddcccc{iiii}iiic{i}iiiic{dddddd}iiic{iiii}iiic{i}iiiiic{{d}ii}c{iiiiii}iiiiiic{d}dc{ddd}dddc{iiii}iiiic{d}c{ddd}ddddc{iiii}iiiic{d}ic{ddd}dddddccccccc{iiii}iiiicddddddc{dddd}iiccccccc{iiii}iiiicdddc{dddd}dcccc{iiii}iiiicdc{dddd}ddd{c}ccccccccc{iiii}iiiiciiiiiic{ddddd}c{iiii}iiiic{i}dddc{ddddd}dc{iiii}iiiic{i}ddc{ddddd}ddc{iiii}iiiic{i}dc{ddddd}dddc{iiii}iiiic{i}c{ddddd}ddddccccccc{iiii}iiiic{i}iiic{dddddd}iiiccc{dd}ddc{{i}ddd}dddc{d}ddc{ddd}dddcccc{iiii}iiiiic{d}c{ddd}dddddc{iiii}iiiiic{d}ic{ddd}ddddddc{iiii}iiiiic{d}iic{dddd}iiic{iiii}iiiiic{d}iiic{dddd}iic{iiii}iiiiicddddddc{dddd}ic{iiii}iiiiicdddddc{dddd}ccccccc{iiii}iiiiicddc{dddd}dddc{iiii}iiiiicdc{dddd}ddddc{iiii}iiiiicc{dddd}dddddc{iiii}iiiiicic{dddd}ddddddc{iiii}iiiiiciic{ddddd}iiic{iiii}iiiiiciiic{ddddd}iic{iiii}iiiiiciiiic{ddddd}ic{iiii}iiiiiciiiiic{ddddd}c{iiii}iiiiiciiiiiic{ddddd}dc{iiii}iiiiic{i}dddc{ddddd}ddc{iiii}iiiiic{i}ddc{ddddd}dddc{iiii}iiiiic{i}dc{ddddd}ddddc{iiii}iiiiic{i}c{ddddd}dddddc{iiii}iiiiic{i}ic{ddddd}ddddddc{iiii}iiiiic{i}iic{dddddd}iiic{iiii}iiiiic{i}iiic{{d}ii}c{{i}ddd}ddc{d}dddc{ddd}dddcccc{iiii}iiiiiic{d}dc{ddd}dddddcccc{iiii}iiiiiic{d}ic{dddd}iiic{iiii}iiiiiic{d}iic{dddd}iic{iiii}iiiiiic{d}iiic{dddd}icccc{iiii}iiiiiicdddddc{dddd}dccccccc{iiii}iiiiiicddc{dddd}ddddccccccc{iiii}iiiiiicic{ddddd}iiic{iiii}iiiiiiciic{ddddd}iicccc{iiii}iiiiiiciiiic{ddddd}cccc{iiii}iiiiiiciiiiiic{ddddd}ddc{iiii}iiiiiic{i}dddc{ddddd}ddd{c}ccc{iiii}iiiiiic{i}iic{{d}ii}c{{i}ddd}dc{d}ddddc{ddd}ddd{cc}{c}cccc{iiiii}dddcddc{dddd}ddddd{cc}{c}ccccccccc{dd}ddc{{i}ddd}c{d}dddddc{ddd}ddd{c}{iiiii}ddc{d}dc{dddd}iiic{iiiii}ddc{d}c{dddd}iic{iiiii}ddc{d}ic{dddd}ic{iiiii}ddc{d}iic{dddd}c{iiiii}ddc{d}iiic{dddd}dcccc{iiiii}ddcdddddc{dddd}dddc{iiiii}ddcddddc{dddd}ddddc{iiiii}ddcdddc{dddd}dddddc{iiiii}ddcddc{dddd}dddddd{c}{iiiii}ddciic{ddddd}c{iiiii}ddciiic{ddddd}dc{iiiii}ddciiiic{ddddd}ddccccccc{iiiii}ddc{i}dddc{ddddd}dddddcccc{iiiii}ddc{i}dc{dddddd}iiiccc{dd}ddc{{i}ddd}ic{d}ddddddc{ddd}ddd{cc}{c}cccc{iiiii}dcddddc{dddd}dddddc{iiiii}dcdddc{dddd}ddddddc{iiiii}dcddc{ddddd}iiic{iiiii}dcdc{ddddd}iic{iiiii}dcc{ddddd}ic{iiiii}dcic{ddddd}c{iiiii}dciic{ddddd}dc{iiiii}dciiic{ddddd}ddc{iiiii}dciiiic{ddddd}dddc{iiiii}dciiiiic{ddddd}ddddc{iiiii}dciiiiiic{ddddd}dddddc{iiiii}dc{i}dddc{ddddd}ddddddc{iiiii}dc{i}ddc{dddddd}iiic{iiiii}dc{i}dc{{d}ii}c{{i}ddd}iic{dd}iiic{ddd}dddc{iiiii}c{d}ddddddc{ddd}ddddc{iiiii}c{d}dddddc{ddd}dddddcccc{iiiii}c{d}dddc{dddd}iiiccccccc{iiiii}c{d}c{dddd}c{iiiii}c{d}ic{dddd}dccccccc{iiiii}cddddddc{dddd}ddddc{iiiii}cdddddc{dddd}dddddc{iiiii}cddddc{dddd}ddddddc{iiiii}cdddc{ddddd}iiic{iiiii}cddc{ddddd}iiccccccc{iiiii}cic{ddddd}dcccc{iiiii}ciiic{ddddd}dddcccc{iiiii}ciiiiic{ddddd}dddddccccccccc{dd}ddc{{i}ddd}iiic{dd}iic{ddd}dddc{iiiii}ic{dd}iiic{ddd}ddddc{iiiii}ic{d}ddddddc{ddd}dddddc{iiiii}ic{d}dddddc{ddd}ddddddc{iiiii}ic{d}ddddc{dddd}iiic{iiiii}ic{d}dddc{dddd}iic{iiiii}ic{d}ddc{dddd}ic{iiiii}ic{d}dc{dddd}c{iiiii}ic{d}c{dddd}dc{iiiii}ic{d}ic{dddd}ddc{iiiii}ic{d}iic{dddd}dddc{iiiii}ic{d}iiic{dddd}ddddc{iiiii}icddddddc{dddd}dddddc{iiiii}icdddddc{dddd}ddddddc{iiiii}icddddc{ddddd}iiiccccccc{iiiii}icdc{ddddd}c{iiiii}icc{ddddd}dc{iiiii}icic{ddddd}ddc{iiiii}iciic{ddddd}dddc{iiiii}iciiic{ddddd}ddddcccc{iiiii}iciiiiic{ddddd}ddddddc{iiiii}iciiiiiic{dddddd}iiic{iiiii}ic{i}dddc{{d}ii}c{{i}ddd}iiiic{dd}ic{ddd}dddcccc{iiiii}iic{dd}iiic{ddd}dddddc{iiiii}iic{d}ddddddc{ddd}ddddddcccc{iiiii}iic{d}ddddc{dddd}iic{iiiii}iic{d}dddc{dddd}ic{iiiii}iic{d}ddc{dddd}cccc{iiiii}iic{d}c{dddd}ddc{iiiii}iic{d}ic{dddd}dddc{iiiii}iic{d}iic{dddd}ddddc{iiiii}iic{d}iiic{dddd}dddddc{iiiii}iicddddddc{dddd}ddddddc{iiiii}iicdddddc{ddddd}iiic{iiiii}iicddddc{ddddd}iicccc{iiiii}iicddc{ddddd}cccc{iiiii}iicc{ddddd}ddcccc{iiiii}iiciic{ddddd}ddddc{iiiii}iiciiic{ddddd}dddddccccccc{iiiii}iiciiiiiic{{d}ii}c{{i}ddd}iiiiic{dd}c{ddd}ddd{c}cccccc{iiiii}iiic{d}ddddc{dddd}i{c}{iiiii}iiic{d}c{dddd}dddcccc{iiiii}iiic{d}iic{dddd}ddddd{c}cccccc{iiiii}iiicddc{ddddd}d{c}cccccc{iiiii}iiiciiiic{dddddd}iiic{iiiii}iiiciiiiic{{d}ii}c{{i}ddd}iiiiiic{dd}dc{ddd}dddcccc{iiiii}iiiic{dd}ic{ddd}dddddcccc{iiiii}iiiic{dd}iiic{dddd}iiicccc{iiiii}iiiic{d}dddddc{dddd}icccc{iiiii}iiiic{d}dddc{dddd}d{c}ccc{iiiii}iiiic{d}iic{dddd}dddddd{c}ccccccccc{iiiii}iiiicdc{ddddd}ddd{c}ccccc{dd}ddc{ii}ii{c}ccccc{iiiii}iiiiic{dd}iiic{dddd}ii{c}cccccc{iiiii}iiiiic{d}dc{dddd}ddddccccccc{iiiii}iiiiic{d}iic{ddddd}iii{c}{iiiii}iiiiicddddc{ddddd}dccccccc{iiiii}iiiiicdc{ddddd}dddd{c}cc{dd}ddc{{i}dd}ddc{dd}dddc{ddd}dddc{iiiii}iiiiiic{dd}ddc{ddd}ddddc{iiiii}iiiiiic{dd}dc{ddd}dddddc{iiiii}iiiiiic{dd}c{ddd}ddddddc{iiiii}iiiiiic{dd}ic{dddd}iiic{iiiii}iiiiiic{dd}iic{dddd}iic{iiiii}iiiiiic{dd}iiic{dddd}ic{iiiii}iiiiiic{d}ddddddc{dddd}c{iiiii}iiiiiic{d}dddddc{dddd}dc{iiiii}iiiiiic{d}ddddc{dddd}ddc{iiiii}iiiiiic{d}dddc{dddd}dddc{iiiii}iiiiiic{d}ddc{dddd}ddddc{iiiii}iiiiiic{d}dc{dddd}dddddc{iiiii}iiiiiic{d}c{dddd}ddddddc{iiiii}iiiiiic{d}ic{ddddd}iiic{iiiii}iiiiiic{d}iic{ddddd}iic{iiiii}iiiiiic{d}iiic{ddddd}ic{iiiii}iiiiiicddddddc{ddddd}c{iiiii}iiiiiicdddddc{ddddd}dc{iiiii}iiiiiicddddc{ddddd}ddc{iiiii}iiiiiicdddc{ddddd}dddc{iiiii}iiiiiicddc{ddddd}ddddc{iiiii}iiiiiicdc{ddddd}dddddc{iiiii}iiiiiicc{ddddd}ddddddc{iiiii}iiiiiicic{dddddd}iiic{iiiii}iiiiiiciic{{d}ii}c{ii}ii{c}cc{iiiiii}dddc{dd}c{dddd}iii{cc}{cc}ccc{iiiiii}dddcdddddc{ddddd}ddc{iiiiii}dddcddddc{ddddd}dddc{iiiiii}dddcdddc{ddddd}dddd{c}cc{dd}ddc{{i}dd}c{dd}dddddc{ddd}ddd{cc}{c}cccc{iiiiii}ddc{d}dddc{dddd}ddddd{c}ccc{iiiiii}ddc{d}iic{ddddd}{c}ccc{iiiiii}ddcdddc{ddddd}dddddccccccc{iiiiii}ddcc
Wolfram language, 244 255 bytes
Table[Table[If[BitGet[36^^b6wapsm769n90ongzuvadg5vdat6ap7v1oyyie3j5wxbq9xtycezrtt9xam\n9riqnnxnsxjx0al8uk8rmk5snb7quly7t5i9rkq21r1vnns5vdm7gwzqtxwwwmj02nqxl\hl,675-i*26-j]==1,FromCharacterCode[{i,j}+65]<>" "," "],{j,0,25}]<>"\n",{i,0,25}]<>""
The number from fireflame241's answer was used and repacked into 36-ary form.
No builtin country data were used.
Wolfram language, 389 bytes
c=CountryData;r=Riffle;StringReplace[""<>r[#~r~" "&/@Array[CharacterRange["A","Z"][[{##}]]&,{26,26}],n="
"],{"GZ"|"WE"->" ",x:("X"~~_~~" "|n)|##&@@(Cases[#~c~"CountryCode"&/@c[],_String]~Join~(""<>#&/@Partition[Characters@"AACPSXQNICRANTAPEAQPEPEUMQQRCSXQXDGCWLRNTPEVAQUMQVEWLRPIXDYUMQSUMQWVEFRBQYVIBXEMQMQOAQZRBLFRBUKRLIBVIUKGSSFXHRMQTFLIVIWOARIYVIZZRHMFIOAXJA",2,1])):>x,Except@n->" "}]
More readable:
c = CountryData; r = Riffle; StringReplace[
"" <> r[#~r~" " & /@
Array[CharacterRange["A", "Z"][[{##}]] &, {26, 26}],
n = "\n"], {"GZ" | "WE" -> " ",
x : ("X" ~~ _ ~~ " " | n) | ## & @@ (Cases[#~c~"CountryCode" & /@
c[], _String]~
Join~("" <> # & /@
Partition[
Characters@
"AACPSXQNICRANTAPEAQPEPEUMQQRCSXQXDGCWLRNTPEVAQUMQVEWLRPIXDY\
UMQSUMQWVEFRBQYVIBXEMQMQOAQZRBLFRBUKRLIBVIUKGSSFXHRMQTFLIVIWOARIYVIZZR\
HMFIOAXJA", 2, 1])) :> x, Except@n -> " "}]
Wolfram has an in-built list of ISO country codes, so this should be the perfect language for the job. However, it only knows about the country codes that are actually the codes for countries, and not the ones reserved for other uses, which are still included in this table. We therefore need to add a lot of the country codes in manually.
Explanation:
""<>r[r[#," "]&/@Array[CharacterRange["A","Z"][[{##}]]&,{26,26}],n="\n"]is a string array of all pairs of letters from "A" to "Z".#~c~"CountryCode"&/@c[](wherec=CountryDatais defined earlier) gives a list of all country codes that Wolfram Language knows about. A couple of these areMissing["NotApplicable"], so we remove those withCases[...,_String].(""<>#&/@Partition[Characters@"AACP...AXJA",2,1])makes 83 of the remaining country codes manually using a 138-character string, where the pairs of adjacent characters are the required country codes. This string was found more or less by hand (with the help of theFindPostmanTourfunction!), and there is some repetition, so there's potentially more golfing to be done here.StringReplace[ <full array> ,{"GZ"|"WE"->" ",x:("X"~~_~~" "|n)|##&@@( <known country codes> ~Join~ <extra codes> ):>x,Except@n->" "}]first gets rid of two codes, "GZ" and "WE", which Wolfram thinks are country codes but aren't according to the table; then matches all codes starting with "X", plus the known codes and the ones we added manually, and replaces them with themselves; then finally everything else which isn't a newline and hasn't already been matched is turned into a space.
PHP, 323 Bytes
$p=explode(_,"^BHJKVY_^CKP_^BEJQT_EGJKMOYZ_ACE-HMPR-W_I-MORX_^JKOVXZ_KMNRTU_^AF-KP_AEMOP_EGHIMNPRWYZ_ABCFIKR-VY_^BIJ_ACEFGILOPRTUZ_AM_AE-IK-NR-TWY_AM-Z_A-CEHIL-PSUW_^PQW_^BEIQSUXY_AGKMSYZ_ACEGINU_FLOSV_\w_ETUV_AMRWZ");
foreach($r=range(A,Z)as$k=>$v)
foreach($r as$w)echo preg_match("#[{$p[$k]}]#",$w)?$v.$w:" ","
"[$w>Y];
Haskell, 357
Damn, this is kinda hard.
import Data.List.Split
az=['A'..'Z']
k=0x9084004380010ffffffc24482004085570414419abfbb7be7fff153e65ffff001538f7c400100186b25d7fffcfd4f8149f42b1d00034047ff781e068d0015fb9ff2097c007e90f5c015943f6fdedffdefeedff97d
l i (a:b)|i`mod`2>0=a:l(i`div`2)b|1>0=" ":l(i`div`2)b
l _ _=[]
main=putStr$unlines$chunksOf 78$unwords$l k[a:[b]|a<-az,b<-az]
Prints to STDOUT when compiled (thus the main). Using proper compression would make this a lot shorter... ideas welcome
J, 172 chars (printable)
echo}:"1,.u:32+(26 26$,(6#2)#:34-~3 u:
'QKa]?a@a`YQXa$HJ"\^+AB"`F&a[Y\B"N8#Z)QaD"N""P/2QFJ)TQUaa\\58("$""E]STJ"1aaKITJaa[_]?a7H$,$%LJ2*"24+%aaaa$"">*"*2F'
)*0,"1~33+,"0/~i.26
Line breaks for legibility. Straightforward binary packing, with six bits per string character (offset 34 to get into the printable range as well as avoid ').
JavaScript ES6, 336 322
a='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
alert(r='tr20d,yxurj,soeyn,1migz,rbh14,5hqc,13w82y,z1c,iqx33,l8dmo,1swln,zokqa,tukfz,r8voh,jzd34,mflqi,jzjen,10gn1k,13ycc7,sn0bd,kbb0j,qm2hs,mvf4,13ydj3,18y9c,jzdah'.split(',').map((n,i)=>(1e10+(parseInt(n,36).toString(2))).slice(-26).replace(/./g,(m,j)=>+m?a[i]+a[j]+' ':' ')).join('\n'))
The big string is each row put into binary (1 if there was a country code there, 0 if not) and then base36. Try it out in Firefox at http://jsfiddle.net/twduhqz6/1/.
Bash+coreutils, 361
Basic regex removal of the combos we don't want. Some mild compression of the regex:
a=({A..Z})
f=(BHJKVY CKP BEJQT A-DFHILNP-X BDI-LNOQX-Z A-HNPQS-WYZ JKOVXZ A-JLO-QSV-Z AF-KP B-DF-LNQ-Z A-DFJ-LOQS-VX DEGHJL-QWXZ BIJ BDHJKMNQSV-Y B-LN-Z B-DJO-QUVXZ B-L DFGJKQRTVX-Z PQW BEIQSUXY B-FH-JLN-RT-X BDFHJ-MO-TV-Z A-EG-KMNP-RTUW-Z _ A-DF-SW-Z B-LN-QS-VXY)
for i in ${!a[@]};{
s+="${a[i]}[${f[i]}]|"
}
echo {A..Z}{A..Z}|sed -r "s/Z /Z\n/g;s/${s%|}/ /g"
Ruby, 269 246 241 235 227
g="b6wapsm769n90ongzuvadg5vdat6ap7v1oyyie3j5wxbq9xtycezrtt9xamn9riqnnxnsxjx0al8uk8rmk5snb7quly7t5i9rkq21r1vnns5vdm7gwzqtxwwwmj02nqxlhl".to_i 36
l=*?A..?Z
676.times{|i|print g.to_s(2)[i]==?1?l[i/26]+l[i%26]:" ",i%26==25?$/:" "}
g is a matrix where each cell that has a country code is a 1 and all others are 0. All rows are written behind and the resulting binary number has been converted to a base 36 representation. Then I just iterate over all cells and check if the code shall be printed.
CJam, 152 149 148 145 144 140 139 bytes, printable
". QH%$ydK0]cg:WSSlFu0z>O$T1<hO)Q63@D7;\KDJ^!NQN!tFr'>x@*!nf`Ut<s=N_[\%Ec0AXXZ`hayqIi'qj)jnonEj!n(ZjpjW("31f-96b2b'[,65>_m*]z{~SS+?S}%52/N*
Thanks Dennis for pointers.
Pretty straightforward approach. How it works:
". Q .... jW(" "Push this string to stack. This is a compressed string"
"which results to a 26 by 26 grid of 0 and 1 representing"
"whether that block contains country code or empty space";
31f-96b2b "Remove 31 from ASCII code of each of the character,"
"treat the number array as of base 96 and convert it to"
"a base 2 number";
'[, "Create an array of characters of ASCII code 0 to 91";
65> "Take last 26 characters, which are A to Z";
_m* "Copy the array and create all combinations {XX|X ∈ [A,Z]}";
]z "zip the first 26*26 array of 1 and 0 with the above"
"26*26 array of XX such that the final array element"
"is like ([B XX]|B={0,1},X∈[A,Z])";
{~SS+?S}% "For element, unwrap it from array, put " " to stack,"
"if first number is 1, take XX otherwise, the spaces"
"and put a single space after each element";
52/ "split the array into chunks of 52,i.e 26 XX and 26 spaces";
N* "Join each chunk of 52 elements with new line"
(Now only if I knew how to do a non printable character version)
CJam, 125 122 121 bytes
"^Kéÿ·^?{ÿ·¿oÂ^Ú^À:ð^×à^Cé^Dÿ^Ýú^À^K^V^G^Áïþ ,^@^K^ÍBù(^_+óÿþºMa^À^H^@#ï^\¨^@ÿÿ¦|¨ÿþ}íßÕ^Ø\"^Â^Nª^P ^D^R$?ÿÿð^À^AÂ^@!^I"256b2b'[,65>_m*]z{~S2*?}%26/Sf*N*
The above uses caret notation for control characters.
Printable version (141 bytes) for the online interpreter:
"J`ki4#'Tr{$V!AcG)\d6o+rW97;#1|jN!WXL%GRuqYos0xCaaBzYgN97DOA'f@#@k'867BrCc1h?&d0LBq[st0YW^?b2Jfx.&gG:O(&"31f-95b2b'[,65>_m*]z{~S2*?}%26/Sf*N*
Example run
$ base64 -d > cc.cjam <<< Igvp/7d/e/+3v2/CmoA68JfgA+kE/536gAsWB4Hv/iAsAAuNQvkoHyvz//66TWGACAAj7xyoAP//pnyo//597d/VmFwigg6qECAEEiQ////wgAHCACEJIjI1NmIyYidbLDY1Pl9tKl16e35TMio/fSUyNi9TZipOKg==
$ LANG=en_US cjam cc.cjam
AA AC AD AE AF AG AI AL AM AN AO AP AQ AR AS AT AU AW AX AZ
BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BU BV BW BX BY BZ
CA CC CD CF CG CH CI CK CL CM CN CO CP CR CS CU CV CW CX CY CZ
DE DG DJ DK DM DO DY DZ
EA EC EE EF EG EH EM EP ER ES ET EU EV EW
FI FJ FK FL FM FO FR FX
GA GB GC GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY
HK HM HN HR HT HU
IB IC ID IE IL IM IN IO IQ IR IS IT IU IV IW IX IY IZ
JA JE JM JO JP
KE KG KH KI KM KN KP KR KW KY KZ
LA LB LC LF LI LK LR LS LT LU LV LY
MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ
NA NC NE NF NG NI NL NO NP NR NT NU NZ
OA OM
PA PE PF PG PH PI PK PL PM PN PR PS PT PW PY
QA QM QN QO QP QQ QR QS QT QU QV QW QX QY QZ
RA RB RC RE RH RI RL RM RN RO RP RS RU RW
SA SB SC SD SE SF SG SH SI SJ SK SL SM SN SO SR SS ST SU SV SX SY SZ
TA TC TD TF TG TH TJ TK TL TM TN TO TP TR TT TV TW TZ
UA UG UK UM US UY UZ
VA VC VE VG VI VN VU
WF WL WO WS WV
XA XB XC XD XE XF XG XH XI XJ XK XL XM XN XO XP XQ XR XS XT XU XV XW XX XY XZ
YE YT YU YV
ZA ZM ZR ZW ZZ
JavaScript (E6) 350
Not the right tool for this task (maybe thanks to String.fromCharCode?)
r=0,Q=x=>String.fromCharCode(x+64),
console.log("2dff97d 3ff7bfb 3f6fded 3005650 7e90f5 825f00 15fb9ff 1a3400 3ff781e d011 342b1d0 13e0527 3fffcfd 21ac975 1001 14e3df1 3fff001 54f997 3be7fff 26afeed 3041441 102155 244820 3ffffff 380010 2421001"
.replace(/\w+./g,x=>{for(x='0x'+x,s=c=o='',++r;++c<27;s=' ',x/=2)o+=s+(x&1?Q(r)+Q(c):' ');return o+'\n'}))
Python 2, 240 bytes
Straightforward binary encoding implementation.
R=range(26)
print"\n".join(" ".join(chr(65+r)+chr(65+c)if int("8hfxckgq1olihfa47x3rrdkojzkklec7qk1hp4ht6avmzxfg7c4uv14xe0pzvvg93x81ag2bf88v2w0p3p08g8nwtuktbwosj9dytset3qmhdl72v5u62nepapgabdqqu7x",36)&1<<c+r*26 else" "for c in R)for r in R)
The script for generating the integer is quick and dirty:
codes="""AA AC AD AE AF AG AI AL AM AN AO AP AQ AR AS AT AU AW AX AZ
BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BU BV BW BX BY BZ
CA CC CD CF CG CH CI CK CL CM CN CO CP CR CS CU CV CW CX CY CZ
DE DG DJ DK DM DO DY DZ
EA EC EE EF EG EH EM EP ER ES ET EU EV EW
FI FJ FK FL FM FO FR FX
GA GB GC GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY
HK HM HN HR HT HU
IB IC ID IE IL IM IN IO IQ IR IS IT IU IV IW IX IY IZ
JA JE JM JO JP
KE KG KH KI KM KN KP KR KW KY KZ
LA LB LC LF LI LK LR LS LT LU LV LY
MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ
NA NC NE NF NG NI NL NO NP NR NT NU NZ
OA OM
PA PE PF PG PH PI PK PL PM PN PR PS PT PW PY
QA QM QN QO QP QQ QR QS QT QU QV QW QX QY QZ
RA RB RC RE RH RI RL RM RN RO RP RS RU RW
SA SB SC SD SE SF SG SH SI SJ SK SL SM SN SO SR SS ST SU SV SX SY SZ
TA TC TD TF TG TH TJ TK TL TM TN TO TP TR TT TV TW TZ
UA UG UK UM US UY UZ
VA VC VE VG VI VN VU
WF WL WO WS WV
XA XB XC XD XE XF XG XH XI XJ XK XL XM XN XO XP XQ XR XS XT XU XV XW XX XY XZ
YE YT YU YV
ZA ZM ZR ZW ZZ
"""
n = sum(1 << (x/3) for x in range(0, len(codes), 3) if codes[x] != " ")
def baseN(num,b,numerals="0123456789abcdefghijklmnopqrstuvwxyz"):
return ((num == 0) and numerals[0]) or (baseN(num // b, b, numerals).lstrip(numerals[0]) + numerals[num % b])
print baseN(n, 36)


