diff options
| -rw-r--r-- | challenge-054/simon-proctor/raku/ch-1.p6 | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/challenge-054/simon-proctor/raku/ch-1.p6 b/challenge-054/simon-proctor/raku/ch-1.p6 new file mode 100644 index 0000000000..3670fe4fda --- /dev/null +++ b/challenge-054/simon-proctor/raku/ch-1.p6 @@ -0,0 +1,8 @@ +#!/usr/bin/env raku + +use v6; + +#| Print the kth permutation of the numbers from 1 to n +sub MAIN( UInt \n, Int \k where * >= 1 ) { + (1..n).permutations[k-1].join("").say; +} |
