]> www.fi.muni.cz Git - aoc.git/blob - 2022/12.pl
Day 25: examining the input
[aoc.git] / 2022 / 12.pl
1 #!/usr/bin/perl -w
2
3 use v5.36;
4 use strict;
5 use experimental 'multidimensional';
6
7 chomp($_ = <>);
8 my $i;
9 s/^.//, $i++ while substr($_, 0, 14) =~ /(.).*\1/;
10 say $i + 14;
11