adventofcode/day1/day1.pl
Yanick Champoux ea12a2762e day 1
2017-12-01 20:28:26 -05:00

10 lines
120 B
Perl

#!/usr/bin/env perl -n
use 5.20.0;
use List::AllUtils qw/ sum /;
chomp;
$_ .= substr $_, 0, 1;
say sum /(.)(?=\1)/g;