diff --git a/2016/19/1.pl b/2016/19/1.pl new file mode 100644 index 0000000..d30208f --- /dev/null +++ b/2016/19/1.pl @@ -0,0 +1,13 @@ +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;