From e747e529b3e954f67ceae6c65208112ecd44734f Mon Sep 17 00:00:00 2001 From: Abigail Date: Sun, 4 Apr 2021 02:37:37 +0200 Subject: Fix typo --- challenge-106/abigail/awk/ch-1.gawk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenge-106/abigail/awk/ch-1.gawk b/challenge-106/abigail/awk/ch-1.gawk index ad08cdc38a..97f2f8e3ce 100644 --- a/challenge-106/abigail/awk/ch-1.gawk +++ b/challenge-106/abigail/awk/ch-1.gawk @@ -23,7 +23,7 @@ } # - # Sor the array; for numeric values, this sorts numerically. + # Sort the array; for numeric values, this sorts numerically. # asort(N) -- cgit From d3c5acbc661c1ef98c75e4a9bf2a7c38fda16235 Mon Sep 17 00:00:00 2001 From: Abigail Date: Sun, 4 Apr 2021 15:34:40 +0200 Subject: Link to blog for week 106, part 1 --- challenge-106/abigail/README.md | 2 +- challenge-106/abigail/blog.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 challenge-106/abigail/blog.txt diff --git a/challenge-106/abigail/README.md b/challenge-106/abigail/README.md index 2125b781ac..493e730736 100644 --- a/challenge-106/abigail/README.md +++ b/challenge-106/abigail/README.md @@ -31,7 +31,7 @@ Output: 0 * [Ruby](ruby/ch-1.rb) ### Blog -[]() +[Perl Weekly Challenge 106: Maximum Gap](https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-106-1.html) ## [Decimal String](https://perlweeklychallenge.org/blog/perl-weekly-challenge-106/#TASK2) diff --git a/challenge-106/abigail/blog.txt b/challenge-106/abigail/blog.txt new file mode 100644 index 0000000000..c7419cfd89 --- /dev/null +++ b/challenge-106/abigail/blog.txt @@ -0,0 +1 @@ +https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-106-1.html -- cgit From 4b461cb77f2cdb22c43130398dcbc65cbc6ac996 Mon Sep 17 00:00:00 2001 From: Abigail Date: Sun, 4 Apr 2021 15:51:00 +0200 Subject: Remark we are not dealing with negative numbers in the input --- challenge-106/abigail/README.md | 3 +++ challenge-106/abigail/perl/ch-2.pl | 6 +++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/challenge-106/abigail/README.md b/challenge-106/abigail/README.md index 493e730736..38eaa65584 100644 --- a/challenge-106/abigail/README.md +++ b/challenge-106/abigail/README.md @@ -54,6 +54,9 @@ Output: "0.0(75)" ### Notes +We are assuming the numerator is non-negative, and the denominator +is positive. Dealing with signs is left as an exercise to the reader. + We're creation the decimal expansion of the fraction `$N / $D` by performing long division. diff --git a/challenge-106/abigail/perl/ch-2.pl b/challenge-106/abigail/perl/ch-2.pl index f53e393e9e..a5857147eb 100644 --- a/challenge-106/abigail/perl/ch-2.pl +++ b/challenge-106/abigail/perl/ch-2.pl @@ -17,6 +17,11 @@ use experimental 'lexical_subs'; # Run as: perl ch-2.pl < input-file # +# +# We are assuming the input consists of pairs of non-negative +# integers, with the denominator greater than 0. +# + # # To determine the repeating digits of a fraction, it's very tempting # to use sprintf with a large amount of digits, and see what repeats. @@ -33,7 +38,6 @@ use experimental 'lexical_subs'; # after the 70th, are 0. # - # # We're creation the decimal expansion of the fraction $N / $D # by performing long division. -- cgit From 3340b4885bea84799538f11983001713188b8618 Mon Sep 17 00:00:00 2001 From: Abigail Date: Sun, 4 Apr 2021 18:24:27 +0200 Subject: Links to blog for week 106, part 2 --- challenge-106/abigail/README.md | 2 +- challenge-106/abigail/blog1.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 challenge-106/abigail/blog1.txt diff --git a/challenge-106/abigail/README.md b/challenge-106/abigail/README.md index 38eaa65584..3b4bc6fcf4 100644 --- a/challenge-106/abigail/README.md +++ b/challenge-106/abigail/README.md @@ -105,4 +105,4 @@ Wikipedia](https://en.wikipedia.org/wiki/Repeating_decimal). * [Ruby](ruby/ch-2.rb) ### Blog -[]() +[Perl Weekly Challenge 106: Decimal String](https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-106-2.html) diff --git a/challenge-106/abigail/blog1.txt b/challenge-106/abigail/blog1.txt new file mode 100644 index 0000000000..14de388cf2 --- /dev/null +++ b/challenge-106/abigail/blog1.txt @@ -0,0 +1 @@ +https://abigail.github.io/HTML/Perl-Weekly-Challenge/week-106-2.html -- cgit