aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]challenge-346/packy-anderson/elixir/ch-1.exs0
-rwxr-xr-x[-rw-r--r--]challenge-346/packy-anderson/elixir/ch-2.exs0
-rwxr-xr-x[-rw-r--r--]challenge-346/packy-anderson/perl/ch-1.pl0
-rwxr-xr-x[-rw-r--r--]challenge-346/packy-anderson/perl/ch-2.pl0
-rwxr-xr-x[-rw-r--r--]challenge-346/packy-anderson/python/ch-1.py0
-rwxr-xr-x[-rw-r--r--]challenge-346/packy-anderson/python/ch-2.py0
-rwxr-xr-x[-rw-r--r--]challenge-346/packy-anderson/raku/ch-1.raku0
-rwxr-xr-x[-rw-r--r--]challenge-346/packy-anderson/raku/ch-2.raku0
-rw-r--r--challenge-347/packy-anderson/blog.txt0
-rwxr-xr-xchallenge-347/packy-anderson/elixir/ch-1.exs26
-rwxr-xr-xchallenge-347/packy-anderson/elixir/ch-2.exs26
-rwxr-xr-xchallenge-347/packy-anderson/perl/ch-1.pl22
-rwxr-xr-xchallenge-347/packy-anderson/perl/ch-2.pl22
-rwxr-xr-xchallenge-347/packy-anderson/python/ch-1.py28
-rwxr-xr-xchallenge-347/packy-anderson/python/ch-2.py28
-rwxr-xr-xchallenge-347/packy-anderson/raku/ch-1.raku22
-rwxr-xr-xchallenge-347/packy-anderson/raku/ch-2.raku22
17 files changed, 196 insertions, 0 deletions
diff --git a/challenge-346/packy-anderson/elixir/ch-1.exs b/challenge-346/packy-anderson/elixir/ch-1.exs
index b2071accc0..b2071accc0 100644..100755
--- a/challenge-346/packy-anderson/elixir/ch-1.exs
+++ b/challenge-346/packy-anderson/elixir/ch-1.exs
diff --git a/challenge-346/packy-anderson/elixir/ch-2.exs b/challenge-346/packy-anderson/elixir/ch-2.exs
index 0c204fe647..0c204fe647 100644..100755
--- a/challenge-346/packy-anderson/elixir/ch-2.exs
+++ b/challenge-346/packy-anderson/elixir/ch-2.exs
diff --git a/challenge-346/packy-anderson/perl/ch-1.pl b/challenge-346/packy-anderson/perl/ch-1.pl
index b19c60a3a6..b19c60a3a6 100644..100755
--- a/challenge-346/packy-anderson/perl/ch-1.pl
+++ b/challenge-346/packy-anderson/perl/ch-1.pl
diff --git a/challenge-346/packy-anderson/perl/ch-2.pl b/challenge-346/packy-anderson/perl/ch-2.pl
index b825a334a2..b825a334a2 100644..100755
--- a/challenge-346/packy-anderson/perl/ch-2.pl
+++ b/challenge-346/packy-anderson/perl/ch-2.pl
diff --git a/challenge-346/packy-anderson/python/ch-1.py b/challenge-346/packy-anderson/python/ch-1.py
index 368da9f768..368da9f768 100644..100755
--- a/challenge-346/packy-anderson/python/ch-1.py
+++ b/challenge-346/packy-anderson/python/ch-1.py
diff --git a/challenge-346/packy-anderson/python/ch-2.py b/challenge-346/packy-anderson/python/ch-2.py
index c0a6b90780..c0a6b90780 100644..100755
--- a/challenge-346/packy-anderson/python/ch-2.py
+++ b/challenge-346/packy-anderson/python/ch-2.py
diff --git a/challenge-346/packy-anderson/raku/ch-1.raku b/challenge-346/packy-anderson/raku/ch-1.raku
index c16e7d2b52..c16e7d2b52 100644..100755
--- a/challenge-346/packy-anderson/raku/ch-1.raku
+++ b/challenge-346/packy-anderson/raku/ch-1.raku
diff --git a/challenge-346/packy-anderson/raku/ch-2.raku b/challenge-346/packy-anderson/raku/ch-2.raku
index 85f6f0e8a2..85f6f0e8a2 100644..100755
--- a/challenge-346/packy-anderson/raku/ch-2.raku
+++ b/challenge-346/packy-anderson/raku/ch-2.raku
diff --git a/challenge-347/packy-anderson/blog.txt b/challenge-347/packy-anderson/blog.txt
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/challenge-347/packy-anderson/blog.txt
diff --git a/challenge-347/packy-anderson/elixir/ch-1.exs b/challenge-347/packy-anderson/elixir/ch-1.exs
new file mode 100755
index 0000000000..45a0ed2251
--- /dev/null
+++ b/challenge-347/packy-anderson/elixir/ch-1.exs
@@ -0,0 +1,26 @@
+#!/usr/bin/env elixir
+
+defmodule PWC do
+
+ def solution(ints) do
+ IO.puts("Input: @ints = (" <> Enum.join(ints, ", ") <> ")")
+ {sign, explain} = PWC.productSign(ints)
+ IO.puts("Output: " <> to_string(sign) )
+ IO.puts("\n" <> explain)
+ end
+end
+
+IO.puts("Example 1:")
+PWC.solution()
+
+IO.puts("\nExample 2:")
+PWC.solution()
+
+IO.puts("\nExample 3:")
+PWC.solution()
+
+IO.puts("\nExample 4:")
+PWC.solution()
+
+IO.puts("\nExample 5:")
+PWC.solution()
diff --git a/challenge-347/packy-anderson/elixir/ch-2.exs b/challenge-347/packy-anderson/elixir/ch-2.exs
new file mode 100755
index 0000000000..45a0ed2251
--- /dev/null
+++ b/challenge-347/packy-anderson/elixir/ch-2.exs
@@ -0,0 +1,26 @@
+#!/usr/bin/env elixir
+
+defmodule PWC do
+
+ def solution(ints) do
+ IO.puts("Input: @ints = (" <> Enum.join(ints, ", ") <> ")")
+ {sign, explain} = PWC.productSign(ints)
+ IO.puts("Output: " <> to_string(sign) )
+ IO.puts("\n" <> explain)
+ end
+end
+
+IO.puts("Example 1:")
+PWC.solution()
+
+IO.puts("\nExample 2:")
+PWC.solution()
+
+IO.puts("\nExample 3:")
+PWC.solution()
+
+IO.puts("\nExample 4:")
+PWC.solution()
+
+IO.puts("\nExample 5:")
+PWC.solution()
diff --git a/challenge-347/packy-anderson/perl/ch-1.pl b/challenge-347/packy-anderson/perl/ch-1.pl
new file mode 100755
index 0000000000..98a155f02b
--- /dev/null
+++ b/challenge-347/packy-anderson/perl/ch-1.pl
@@ -0,0 +1,22 @@
+#!/usr/bin/env perl
+use v5.40;
+
+sub solution(@arr) {
+ say 'Input: @arr = (' . join(', ', @arr) . ')';
+ say 'Output: (' . join(', ', @arr) . ')';
+}
+
+say "Example 1:";
+solution();
+
+say "\nExample 2:";
+solution();
+
+say "\nExample 3:";
+solution();
+
+say "\nExample 4:";
+solution();
+
+say "\nExample 5:";
+solution();
diff --git a/challenge-347/packy-anderson/perl/ch-2.pl b/challenge-347/packy-anderson/perl/ch-2.pl
new file mode 100755
index 0000000000..98a155f02b
--- /dev/null
+++ b/challenge-347/packy-anderson/perl/ch-2.pl
@@ -0,0 +1,22 @@
+#!/usr/bin/env perl
+use v5.40;
+
+sub solution(@arr) {
+ say 'Input: @arr = (' . join(', ', @arr) . ')';
+ say 'Output: (' . join(', ', @arr) . ')';
+}
+
+say "Example 1:";
+solution();
+
+say "\nExample 2:";
+solution();
+
+say "\nExample 3:";
+solution();
+
+say "\nExample 4:";
+solution();
+
+say "\nExample 5:";
+solution();
diff --git a/challenge-347/packy-anderson/python/ch-1.py b/challenge-347/packy-anderson/python/ch-1.py
new file mode 100755
index 0000000000..d669a661ec
--- /dev/null
+++ b/challenge-347/packy-anderson/python/ch-1.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
+
+def distinctAverages(nums):
+ pass
+
+def int_join(joiner, arr):
+ return joiner.join(map(str, arr))
+
+def solution(nums):
+ print(f'Input: @nums = ({int_join(", ", nums)})')
+ count, explain = distinctAverages(nums)
+ print(f'Output: {count}\n\n{explain}')
+
+
+print('Example 1:')
+solution()
+
+print('\nExample 2:')
+solution()
+
+print('\nExample 3:')
+solution()
+
+print('\nExample 4:')
+solution()
+
+print('\nExample 5:')
+solution()
diff --git a/challenge-347/packy-anderson/python/ch-2.py b/challenge-347/packy-anderson/python/ch-2.py
new file mode 100755
index 0000000000..d669a661ec
--- /dev/null
+++ b/challenge-347/packy-anderson/python/ch-2.py
@@ -0,0 +1,28 @@
+#!/usr/bin/env python
+
+def distinctAverages(nums):
+ pass
+
+def int_join(joiner, arr):
+ return joiner.join(map(str, arr))
+
+def solution(nums):
+ print(f'Input: @nums = ({int_join(", ", nums)})')
+ count, explain = distinctAverages(nums)
+ print(f'Output: {count}\n\n{explain}')
+
+
+print('Example 1:')
+solution()
+
+print('\nExample 2:')
+solution()
+
+print('\nExample 3:')
+solution()
+
+print('\nExample 4:')
+solution()
+
+print('\nExample 5:')
+solution()
diff --git a/challenge-347/packy-anderson/raku/ch-1.raku b/challenge-347/packy-anderson/raku/ch-1.raku
new file mode 100755
index 0000000000..53bd47e1a7
--- /dev/null
+++ b/challenge-347/packy-anderson/raku/ch-1.raku
@@ -0,0 +1,22 @@
+#!/usr/bin/env raku
+use v6;
+
+sub solution(@arr) {
+ say 'Input: @arr = (' ~ @arr.join(', ') ~ ')';
+ say 'Output: (' ~ @arr.join(', ') ~ ')';
+}
+
+say "Example 1:";
+solution();
+
+say "\nExample 2:";
+solution();
+
+say "\nExample 3:";
+solution();
+
+say "\nExample 4:";
+solution();
+
+say "\nExample 5:";
+solution();
diff --git a/challenge-347/packy-anderson/raku/ch-2.raku b/challenge-347/packy-anderson/raku/ch-2.raku
new file mode 100755
index 0000000000..53bd47e1a7
--- /dev/null
+++ b/challenge-347/packy-anderson/raku/ch-2.raku
@@ -0,0 +1,22 @@
+#!/usr/bin/env raku
+use v6;
+
+sub solution(@arr) {
+ say 'Input: @arr = (' ~ @arr.join(', ') ~ ')';
+ say 'Output: (' ~ @arr.join(', ') ~ ')';
+}
+
+say "Example 1:";
+solution();
+
+say "\nExample 2:";
+solution();
+
+say "\nExample 3:";
+solution();
+
+say "\nExample 4:";
+solution();
+
+say "\nExample 5:";
+solution();