aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-077/ash/blog.txt1
-rw-r--r--challenge-077/ash/raku/ch-1.raku11
2 files changed, 12 insertions, 0 deletions
diff --git a/challenge-077/ash/blog.txt b/challenge-077/ash/blog.txt
new file mode 100644
index 0000000000..f95ba9e75f
--- /dev/null
+++ b/challenge-077/ash/blog.txt
@@ -0,0 +1 @@
+https://andrewshitov.com/2020/09/07/add-up-fibonacci-numbers-the-weekly-challenge-77-task-1/
diff --git a/challenge-077/ash/raku/ch-1.raku b/challenge-077/ash/raku/ch-1.raku
new file mode 100644
index 0000000000..cdab8466cc
--- /dev/null
+++ b/challenge-077/ash/raku/ch-1.raku
@@ -0,0 +1,11 @@
+#!/usr/bin/env raku
+
+# Task 1 from
+# https://perlweeklychallenge.org/blog/perl-weekly-challenge-077/
+
+# Comments: https://andrewshitov.com/2020/09/07/add-up-fibonacci-numbers-the-weekly-challenge-77-task-1/
+
+my $n = @*ARGS[0] // 42;
+my @fib = 1, 2, * + * ...^ * > $n;
+
+"$_.join(' + ') = $n".put for @fib.combinations.grep(*.sum == $n);