From: Jan "Yenya" Kasprzak Date: Tue, 6 Dec 2022 06:58:33 +0000 (+0100) Subject: Day 6: rewrite after misreading the task X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?p=aoc.git;a=commitdiff_plain;h=bc9239b4ec00e915ec0d460f86272ebefd89670a Day 6: rewrite after misreading the task --- diff --git a/2022/12a.pl b/2022/12a.pl new file mode 100755 index 0000000..52d31de --- /dev/null +++ b/2022/12a.pl @@ -0,0 +1,11 @@ +#!/usr/bin/perl -w + +use v5.36; +use strict; +use experimental 'multidimensional'; + +chomp($_ = <>); +my $i; +s/^.//, $i++ while substr($_, 0, 14) =~ /(.).*\1/; +say $i + 14; +