Skip to main content
added 1489 characters in body
Source Link
Optimizer
  • 26.6k
  • 7
  • 66
  • 142

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"

Pretty straightforward approach

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"
added 3 characters in body
Source Link
Optimizer
  • 26.6k
  • 7
  • 66
  • 142

CJam, 152 149 148 145 144 140 140139 bytes, printable

"/T*-(sK14A+z.;^?%PSS$63V+>TPUmus_']WX_gw{nPd8m$8& QH%$ydK0]cg:WSSlFu0z>O$T1<hO)Q63@D7;\KDJ^!NQN!tFr'>x@*!nf`Ut<s=N_[\%Ec0AXXZ`hayqIi'qj)jnonEj!n(90xHynXHokX1#M6}ZjpjW(WPM1Cc1b5tN-AkA]Of1B|[,V3Z]WEGcrF@3a$"35f"31f-92b2b'[96b2b'[,65>_m*]z{~SS+?S}%52/N*

Thanks Dennis for pointers.

Pretty straightforward approach

Try it online here

(Now only if I knew how to do a non printable character version)

CJam, 152 149 148 145 144 140 bytes, printable

"/T*-(sK14A+z.;^?%PSS$63V+>TPUmus_']WX_gw{nPd8m$8&(90xHynXHokX1#M6}(WPM1Cc1b5tN-AkA]Of1B|[,V3Z]WEGcrF@3a$"35f-92b2b'[,65>_m*]z{~SS+?S}%52/N*

Thanks Dennis for pointers.

Pretty straightforward approach

Try it online here

(Now only if I knew how to do a non printable character version)

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

Try it online here

(Now only if I knew how to do a non printable character version)

added 31 characters in body
Source Link
Optimizer
  • 26.6k
  • 7
  • 66
  • 142

CJam, 152 149 148 145 144 144140 bytes, printable

"/T*-(sK14A+z.;^?%PSS$63V+>TPUmus_']WX_gw{nPd8m$8&(90xHynXHokX1#M6}(WPM1Cc1b5tN-AkA]Of1B|[,V3Z]WEGcrF@3a$":i35fV3Z]WEGcrF@3a$"35f-92b2b9192b2b'[,65>:c_m*]z65>_m*]z{~SS+?S}%52/N*

Thanks Dennis for pointers.

Pretty straightforward approach

Try it online here

(Now only if I knew how to do a non printable character version)

CJam, 152 149 148 145 144 bytes, printable

"/T*-(sK14A+z.;^?%PSS$63V+>TPUmus_']WX_gw{nPd8m$8&(90xHynXHokX1#M6}(WPM1Cc1b5tN-AkA]Of1B|[,V3Z]WEGcrF@3a$":i35f-92b2b91,65>:c_m*]z{~SS+?S}%52/N*

Pretty straightforward approach

Try it online here

(Now only if I knew how to do a non printable character version)

CJam, 152 149 148 145 144 140 bytes, printable

"/T*-(sK14A+z.;^?%PSS$63V+>TPUmus_']WX_gw{nPd8m$8&(90xHynXHokX1#M6}(WPM1Cc1b5tN-AkA]Of1B|[,V3Z]WEGcrF@3a$"35f-92b2b'[,65>_m*]z{~SS+?S}%52/N*

Thanks Dennis for pointers.

Pretty straightforward approach

Try it online here

(Now only if I knew how to do a non printable character version)

added 3 characters in body
Source Link
Optimizer
  • 26.6k
  • 7
  • 66
  • 142
Loading
added 67 characters in body
Source Link
Optimizer
  • 26.6k
  • 7
  • 66
  • 142
Loading
added 8 characters in body
Source Link
Optimizer
  • 26.6k
  • 7
  • 66
  • 142
Loading
deleted 1 character in body
Source Link
Optimizer
  • 26.6k
  • 7
  • 66
  • 142
Loading
Post Undeleted by Optimizer
deleted 24 characters in body
Source Link
Optimizer
  • 26.6k
  • 7
  • 66
  • 142
Loading
Post Deleted by Optimizer
deleted 24 characters in body
Source Link
Optimizer
  • 26.6k
  • 7
  • 66
  • 142
Loading
Post Undeleted by Optimizer
deleted 1 character in body
Source Link
Optimizer
  • 26.6k
  • 7
  • 66
  • 142
Loading
Post Deleted by Optimizer
Source Link
Optimizer
  • 26.6k
  • 7
  • 66
  • 142
Loading