aboutsummaryrefslogtreecommitdiff
path: root/challenge-044/feng-chang
diff options
context:
space:
mode:
author冯昶 <fengchang@novel-supertv.com>2021-02-22 22:25:54 +0800
committer冯昶 <fengchang@novel-supertv.com>2021-02-22 22:25:54 +0800
commit3cc47d00aee13d50c872499cecf574539a4cbe2a (patch)
tree77b6f6a1e8cae075e3c70fa1b4f82e85aa390743 /challenge-044/feng-chang
parent572994875f5972916deabeb84f3648ac4640107b (diff)
downloadperlweeklychallenge-club-3cc47d00aee13d50c872499cecf574539a4cbe2a.tar.gz
perlweeklychallenge-club-3cc47d00aee13d50c872499cecf574539a4cbe2a.tar.bz2
perlweeklychallenge-club-3cc47d00aee13d50c872499cecf574539a4cbe2a.zip
challenge 101, raku solutions
Diffstat (limited to 'challenge-044/feng-chang')
-rwxr-xr-xchallenge-044/feng-chang/ch-1.raku14
1 files changed, 14 insertions, 0 deletions
diff --git a/challenge-044/feng-chang/ch-1.raku b/challenge-044/feng-chang/ch-1.raku
new file mode 100755
index 0000000000..6cf53261a6
--- /dev/null
+++ b/challenge-044/feng-chang/ch-1.raku
@@ -0,0 +1,14 @@
+#!/bin/env raku
+
+use MONKEY-SEE-NO-EVAL;
+
+my @even = 0, 2 ... 16;
+my @odd = 1, 3 ... 15;
+
+([X] (['', '+', '-'] xx 8)).hyper(degree => 12).map({
+ my @a;
+ @a[@even] = '123456789'.comb;
+ @a[@odd] = $_;
+ my $s = @a.join;
+ put $s if EVAL($s) == 100;
+});