aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad S Anwar <Mohammad.Anwar@yahoo.com>2021-06-16 19:51:25 +0100
committerGitHub <noreply@github.com>2021-06-16 19:51:25 +0100
commitb1a1111a22b0d905b9fed68603e7f3c5fa44100c (patch)
tree90a1da6f946eae8a117627b8ca9650177555625e
parent8c7bcb2e6e9fb7c70d961676870c596c3ded3b15 (diff)
parentc20f1b8b7fdf9fcab9145c10cce24f006652c113 (diff)
downloadperlweeklychallenge-club-b1a1111a22b0d905b9fed68603e7f3c5fa44100c.tar.gz
perlweeklychallenge-club-b1a1111a22b0d905b9fed68603e7f3c5fa44100c.tar.bz2
perlweeklychallenge-club-b1a1111a22b0d905b9fed68603e7f3c5fa44100c.zip
Merge pull request #4281 from Abigail/abigail/week-117
Abigail/week 117
-rw-r--r--challenge-117/abigail/README.md78
-rw-r--r--challenge-117/abigail/awk/ch-1.awk13
-rw-r--r--challenge-117/abigail/awk/ch-2.awk27
-rw-r--r--challenge-117/abigail/bash/ch-1.sh17
-rw-r--r--challenge-117/abigail/bash/ch-2.sh31
-rw-r--r--challenge-117/abigail/c/ch-1.c27
-rw-r--r--challenge-117/abigail/c/ch-2.c45
-rw-r--r--challenge-117/abigail/lua/ch-1.lua16
-rw-r--r--challenge-117/abigail/lua/ch-2.lua26
-rw-r--r--challenge-117/abigail/node/ch-1.js20
-rw-r--r--challenge-117/abigail/node/ch-2.js27
-rw-r--r--challenge-117/abigail/perl/ch-1.pl36
-rw-r--r--challenge-117/abigail/perl/ch-2.pl56
-rw-r--r--challenge-117/abigail/python/ch-1.py19
-rw-r--r--challenge-117/abigail/python/ch-2.py24
-rw-r--r--challenge-117/abigail/ruby/ch-1.rb18
-rw-r--r--challenge-117/abigail/ruby/ch-2.rb25
-rw-r--r--challenge-117/abigail/t/ctest.ini13
-rw-r--r--challenge-117/abigail/t/input-1-114
-rw-r--r--challenge-117/abigail/t/input-2-11
-rw-r--r--challenge-117/abigail/t/input-2-21
-rw-r--r--challenge-117/abigail/t/input-2-31
-rw-r--r--challenge-117/abigail/t/output-1-1.exp1
-rw-r--r--challenge-117/abigail/t/output-2-1.exp6
-rw-r--r--challenge-117/abigail/t/output-2-2.exp2
-rw-r--r--challenge-117/abigail/t/output-2-3.exp8558
26 files changed, 9072 insertions, 30 deletions
diff --git a/challenge-117/abigail/README.md b/challenge-117/abigail/README.md
index eccf1a6b3b..7a565610d2 100644
--- a/challenge-117/abigail/README.md
+++ b/challenge-117/abigail/README.md
@@ -1,29 +1,32 @@
# Solutions by Abigail
-## [Number Sequence](https://perlweeklychallenge.org/blog/perl-weekly-challenge-116/#TASK1)
+## [Missing Row](https://perlweeklychallenge.org/blog/perl-weekly-challenge-117/#TASK1)
-> You are given a number `$N` >= `10`.
->
-> Write a script to split the given number such that the difference
-> between two consecutive numbers is always 1 and it shouldn't have
-> leading `0`.
->
-> Print the given number if it impossible to split the number.
+> You are given text file with rows numbered `1-15` in random order but
+> there is a catch one row in missing in the file.
-### Example
~~~~
-Input: $N = 1234
-Output: 1,2,3,4
-
-Input: $N = 91011
-Output: 9,10,11
-
-Input: $N = 10203
-Output: 10203 as it is impossible to split satisfying the conditions.
+11, Line Eleven
+1, Line one
+9, Line Nine
+13, Line Thirteen
+2, Line two
+6, Line Six
+8, Line Eight
+10, Line Ten
+7, Line Seven
+4, Line Four
+14, Line Fourteen
+3, Line three
+15, Line Fifteen
+5, Line Five
~~~~
+Write a script to find the missing row number.
+
### Solutions
* [AWK](awk/ch-1.awk)
* [Bash](bash/ch-1.sh)
+* [C](c/ch-1.c)
* [Lua](lua/ch-1.lua)
* [Node.js](node/ch-1.js)
* [Perl](perl/ch-1.pl)
@@ -31,26 +34,41 @@ Output: 10203 as it is impossible to split satisfying the conditions.
* [Ruby](ruby/ch-1.rb)
### Blog
-[Number Sequence](https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-116-1.html)
+[Missing Row](https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-117-1.html)
-## [Sum of Squares](https://perlweeklychallenge.org/blog/perl-weekly-challenge-115/#TASK2)
+## [Find Possible Paths](https://perlweeklychallenge.org/blog/perl-weekly-challenge-115/#TASK2)
-> You are given a number $N >= 10.
+> You are given size of a triangle.
+>
+> Write a script to find all possible paths from top to the bottom
+> right corner.
+>
+> In each step, we can either move horizontally to the right (`H`), or
+> move downwards to the left (`L`) or right (`R`).
>
-> Write a script to find out if the given number `$N` is such that
-> sum of squares of all digits is a perfect square.
-> Print `1` if it is otherwise `0`.
+> BONUS: Try if it can handle triangle of size `10` or `20`.
### Examples
~~~~
-Input: $N = 34
-Ouput: 1 as 3^2 + 4^2 => 9 + 16 => 25 => 5^2
+Input: $N = 2
+
+ S
+ / \
+ / _ \
+ /\ /\
+ /__\ /__\ E
+
+Output: RR, LHR, LHLH, LLHH, RLH, LRH
+~~~~
+
+~~~~
+Input: $N = 1
-Input: $N = 50
-Output: 1 as 5^2 + 0^2 => 25 + 0 => 25 => 5^2
+ S
+ / \
+ / _ \ E
-Input: $N = 52
-Output: 0 as 5^2 + 2^2 => 25 + 4 => 29
+Output: R, LH
~~~~
### Solutions
@@ -64,4 +82,4 @@ Output: 0 as 5^2 + 2^2 => 25 + 4 => 29
* [Ruby](ruby/ch-2.rb)
### Blog
-[Sum of Squares](https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-116-2.html)
+[Find Possible Paths](https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-117-2.html)
diff --git a/challenge-117/abigail/awk/ch-1.awk b/challenge-117/abigail/awk/ch-1.awk
new file mode 100644
index 0000000000..d6721a1bbe
--- /dev/null
+++ b/challenge-117/abigail/awk/ch-1.awk
@@ -0,0 +1,13 @@
+#!/usr/bin/awk
+
+#
+# See ../README.md
+#
+
+#
+# Run as: awk -f ch-1.awk < input-file
+#
+
+BEGIN {SUM_15 = 120}
+ {sum += $1}
+END {print SUM_15 - sum}
diff --git a/challenge-117/abigail/awk/ch-2.awk b/challenge-117/abigail/awk/ch-2.awk
new file mode 100644
index 0000000000..e401f2360d
--- /dev/null
+++ b/challenge-117/abigail/awk/ch-2.awk
@@ -0,0 +1,27 @@
+#!/usr/bin/awk
+
+#
+# See ../README.md
+#
+
+#
+# Run as: awk -f ch-2.awk < input-file
+#
+
+function steps (x, y, path) {
+ if (x == 0 && y == 0) {
+ print path
+ return
+ }
+ if (x > 0) {
+ steps(x - 1, y, path "R")
+ steps(x - 1, y + 1, path "L")
+ }
+ if (y > 0) {
+ steps(x, y - 1, path "H")
+ }
+}
+
+{
+ steps($1, 0, "")
+}
diff --git a/challenge-117/abigail/bash/ch-1.sh b/challenge-117/abigail/bash/ch-1.sh
new file mode 100644
index 0000000000..e7a906ef56
--- /dev/null
+++ b/challenge-117/abigail/bash/ch-1.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+#
+# See ../README.md
+#
+
+#
+# Run as: bash ch-1.sh < input-file
+#
+
+set -f
+
+IFS=","
+
+SUM_15=120
+while read number tail; do ((sum += number)); done
+echo $((SUM_15 - sum))
diff --git a/challenge-117/abigail/bash/ch-2.sh b/challenge-117/abigail/bash/ch-2.sh
new file mode 100644
index 0000000000..a5a5593dad
--- /dev/null
+++ b/challenge-117/abigail/bash/ch-2.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+#
+# See ../README.md
+#
+
+#
+# Run as: bash ch-2.sh < input-file
+#
+
+set -f
+
+function steps () {
+ local x=$1
+ local y=$2
+ local path=$3
+ if ((x == 0 && y == 0))
+ then echo $path
+ return
+ fi
+ if ((x > 0))
+ then steps $((x - 1)) $y ${path}R
+ steps $((x - 1)) $((y + 1)) ${path}L
+ fi
+ if ((y > 0))
+ then steps $x $((y - 1)) ${path}H
+ fi
+}
+
+read number
+steps $number 0 ""
diff --git a/challenge-117/abigail/c/ch-1.c b/challenge-117/abigail/c/ch-1.c
new file mode 100644
index 0000000000..e1d41fc52c
--- /dev/null
+++ b/challenge-117/abigail/c/ch-1.c
@@ -0,0 +1,27 @@
+# include <stdlib.h>
+# include <stdio.h>
+# include <string.h>
+
+/*
+ * See ../README.md
+ */
+
+/*
+ * Run as: cc -o ch-1.o ch-1.c; ./ch-1.o < input-file
+ */
+# define SUM_15 120
+
+int main (void) {
+ char * line = NULL;
+ size_t len = 0;
+ size_t str_len;
+ int sum = 0;
+
+ while ((str_len = getline (&line, &len, stdin)) != -1) {
+ sum += atol (line);
+ }
+ printf ("%d\n", SUM_15 - sum);
+ free (line);
+
+ return (0);
+}
diff --git a/challenge-117/abigail/c/ch-2.c b/challenge-117/abigail/c/ch-2.c
new file mode 100644
index 0000000000..7fe29480dc
--- /dev/null
+++ b/challenge-117/abigail/c/ch-2.c
@@ -0,0 +1,45 @@
+# include <stdlib.h>
+# include <stdio.h>
+# include <string.h>
+
+/*
+ * See ../README.md
+ */
+
+/*
+ * Run as: cc -o ch-2.o ch-2.c; ./ch-2.o < input-file
+ */
+
+void steps (int x, int y, char * path, size_t l) {
+ if (x == 0 && y == 0) {
+ printf ("%s\n", path);
+ return;
+ }
+ if (x > 0) {
+ path [l] = 'R';
+ path [l + 1] = '\0';
+ steps (x - 1, y, path, l + 1);
+ path [l] = 'L';
+ path [l + 1] = '\0';
+ steps (x - 1, y + 1, path, l + 1);
+ }
+ if (y > 0) {
+ path [l] = 'H';
+ path [l + 1] = '\0';
+ steps (x, y - 1, path, l + 1);
+ }
+}
+
+int main (void) {
+ int size;
+ if (scanf ("%d", &size) == 1) {
+ char * path;
+ if ((path = (char *) malloc ((size + 1) * sizeof (char))) == NULL) {
+ perror ("Malloc failed");
+ exit (1);
+ }
+ path [0] = '\0';
+ steps (size, 0, path, 0);
+ }
+ return (0);
+}
diff --git a/challenge-117/abigail/lua/ch-1.lua b/challenge-117/abigail/lua/ch-1.lua
new file mode 100644
index 0000000000..52dbc081b4
--- /dev/null
+++ b/challenge-117/abigail/lua/ch-1.lua
@@ -0,0 +1,16 @@
+#!/opt/local/bin/lua
+
+--
+-- See ../README.md
+--
+
+--
+-- Run as: lua ch-1.lua < input-file
+--
+
+local SUM_15 = 120
+local sum = 0
+for line in io . lines () do
+ sum = sum + tonumber (line : match ("%d+"))
+end
+print (SUM_15 - sum)
diff --git a/challenge-117/abigail/lua/ch-2.lua b/challenge-117/abigail/lua/ch-2.lua
new file mode 100644
index 0000000000..bfe11d74d3
--- /dev/null
+++ b/challenge-117/abigail/lua/ch-2.lua
@@ -0,0 +1,26 @@
+#!/opt/local/bin/lua
+
+--
+-- See ../README.md
+--
+
+--
+-- Run as: lua ch-2.lua < input-file
+--
+
+function steps (x, y, path)
+ if x == 0 and y == 0
+ then print (path)
+ return
+ end
+ if x > 0
+ then steps (x - 1, y, path .. "R")
+ steps (x - 1, y + 1, path .. "L")
+ end
+ if y > 0
+ then steps (x, y - 1, path .. "H")
+ end
+end
+
+
+steps (tonumber (io . read ()), 0, "")
diff --git a/challenge-117/abigail/node/ch-1.js b/challenge-117/abigail/node/ch-1.js
new file mode 100644
index 0000000000..eee9ce7ee1
--- /dev/null
+++ b/challenge-117/abigail/node/ch-1.js
@@ -0,0 +1,20 @@
+#!/usr/local/bin/node
+
+//
+// See ../README.md
+//
+
+//
+// Run as: node ch-1.js < input-file
+//
+
+let SUM_15 = 120
+let sum = 0
+
+ require ('readline')
+. createInterface ({input: process . stdin})
+. on ('line', line => {
+ let [num] = line . split (/,/)
+ sum +=+ num
+})
+. on ('close', () => console . log (SUM_15 - sum))
diff --git a/challenge-117/abigail/node/ch-2.js b/challenge-117/abigail/node/ch-2.js
new file mode 100644
index 0000000000..2cc510bd69
--- /dev/null
+++ b/challenge-117/abigail/node/ch-2.js
@@ -0,0 +1,27 @@
+#!/usr/local/bin/node
+
+//
+// See ../README.md
+//
+
+//
+// Run as: node ch-2.js < input-file
+//
+
+function steps (x, y, path) {
+ if (x == 0 && y == 0) {
+ console . log (path)
+ return
+ }
+ if (x > 0) {
+ steps (x - 1, y, path + "R")
+ steps (x - 1, y + 1, path + "L")
+ }
+ if (y > 0) {
+ steps (x, y - 1, path + "H")
+ }
+}
+
+ require ('readline')
+. createInterface ({input: process . stdin})
+. on ('line', number => steps (+number, 0, ""))
diff --git a/challenge-117/abigail/perl/ch-1.pl b/challenge-117/abigail/perl/ch-1.pl
new file mode 100644
index 0000000000..3c805b2d36
--- /dev/null
+++ b/challenge-117/abigail/perl/ch-1.pl
@@ -0,0 +1,36 @@
+#!/opt/perl/bin/perl
+
+use 5.032;
+
+use strict;
+no warnings; # Yeah.
+
+use experimental 'signatures';
+use experimental 'lexical_subs';
+
+#
+# See ../README.md
+#
+
+#
+# Run as: perl ch-1.pl < input-file
+#
+# The first 15 numbers sum to 120. So, if we sum the numbers from the
+# input, and subtract that from 120, we get the missing number.
+#
+# We make use of the fact that if we use a scalar as a number, Perl will
+# try its best to turn that scalar into a number -- by looking if the
+# beginning of the string looks like a number (and to use the value of
+# that number). Warnings need to be surpressed though.
+#
+
+use List::Util qw [sum];
+
+say 120 - sum <>;
+
+#
+# An alternative one-liner, with no external modules, nor any hard
+# coded dependency of the number of lines in the file:
+#
+
+# perl -nE '$;+=$.-$_;END{say$.+1+$;}'
diff --git a/challenge-117/abigail/perl/ch-2.pl b/challenge-117/abigail/perl/ch-2.pl
new file mode 100644
index 0000000000..cac9bfe888
--- /dev/null
+++ b/challenge-117/abigail/perl/ch-2.pl
@@ -0,0 +1,56 @@
+#!/opt/perl/bin/perl
+
+use 5.032;
+
+use strict;
+use warnings;
+no warnings 'syntax';
+
+use experimental 'signatures';
+use experimental 'lexical_subs';
+
+#
+# See ../README.md
+#
+
+#
+# Run as: perl ch-2.pl < input-file
+#
+
+#
+# Consider the nodes in the triangle to coordinates. The top of the
+# triangle has coordinates ($N, 0), the bottom right has coordinates (0, 0).
+# The bottom left will have coordinates (0, $N).
+#
+# We now make a recursive method, "steps", which takes three arguments:
+# the coordinates of the current point, and the steps we took to get
+# there. The first call is "steps ($N, 0, '')": starting at the top,
+# and we did not make any steps to get there.
+#
+# Now, if we are at (0, 0), we print the path we took to get there.
+#
+# Else, we recurse up to three times:
+# - Unless we are at the bottom row ($x == 0), we take a step
+# down-right. The first coordinate decreases by one, while
+# the second stays the same.
+# - Unless we are at the bottom row ($x == 0), we take a step
+# down-left. The first coordinate decreases by one, while
+# we increment the second by one.
+# - Unless we are at the right end of a row ($y == 0), we take
+# a step to the right. The first coordinate stays the same,
+# the second decreases by one.
+# In each of the calls, we add the direction we took ("R", "L", or "H"),
+# to path.
+#
+#
+# We will be reading a single line of input ($N)
+#
+
+sub steps ($x, $y, $path) {
+ say $path if $x == $y == 0;
+ steps ($x - 1, $y, $path . "R") if $x > 0;
+ steps ($x - 1, $y + 1, $path . "L") if $x > 0;
+ steps ($x, $y - 1, $path . "H") if $y > 0;
+}
+
+steps (<>, 0, "");
diff --git a/challenge-117/abigail/python/ch-1.py b/challenge-117/abigail/python/ch-1.py
new file mode 100644
index 0000000000..6b6da28640
--- /dev/null
+++ b/challenge-117/abigail/python/ch-1.py
@@ -0,0 +1,19 @@
+#!/opt/local/bin/python
+
+#
+# See ../README.md
+#
+
+#
+# Run as: python ch-1.py < input-file
+#
+
+import fileinput
+
+sum = 0
+SUM_15 = 120
+
+for line in fileinput . input ():
+ sum = sum + int ((line . split (",")) [0])
+
+print (SUM_15 - sum)
diff --git a/challenge-117/abigail/python/ch-2.py b/challenge-117/abigail/python/ch-2.py
new file mode 100644
index 0000000000..c52987fee8
--- /dev/null
+++ b/challenge-117/abigail/python/ch-2.py
@@ -0,0 +1,24 @@
+#!/opt/local/bin/python
+
+#
+# See ../README.md
+#
+
+#
+# Run as: python ch-2.py < input-file
+#
+
+import sys
+
+def steps (x, y, path):
+ if x == 0 and y == 0:
+ print (path)
+ return
+ if x > 0:
+ steps (x - 1, y, path + "R")
+ steps (x - 1, y + 1, path + "L")
+ if y > 0:
+ steps (x, y - 1, path + "H")
+
+
+steps (int (sys . stdin . readline ()), 0, "")
diff --git a/challenge-117/abigail/ruby/ch-1.rb b/challenge-117/abigail/ruby/ch-1.rb
new file mode 100644
index 0000000000..73020122d4
--- /dev/null
+++ b/challenge-117/abigail/ruby/ch-1.rb
@@ -0,0 +1,18 @@
+#!/usr/bin/ruby
+
+#
+# See ../README.md
+#
+
+#
+# Run as: ruby ch-1.rb < input-file
+#
+
+sum = 0
+SUM_15 = 120
+ARGF . each_line do
+ |line|
+ sum += ((line . split (/,/)) [0]) . to_i
+end
+
+puts (SUM_15 - sum)
diff --git a/challenge-117/abigail/ruby/ch-2.rb b/challenge-117/abigail/ruby/ch-2.rb
new file mode 100644
index 0000000000..d80f89616b
--- /dev/null
+++ b/challenge-117/abigail/ruby/ch-2.rb
@@ -0,0 +1,25 @@
+#!/usr/bin/ruby
+
+#
+# See ../README.md
+#
+
+#
+# Run as: ruby ch-2.rb < input-file
+#
+
+def steps (x, y, path)
+ if x == 0 && y == 0
+ then puts (path)
+ return
+ end
+ if x > 0
+ then steps(x - 1, y, path + "R")
+ steps(x - 1, y + 1, path + "L")
+ end
+ if y > 0
+ then steps(x, y - 1, path + "H")
+ end
+end
+
+steps($stdin . read . to_i, 0, "")
diff --git a/challenge-117/abigail/t/ctest.ini b/challenge-117/abigail/t/ctest.ini
new file mode 100644
index 0000000000..f59a91c7b1
--- /dev/null
+++ b/challenge-117/abigail/t/ctest.ini
@@ -0,0 +1,13 @@
+#
+# Configuration file for running tests, using ctest.
+# See https://github.com/Abigail/Misc/blob/master/ctest
+#
+
+[names]
+1-1 = Given Example
+2-1 = $N = 2
+2-2 = $N = 1
+2-3 = $N = 7
+
+[challenges/2]
+sort = a
diff --git a/challenge-117/abigail/t/input-1-1 b/challenge-117/abigail/t/input-1-1
new file mode 100644
index 0000000000..5b9d9ab1ce
--- /dev/null
+++ b/challenge-117/abigail/t/input-1-1
@@ -0,0 +1,14 @@
+11, Line Eleven
+1, Line one
+9, Line Nine
+13, Line Thirteen
+2, Line two
+6, Line Six
+8, Line Eight
+10, Line Ten
+7, Line Seven
+4, Line Four
+14, Line Fourteen
+3, Line three
+15, Line Fifteen
+5, Line Five
diff --git a/challenge-117/abigail/t/input-2-1 b/challenge-117/abigail/t/input-2-1
new file mode 100644
index 0000000000..0cfbf08886
--- /dev/null
+++ b/challenge-117/abigail/t/input-2-1
@@ -0,0 +1 @@
+2
diff --git a/challenge-117/abigail/t/input-2-2 b/challenge-117/abigail/t/input-2-2
new file mode 100644
index 0000000000..d00491fd7e
--- /dev/null
+++ b/challenge-117/abigail/t/input-2-2
@@ -0,0 +1 @@
+1
diff --git a/challenge-117/abigail/t/input-2-3 b/challenge-117/abigail/t/input-2-3
new file mode 100644
index 0000000000..7f8f011eb7
--- /dev/null
+++ b/challenge-117/abigail/t/input-2-3
@@ -0,0 +1 @@
+7
diff --git a/challenge-117/abigail/t/output-1-1.exp b/challenge-117/abigail/t/output-1-1.exp
new file mode 100644
index 0000000000..48082f72f0
--- /dev/null
+++ b/challenge-117/abigail/t/output-1-1.exp
@@ -0,0 +1 @@
+12
diff --git a/challenge-117/abigail/t/output-2-1.exp b/challenge-117/abigail/t/output-2-1.exp
new file mode 100644
index 0000000000..6513ac7cf1
--- /dev/null
+++ b/challenge-117/abigail/t/output-2-1.exp
@@ -0,0 +1,6 @@
+LHLH
+LHR
+LLHH
+LRH
+RLH
+RR
diff --git a/challenge-117/abigail/t/output-2-2.exp b/challenge-117/abigail/t/output-2-2.exp
new file mode 100644
index 0000000000..29de8c6f99
--- /dev/null
+++ b/challenge-117/abigail/t/output-2-2.exp
@@ -0,0 +1,2 @@
+LH
+R
diff --git a/challenge-117/abigail/t/output-2-3.exp b/challenge-117/abigail/t/output-2-3.exp
new file mode 100644
index 0000000000..a80fef21cd
--- /dev/null
+++ b/challenge-117/abigail/t/output-2-3.exp
@@ -0,0 +1,8558 @@
+LHLHLHLHLHLHLH
+LHLHLHLHLHLHR
+LHLHLHLHLHLLHH
+LHLHLHLHLHLRH
+LHLHLHLHLHRLH
+LHLHLHLHLHRR
+LHLHLHLHLLHHLH
+LHLHLHLHLLHHR
+LHLHLHLHLLHLHH
+LHLHLHLHLLHRH
+LHLHLHLHLLLHHH
+LHLHLHLHLLRHH
+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