Created
February 19, 2014 16:10
-
-
Save xtetsuji/9095241 to your computer and use it in GitHub Desktop.
Solve OneDrive puzzle.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
# https://twitter.com/onedrive/status/436167285259382784 | |
use strict; | |
use warnings; | |
my %mapping = (qw/ | |
A 3 | |
B 0 | |
C Q | |
D S | |
E 2 | |
F P | |
G 6 | |
H I | |
I B | |
J 7 | |
K R | |
L 1 | |
M T | |
N W | |
O 9 | |
P Z | |
Q C | |
R K | |
S N | |
T M | |
U F | |
V L | |
W D | |
X U | |
Y 8 | |
Z G | |
1 V | |
2 X | |
3 J | |
4 5 | |
6 A | |
7 E | |
8 4 | |
9 Y | |
H 0 | |
/); | |
%mapping = reverse %mapping; | |
my @string = (qw/ | |
M I 2 * P B K N M * 9 W 2 * I F W S K 2 S * M I 9 F N 3 W S * F N 2 | |
K N * M 9 * 1 9 6 * B W M 9 * 9 W 2 S K B L 2 _ Q 9 T * M 9 S 3 8 * | |
O 2 6 B W W B W 6 * 3 M * V V = V V * 3 T * Z N M * D B W * V H * 6 | |
0 * 9 P * 2 U M K 3 * N M 9 K 3 6 2 . | |
/); | |
for my $char (@string) { | |
print $mapping{$char} || ' '; | |
} | |
print "\n"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment