adventofcode/2017/14/1.pl
2017-12-28 12:14:51 -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;