From e11898347c4bba484bc44cd6b7c1ac41beeb1b45 Mon Sep 17 00:00:00 2001 From: James Smith Date: Tue, 16 Nov 2021 14:16:40 +0000 Subject: Update README.md --- challenge-139/james-smith/README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/challenge-139/james-smith/README.md b/challenge-139/james-smith/README.md index 99f1355dc8..9daa5abd0d 100644 --- a/challenge-139/james-smith/README.md +++ b/challenge-139/james-smith/README.md @@ -77,8 +77,7 @@ This gives us the function below to get the length of the recurring sequence. ``` sub rec_len { my( $D, $N, $s ) = ( shift, 1, '' ); - ($s,$N) = $D>$N ? ($s.0, $N.0) - : ($s.int($N/$D),($N%$D).0) for 0 .. 2*$D; + ( $s, $N ) = ( $s.int($N/$D), ($N%$D).0 ) for 0 .. 2*$D; $s =~ m{(\d+?)\1+$}; length $1; } -- cgit