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

Morse Decoder

Details

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

  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.
Chr.Code
A▄ ▄▄▄
B▄▄▄ ▄ ▄ ▄
C▄▄▄ ▄ ▄▄▄ ▄
D▄▄▄ ▄ ▄
E
F▄ ▄ ▄▄▄ ▄
G▄▄▄ ▄▄▄ ▄
H▄ ▄ ▄ ▄
I▄ ▄
Chr.Code
J▄ ▄▄▄ ▄▄▄ ▄▄▄
K▄▄▄ ▄ ▄▄▄
L▄ ▄▄▄ ▄ ▄
M▄▄▄ ▄▄▄
N▄▄▄ ▄
O▄▄▄ ▄▄▄ ▄▄▄
P▄ ▄▄▄ ▄▄▄ ▄
Q▄▄▄ ▄▄▄ ▄ ▄▄▄
R▄ ▄▄▄ ▄
Chr.Code
S▄ ▄ ▄
T▄▄▄
U▄ ▄ ▄▄▄
V▄ ▄ ▄ ▄▄▄
W▄ ▄▄▄ ▄▄▄
X▄▄▄ ▄ ▄ ▄▄▄
Y▄▄▄ ▄ ▄▄▄ ▄▄▄
Z▄▄▄ ▄▄▄ ▄ ▄
0▄▄▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄▄▄
Chr.Code
1▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄▄▄
2▄ ▄ ▄▄▄ ▄▄▄ ▄▄▄
3▄ ▄ ▄ ▄▄▄ ▄▄▄
4▄ ▄ ▄ ▄ ▄▄▄
5▄ ▄ ▄ ▄ ▄
6▄▄▄ ▄ ▄ ▄ ▄
7▄▄▄ ▄▄▄ ▄ ▄ ▄
8▄▄▄ ▄▄▄ ▄▄▄ ▄ ▄
9▄▄▄ ▄▄▄ ▄▄▄ ▄▄▄ ▄
All
Compiled from AT&T syntax to x86-64 Linux. Use syscalls to write output.
Top-level programs are supported, args holds ARGV.
ARGV is available via STDIN, joined on NULL. x is a no-op.
ARGV is available via STDIN, joined on NULL.
arguments holds ARGV, print() to output with a newline, write() to output without a newline.
say() is available without any import.
$args to access the arguments.
SELECT arg FROM argv to access the arguments, only the first column of the first result set will be printed, NULL values will be skipped, and the dialect is SQLite.
ctrl + enter or Run