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