adventofcode/2016/19/1.pl
2018-02-28 12:24:00 -05:00

14 lines
164 B
Perl

use 5.20.0;
my $input = 3004953;
my @elves = 1..$input;
while( @elves > 1 ) {
say $elves[0];
push @elves, shift @elves;
shift @elves;
}
say @elves;