diff options
| author | James Smith <js5@sanger.ac.uk> | 2021-11-16 14:16:40 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-11-16 14:16:40 +0000 |
| commit | e11898347c4bba484bc44cd6b7c1ac41beeb1b45 (patch) | |
| tree | 28f48d28ba4de15b1664389205bfaceb11a04684 | |
| parent | ca3d27889cdf87d4610a0acfbb29e83baa0c5b3d (diff) | |
| download | perlweeklychallenge-club-e11898347c4bba484bc44cd6b7c1ac41beeb1b45.tar.gz perlweeklychallenge-club-e11898347c4bba484bc44cd6b7c1ac41beeb1b45.tar.bz2 perlweeklychallenge-club-e11898347c4bba484bc44cd6b7c1ac41beeb1b45.zip | |
Update README.md
| -rw-r--r-- | challenge-139/james-smith/README.md | 3 |
1 files changed, 1 insertions, 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; } |
