You are viewing a single comment's thread. Return to all comments →
What a powerful and flexible language Perl
chomp(($n, $k, $q)=split(/ /,<>)); chomp(my @A=split(/ /,<>)); while(<>){ print $A[($_-$k)%$n],"\n"; }
Circular Array Rotation
You are viewing a single comment's thread. Return to all comments →
What a powerful and flexible language Perl