aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbigail <abigail@abigail.be>2021-05-30 15:53:23 +0200
committerAbigail <abigail@abigail.be>2021-05-30 15:53:23 +0200
commit4a8f8b846b6a8b6cd25025cac07a43ffa8f6abe0 (patch)
tree2b0f990b6e6a07194ee5daa33e3d1043164d95e8
parent627209bce4d1c1d616d3d24faa176733805110ae (diff)
downloadperlweeklychallenge-club-4a8f8b846b6a8b6cd25025cac07a43ffa8f6abe0.tar.gz
perlweeklychallenge-club-4a8f8b846b6a8b6cd25025cac07a43ffa8f6abe0.tar.bz2
perlweeklychallenge-club-4a8f8b846b6a8b6cd25025cac07a43ffa8f6abe0.zip
Link to blog for week 114, part 1
-rw-r--r--challenge-114/abigail/README.md1
-rw-r--r--challenge-114/abigail/blog.txt1
-rw-r--r--challenge-114/abigail/perl/ch-1.pl24
3 files changed, 4 insertions, 22 deletions
diff --git a/challenge-114/abigail/README.md b/challenge-114/abigail/README.md
index ba6d2722ec..174d509623 100644
--- a/challenge-114/abigail/README.md
+++ b/challenge-114/abigail/README.md
@@ -22,6 +22,7 @@ Output: 1001
* [Perl](perl/ch-1.pl)
### Blog
+[Next Palindrome Number](https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-114-1.html)
## [Higher Integer Set Bits](https://perlweeklychallenge.org/blog/perl-weekly-challenge-114/#TASK2)
diff --git a/challenge-114/abigail/blog.txt b/challenge-114/abigail/blog.txt
new file mode 100644
index 0000000000..087a442f76
--- /dev/null
+++ b/challenge-114/abigail/blog.txt
@@ -0,0 +1 @@
+https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-114-1.html
diff --git a/challenge-114/abigail/perl/ch-1.pl b/challenge-114/abigail/perl/ch-1.pl
index 4c1d752fed..510376da90 100644
--- a/challenge-114/abigail/perl/ch-1.pl
+++ b/challenge-114/abigail/perl/ch-1.pl
@@ -18,28 +18,8 @@ use experimental 'lexical_subs';
#
#
-# We are considering the following cases to determine the next
-# palindromic integer:
-#
-# - If the number consists of just 9s, we add 2 to the number, resulting
-# in 100001, where we have 1 less 0 than we had 9s.
-# - Else, split the number into three parts: (NNNN)(M)(PPPP), where
-# the first and third part are of equal lengths, and M is zero or one
-# digit (zero digits of the input number is of even length, else the
-# middle part is just one digit).
-#
-# Define nnnn as the reverse of NNNN,
-# pppp as the reverse of PPPP,
-# QQQQ as NNNN + 1,
-# qqqq as the reverse of QQQQ,
-# m = M + 1 (if M is one digit long)
-#
-# Now:
-# - If nnnn > PPPP, then result is "NNNNMnnnn", else
-# - If M is one digit long, then:
-# - If M < 9, then the result is "NNNNmnnnn", else
-# - the result is "QQQQ0qqqq", else
-# - The result is "QQQQqqqq".
+# See https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-114-1.html
+# for a description of the algorithm.
#
while (<>) {