]> www.fi.muni.cz Git - aoc.git/commitdiff
Day 6: cleanup
authorJan "Yenya" Kasprzak <kas@fi.muni.cz>
Wed, 21 Dec 2022 07:56:22 +0000 (08:56 +0100)
committerJan "Yenya" Kasprzak <kas@fi.muni.cz>
Wed, 21 Dec 2022 07:56:22 +0000 (08:56 +0100)
2022/11.pl [new file with mode: 0755]
2022/12.pl [moved from 2022/12a.pl with 100% similarity]

diff --git a/2022/11.pl b/2022/11.pl
new file mode 100755 (executable)
index 0000000..955dd52
--- /dev/null
@@ -0,0 +1,11 @@
+#!/usr/bin/perl -w
+
+use v5.36;
+use strict;
+use experimental 'multidimensional';
+
+chomp($_ = <>);
+my $i;
+s/^.//, $i++ while substr($_, 0, 4) =~ /(.).*\1/;
+say $i + 4;
+
similarity index 100%
rename from 2022/12a.pl
rename to 2022/12.pl