adventofcode/2015/05/nice2.pl
Yanick Champoux 67ba17edba day5
2017-12-04 10:46:31 -05:00

9 lines
126 B
Perl

use 5.20.0;
use List::AllUtils qw/ sum /;
say sum map { nice() }<>;
sub nice {
return !!( /(..).*?\1/ and /(.).\1/ );
}