diff options
| author | 冯昶 <seaker@qq.com> | 2021-11-29 19:20:49 +0800 |
|---|---|---|
| committer | 冯昶 <seaker@qq.com> | 2021-11-29 19:20:49 +0800 |
| commit | 08923cde36bfc9a71f9acdf6c8274355c1db9157 (patch) | |
| tree | 1ac1186f2190da88d13670870f9237d0926305f5 | |
| parent | a53828c517ea7368d0efc3f64779bd0853c17330 (diff) | |
| download | perlweeklychallenge-club-08923cde36bfc9a71f9acdf6c8274355c1db9157.tar.gz perlweeklychallenge-club-08923cde36bfc9a71f9acdf6c8274355c1db9157.tar.bz2 perlweeklychallenge-club-08923cde36bfc9a71f9acdf6c8274355c1db9157.zip | |
challenge 141, raku solutions
| -rwxr-xr-x | challenge-141/feng-chang/raku/ch-1.raku | 5 | ||||
| -rwxr-xr-x | challenge-141/feng-chang/raku/ch-2.raku | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/challenge-141/feng-chang/raku/ch-1.raku b/challenge-141/feng-chang/raku/ch-1.raku new file mode 100755 index 0000000000..ba42e19fb3 --- /dev/null +++ b/challenge-141/feng-chang/raku/ch-1.raku @@ -0,0 +1,5 @@ +#!/bin/env raku + +my method divisors(UInt:D $n : --> Seq:D) { (1..$n).grep($n %% *) } + +put (1..∞).grep(*.&divisors == 8)[^10]; diff --git a/challenge-141/feng-chang/raku/ch-2.raku b/challenge-141/feng-chang/raku/ch-2.raku new file mode 100755 index 0000000000..4f47828458 --- /dev/null +++ b/challenge-141/feng-chang/raku/ch-2.raku @@ -0,0 +1,5 @@ +#!/bin/env raku + +sub MAIN(UInt:D \m, UInt:D \n) { + put m.comb.combinations(1 .. m.comb.elems-1)».join.grep(* %% n).elems; +} |
