adventofcode/14/1.pl
Yanick Champoux 1f0c8ef911 day14
2017-12-14 13:58:00 -05:00

15 lines
238 B
Perl

use 5.20.0;
use lib '.';
use hash;
my $key = 'stpzcrnm';
use List::AllUtils qw/ sum /;
say sum
map { split '' }
map { sprintf "%04b", $_ }
map { hex }
map { split '' }
map { knot_hash( join '-', $key, $_) } 0..127;