aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMohammad S Anwar <Mohammad.Anwar@yahoo.com>2021-03-07 20:45:12 +0000
committerGitHub <noreply@github.com>2021-03-07 20:45:12 +0000
commit6ef336c88951de1cd5d31c279a77fd36ffed862e (patch)
tree68895073bb682069e9735837c499463ec6325b72
parent3b70e470b93f0b3caec877eee08d6f06583adf45 (diff)
parentb4a2cbb5329cf7894281db11a1438169ffdaa2e8 (diff)
downloadperlweeklychallenge-club-6ef336c88951de1cd5d31c279a77fd36ffed862e.tar.gz
perlweeklychallenge-club-6ef336c88951de1cd5d31c279a77fd36ffed862e.tar.bz2
perlweeklychallenge-club-6ef336c88951de1cd5d31c279a77fd36ffed862e.zip
Merge pull request #3680 from Abigail/abigail/week-102
Abigail/week 102
-rw-r--r--challenge-102/abigail/README.md8
-rw-r--r--challenge-102/abigail/blog.txt1
-rw-r--r--challenge-102/abigail/blog1.txt1
-rw-r--r--challenge-102/abigail/c/ch-1.c3
4 files changed, 10 insertions, 3 deletions
diff --git a/challenge-102/abigail/README.md b/challenge-102/abigail/README.md
index 234a9ee34f..155dd42f95 100644
--- a/challenge-102/abigail/README.md
+++ b/challenge-102/abigail/README.md
@@ -59,6 +59,9 @@ feasible.
* [Python](python/ch-1.py)
* [Ruby](ruby/ch-1.rb)
+### Blog
+[Perl Weekly Challenge 102: Rare Numbers](https://wp.me/pcxd30-t7)
+
## [Hash-counting String](https://perlweeklychallenge.org/blog/perl-weekly-challenge-102/#TASK2)
@@ -68,7 +71,7 @@ Write a script to produce Hash-counting string of that length.
The definition of a hash-counting string is as follows:
- the string consists only of digits 0-9 and hashes, `'#'`.
-- there are no two consecutive hashes: `"##"z does not appear in your string
+- there are no two consecutive hashes: `"##"` does not appear in your string
- the last character is a hash
- the number immediately preceding each hash (if it exists) is the position
of that hash in the string, with the position being counted up from 1
@@ -95,3 +98,6 @@ such length-`N` string.
* [Perl](perl/ch-2.pl)
* [Python](python/ch-2.py)
* [Ruby](ruby/ch-2.rb)
+
+### Blog
+[Perl Weekly Challenge 102: Hash-counting String](https://wp.me/pcxd30-tZ)
diff --git a/challenge-102/abigail/blog.txt b/challenge-102/abigail/blog.txt
new file mode 100644
index 0000000000..5410bc1f79
--- /dev/null
+++ b/challenge-102/abigail/blog.txt
@@ -0,0 +1 @@
+https://wp.me/pcxd30-t7
diff --git a/challenge-102/abigail/blog1.txt b/challenge-102/abigail/blog1.txt
new file mode 100644
index 0000000000..1fae841938
--- /dev/null
+++ b/challenge-102/abigail/blog1.txt
@@ -0,0 +1 @@
+https://wp.me/pcxd30-tZ
diff --git a/challenge-102/abigail/c/ch-1.c b/challenge-102/abigail/c/ch-1.c
index 564ffc732a..960eb3e85f 100644
--- a/challenge-102/abigail/c/ch-1.c
+++ b/challenge-102/abigail/c/ch-1.c
@@ -10,13 +10,12 @@
* Run as: cc -o ch-1.o ch-1.c; ./ch-1.o < input-file
*/
-# define NR_OF_KNOWN_RARE_NUMBERS 124
# define MAX_RARE_NUMBER_LENGTH 22
/*
* Create a list of all known rare numbers.
*/
-char * rare_numbers [23];
+char * rare_numbers [MAX_RARE_NUMBER_LENGTH + 1];
int main () {
rare_numbers [ 0] = NULL;