aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Shitov <andy@shitov.ru>2020-09-07 17:40:17 +0200
committerAndrew Shitov <andy@shitov.ru>2020-09-07 17:40:17 +0200
commita11afdf49abe375eb94edf4d3c839e193fff3751 (patch)
tree3deb9167a3301601f8ed07bd49c6cb7491f1cbbc
parent97c8188e223a0724e62df22564e2e95c469cfaf8 (diff)
downloadperlweeklychallenge-club-a11afdf49abe375eb94edf4d3c839e193fff3751.tar.gz
perlweeklychallenge-club-a11afdf49abe375eb94edf4d3c839e193fff3751.tar.bz2
perlweeklychallenge-club-a11afdf49abe375eb94edf4d3c839e193fff3751.zip
ash 77-1
-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);