diff --git a/17/1.pl b/17/1.pl new file mode 100644 index 0000000..8640c57 --- /dev/null +++ b/17/1.pl @@ -0,0 +1,14 @@ +use 5.20.0; + +my $i = 380; + +my @v = (0); +my $p = 0; + +use DDP; +for(1..2017) { + $p = ( 1 + $p + $i ) % @v; + splice @v, $p, 0, $_; +} + +p @v;