Working solution
This commit is contained in:
parent
6836f6e229
commit
3e113b9370
13
2016/19/1.pl
Normal file
13
2016/19/1.pl
Normal file
@ -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;
|
Loading…
Reference in New Issue
Block a user