]> www.fi.muni.cz Git - aoc.git/blob - 2023/29.pl
Day 25: examining the input
[aoc.git] / 2023 / 29.pl
1 #!/usr/bin/perl -w
2
3 use v5.38;
4
5 chomp (my $line = <>);
6
7 my $sum;
8 for (split /,/, $line) {
9         my $n = 0;
10         for (split //) {
11                 $n += ord;
12                 $n *= 17;
13                 $n %= 256;
14         }
15         $sum += $n;
16 }
17 say $sum;
18