adventofcode/2017/05/maze.pl

14 lines
158 B
Perl
Raw Normal View History

2017-12-05 17:47:22 +00:00
use 5.20.0;
my @maze = <>;
my $position = 0;
my $steps = 0;
while( $position < @maze ) {
$steps++;
$position += $maze[$position]++;
}
say $steps;