From 51dca5ac55f79545b8e04d9a7298e7cbacaa9872 Mon Sep 17 00:00:00 2001 From: James Smith Date: Wed, 3 Nov 2021 10:45:03 +0000 Subject: Update README.md --- challenge-137/james-smith/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/challenge-137/james-smith/README.md b/challenge-137/james-smith/README.md index f6a5e27564..b32381ed19 100644 --- a/challenge-137/james-smith/README.md +++ b/challenge-137/james-smith/README.md @@ -164,6 +164,8 @@ say $_ foreach sort { $a <=> $b } keys %lychrel; Using this script to generate all candidate Lychrel numbers up to 1 million took approximately `12` seconds. To use the `lychrel_large` routine took approximately 2180 seconds (36 minutes 20 seconds), a speed gain of approximately `180x`. +To 10 million the time taken was approximately 6 minutes. + ### Explanation For every sequence generated above - all the numbers are either not Lychral numbers or candidate Lychral numbers. Once we either get to a palindrome OR reach the "end of the sequence" we can tag every number as either a candidate Lychral number or not. This reduces the number of calculations. -- cgit