aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrbaggy <js5@sanger.ac.uk>2021-11-16 14:18:30 +0000
committerdrbaggy <js5@sanger.ac.uk>2021-11-16 14:18:30 +0000
commitc1e8f201866be0b88efcf7c53801db80cc844255 (patch)
tree5b1e504be364cdca7d7be48653af8bb60b726278
parent16ecb9d62685bca3a3f7fb5257711f250ed11c61 (diff)
parente11898347c4bba484bc44cd6b7c1ac41beeb1b45 (diff)
downloadperlweeklychallenge-club-c1e8f201866be0b88efcf7c53801db80cc844255.tar.gz
perlweeklychallenge-club-c1e8f201866be0b88efcf7c53801db80cc844255.tar.bz2
perlweeklychallenge-club-c1e8f201866be0b88efcf7c53801db80cc844255.zip
Merge branch 'master' of github.com:drbaggy/perlweeklychallenge-club
-rw-r--r--challenge-139/james-smith/README.md3
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;
}