diff options
| author | Adam Russell <ac.russell@live.com> | 2020-12-13 18:37:10 -0500 |
|---|---|---|
| committer | Adam Russell <ac.russell@live.com> | 2020-12-13 18:37:10 -0500 |
| commit | 9574d750f4be19fd25966be9ad881e14b8d8174c (patch) | |
| tree | adffb719d8d44f11f3367251004fe53089dbd241 /challenge-090 | |
| parent | 25729a15432147223ae0920ff217ec5422544cff (diff) | |
| download | perlweeklychallenge-club-9574d750f4be19fd25966be9ad881e14b8d8174c.tar.gz perlweeklychallenge-club-9574d750f4be19fd25966be9ad881e14b8d8174c.tar.bz2 perlweeklychallenge-club-9574d750f4be19fd25966be9ad881e14b8d8174c.zip | |
updated part 2
Diffstat (limited to 'challenge-090')
| -rw-r--r-- | challenge-090/adam-russell/perl/ch-2.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/challenge-090/adam-russell/perl/ch-2.pl b/challenge-090/adam-russell/perl/ch-2.pl index fb6e4c7919..2654c6476f 100644 --- a/challenge-090/adam-russell/perl/ch-2.pl +++ b/challenge-090/adam-russell/perl/ch-2.pl @@ -14,7 +14,7 @@ sub ethiopian_multiplication{ $x = int($x / 2); $y = $y * 2; push @steps, [$x, $y] if $x % 2 != 0; - }until $steps[-1]->[0] == 1 || $steps[-1]->[1] == 1; + }until $steps[-1]->[0] == 1; for my $step (@steps){ $product += $step->[1]; } |
