aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus "Holli" Holzer <holli.holzer@gmail.com>2020-09-04 01:36:48 +0200
committerMarkus "Holli" Holzer <holli.holzer@gmail.com>2020-09-04 01:36:48 +0200
commit18d90c7251b84a8c81a1c5fae4852138133a5b33 (patch)
treed350703d10b4c21e4e53d6b1870a8b58687294f6
parent307022f1e22dbc19320739e88977802ddd4cb580 (diff)
downloadperlweeklychallenge-club-18d90c7251b84a8c81a1c5fae4852138133a5b33.tar.gz
perlweeklychallenge-club-18d90c7251b84a8c81a1c5fae4852138133a5b33.tar.bz2
perlweeklychallenge-club-18d90c7251b84a8c81a1c5fae4852138133a5b33.zip
initial
-rw-r--r--challenge-076/markus-holzer/raku/ch-1.raku13
1 files changed, 13 insertions, 0 deletions
diff --git a/challenge-076/markus-holzer/raku/ch-1.raku b/challenge-076/markus-holzer/raku/ch-1.raku
new file mode 100644
index 0000000000..ee20eef772
--- /dev/null
+++ b/challenge-076/markus-holzer/raku/ch-1.raku
@@ -0,0 +1,13 @@
+my $N = 1528;
+
+my @primes = (2..^$N)
+ .grep( *.is-prime );
+
+my @candidates = @primes X @primes;
+
+my @solutions = @candidates
+ .grep( *.sum == $N )
+ .map( *.sort.cache )
+ .unique( with => &[~~] );
+
+.say for @solutions; \ No newline at end of file