diff options
| author | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2022-01-17 20:44:37 +0000 |
|---|---|---|
| committer | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2022-01-17 20:44:37 +0000 |
| commit | 9c9cb3dcb25537525090902ca4b8d10ae17e8960 (patch) | |
| tree | 344cc1b466e6c1e620687185329baa3ab43536f6 /challenge-148/bruce-gray/README | |
| parent | ee9f8c8288170dc442f8199fc1d2f7e45ac4377c (diff) | |
| download | perlweeklychallenge-club-9c9cb3dcb25537525090902ca4b8d10ae17e8960.tar.gz perlweeklychallenge-club-9c9cb3dcb25537525090902ca4b8d10ae17e8960.tar.bz2 perlweeklychallenge-club-9c9cb3dcb25537525090902ca4b8d10ae17e8960.zip | |
- Added template for week 148.
Diffstat (limited to 'challenge-148/bruce-gray/README')
| -rw-r--r-- | challenge-148/bruce-gray/README | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/challenge-148/bruce-gray/README b/challenge-148/bruce-gray/README new file mode 100644 index 0000000000..7acad0424d --- /dev/null +++ b/challenge-148/bruce-gray/README @@ -0,0 +1,25 @@ +Solutions by Bruce Gray for https://theweeklychallenge.org/blog/perl-weekly-challenge-147/ + +NOTE: Both Task#2 solutions deliberately avoid the need for is_pentagon_number(), +[as per quadratic transformation of `n(3n-1)/2 = P` +to `sqrt(24P + 1) must be 5(mod 6)` and `24P + 1 must be a perfect square`] +, just for fun. + +Sample runs: +$ perl perl/ch-1.pl + 2 3 5 7 13 17 23 37 43 47 53 67 73 83 97 103 107 113 137 167 + 2 3 5 7 13 17 23 37 43 47 53 67 73 83 97 113 137 167 173 197 + +$ raku raku/ch-1.raku + 2 3 5 7 13 17 23 37 43 47 53 67 73 83 97 103 107 113 137 167 + 2 3 5 7 13 17 23 37 43 47 53 67 73 83 97 113 137 167 173 197 + +$ perl perl/ch-2.pl + 7042750 5482660 + +$ time raku raku/ch-2.raku + 7042750 5482660 + + real 0m2.432s + user 0m2.534s + sys 0m0.067s |
