Partial Permutations

Author: L. Grondin

http://rosalind.info/problems/pper/

Sample input

21 7

Sample output

51200

Source code: pper-grondilu.pl

use v6;

sub pper($n, $k) { [*] $n-$k+1 .. $n }

sub MAIN(Str $input = "21 7") {
    say pper(| $input.split: " ") % 1_000_000;
}