diff options
| author | Mohammad S Anwar <Mohammad.Anwar@yahoo.com> | 2020-09-07 16:50:13 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-07 16:50:13 +0100 |
| commit | a2be3866d139916ea2788d69a60999379f520be6 (patch) | |
| tree | 3deb9167a3301601f8ed07bd49c6cb7491f1cbbc | |
| parent | 97c8188e223a0724e62df22564e2e95c469cfaf8 (diff) | |
| parent | a11afdf49abe375eb94edf4d3c839e193fff3751 (diff) | |
| download | perlweeklychallenge-club-a2be3866d139916ea2788d69a60999379f520be6.tar.gz perlweeklychallenge-club-a2be3866d139916ea2788d69a60999379f520be6.tar.bz2 perlweeklychallenge-club-a2be3866d139916ea2788d69a60999379f520be6.zip | |
Merge pull request #2230 from ash/ash-076
ash 77-1
| -rw-r--r-- | challenge-077/ash/blog.txt | 1 | ||||
| -rw-r--r-- | challenge-077/ash/raku/ch-1.raku | 11 |
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); |
