Please login with GitHub in order to save solutions and appear on the leaderboards.

Morse Decoder

Using ▄ (U+2584 Lower Half Block) to represent a dot, encode the argument from International Morse Code.

  1. The length of a dot is one unit.
  2. A dash is three units.
  3. The space between parts of the same letter is one unit.
  4. The space between letters is three units
  5. The space between words is ten units
A▄ ▄▄▄
B▄▄▄ ▄ ▄ ▄
C▄▄▄ ▄ ▄▄▄ ▄
D▄▄▄ ▄ ▄
E
F▄ ▄ ▄▄▄ ▄
G▄▄▄ ▄▄▄ ▄
H▄ ▄ ▄ ▄
I▄ ▄
J▄ ▄▄▄ ▄▄▄ ▄▄▄
K▄▄▄ ▄ ▄▄▄
L▄ ▄▄▄ ▄ ▄
M▄▄▄ ▄▄▄
N▄▄▄ ▄
O▄▄▄ ▄▄▄ ▄▄▄
P▄ ▄▄▄ ▄▄▄ ▄
Q▄▄▄ ▄▄▄ ▄ ▄▄▄
R▄ ▄▄▄ ▄
S▄ ▄ ▄
T▄▄▄
U▄ ▄ ▄▄▄
V▄ ▄ ▄ ▄▄▄
W▄ ▄▄▄ ▄▄▄
X▄▄▄ ▄ ▄ ▄▄▄
Y▄▄▄ ▄ ▄▄▄ ▄▄▄
Z▄▄▄ ▄▄▄ ▄ ▄
0▄▄▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄▄▄
1▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄▄▄
2▄ ▄ ▄▄▄ ▄▄▄ ▄▄▄
3▄ ▄ ▄ ▄▄▄ ▄▄▄
4▄ ▄ ▄ ▄ ▄▄▄
5▄ ▄ ▄ ▄ ▄
6▄▄▄ ▄ ▄ ▄ ▄
7▄▄▄ ▄▄▄ ▄ ▄ ▄
8▄▄▄ ▄▄▄ ▄▄▄ ▄ ▄
9▄▄▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄
not triednot triednot triednot triednot triednot triednot triednot triednot triednot triednot tried
arguments holds ARGV, print() to output with a newline, write() to output without a newline.
say and state are available without any import.