aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-141/simon-proctor/raku/ch-2.raku9
1 files changed, 9 insertions, 0 deletions
diff --git a/challenge-141/simon-proctor/raku/ch-2.raku b/challenge-141/simon-proctor/raku/ch-2.raku
new file mode 100644
index 0000000000..1bb40b5556
--- /dev/null
+++ b/challenge-141/simon-proctor/raku/ch-2.raku
@@ -0,0 +1,9 @@
+#!/usr/bin/env raku
+
+#| Given a two number M and N find the number of "Like Numbers" can be found
+sub MAIN (
+ UInt \M, #= Integer used to make sub values
+ UInt \N #= Integer subvales of M should be divisible by
+) {
+ M.comb.combinations(1..^(M.codes)).map( *.join() ).grep( * %% N ).elems.say;
+}