From 8ac7cd31bbdc654205d7676c0f9f619ac5e4657e Mon Sep 17 00:00:00 2001 From: Mohammad S Anwar Date: Sat, 12 Sep 2020 20:29:59 +0100 Subject: - Added solutions by Shahed Nooshmand. --- challenge-077/shahed-nooshmand/blog.txt | 1 + challenge-077/shahed-nooshmand/raku/ch-1.raku | 1 + challenge-077/shahed-nooshmand/raku/ch-2.raku | 13 +++++++++++++ 3 files changed, 15 insertions(+) create mode 100644 challenge-077/shahed-nooshmand/blog.txt create mode 100644 challenge-077/shahed-nooshmand/raku/ch-1.raku create mode 100644 challenge-077/shahed-nooshmand/raku/ch-2.raku (limited to 'challenge-077') diff --git a/challenge-077/shahed-nooshmand/blog.txt b/challenge-077/shahed-nooshmand/blog.txt new file mode 100644 index 0000000000..a9f35a075b --- /dev/null +++ b/challenge-077/shahed-nooshmand/blog.txt @@ -0,0 +1 @@ +https://rafraichisso.ir/2020/09/10/pwc-77 diff --git a/challenge-077/shahed-nooshmand/raku/ch-1.raku b/challenge-077/shahed-nooshmand/raku/ch-1.raku new file mode 100644 index 0000000000..74e41fddfd --- /dev/null +++ b/challenge-077/shahed-nooshmand/raku/ch-1.raku @@ -0,0 +1 @@ +raku -e 'say "@*ARGS[0] = {.join(" + ")}" for (1, 2, * + * ...^ * > diff --git a/challenge-077/shahed-nooshmand/raku/ch-2.raku b/challenge-077/shahed-nooshmand/raku/ch-2.raku new file mode 100644 index 0000000000..a4f83af110 --- /dev/null +++ b/challenge-077/shahed-nooshmand/raku/ch-2.raku @@ -0,0 +1,13 @@ +#!/usr/bin/env raku + +my @matrix = + , + , + , + ; + +.say for (^@matrix X ^@matrix[0]).grep: -> ($i, $j) { + @matrix[$i; $j] eq 'X' and not (<1 0 -1> X <1 0 -1>).grep: -> ($x, $y) { + $x | $y and do $_ eq 'X' with @matrix[$i + $x; $j + $y] + } +} -- cgit