]> www.fi.muni.cz Git - aoc.git/blob - 2016/13.pl
Day 25: examining the input
[aoc.git] / 2016 / 13.pl
1 #!/usr/bin/perl -w
2
3 use strict;
4 use v5.30;
5
6 my $count;
7
8 while (<>) {
9         chomp;
10         next if /\[[^\]]*(\w)(?!\1)(\w)\2\1/;
11         next if !/(\w)(?!\1)(\w)\2\1/;
12         $count++;
13         say;
14 }
15
16 say $count;