Created
June 29, 2022 17:32
-
-
Save mnp/1f9f15955a6d83dee92fd098ccd901d9 to your computer and use it in GitHub Desktop.
Dead Trigger Puzzle from 2013
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
Solution to an old puzzle. The puzzle text: | |
02201010121021210121111011020201012110221021 | |
21020201012102221020211111110210101211010102 | |
10010120211210202101211102210212010121012111 | |
00210201010121101010210010120220010121102011 | |
02021102101201010120211210121111110101202112 | |
01012020210101201212012100121101212012110121 | |
20121201211 | |
What it said: | |
I have the keys of Death and of Hades. Day D = 20121221 | |
Here's the code used, just base 2 in groups of 5 to each ascii character in the solution. | |
#!/usr/bin/perl | |
use Math::Base::Convert; | |
my $mb=new Math::Base::Convert(["0".."2"], "10"); | |
while (<>) { | |
while (/(.....)/g) { | |
$dec = $mb->cnv($1); | |
$chr = chr($dec); | |
print("$chr"); | |
} | |
print("\n"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment