diff options
| author | CY Fung <fungcheokyin@gmail.com> | 2023-12-06 07:17:40 +0800 |
|---|---|---|
| committer | CY Fung <fungcheokyin@gmail.com> | 2023-12-06 07:17:40 +0800 |
| commit | a082cea38f18371298c0309224afcd88fde2f4d9 (patch) | |
| tree | be3fcdfc82fd46d0939ff1f04d3304e95e7151be | |
| parent | 9f45d7243c2c8db9f7b9c7b079f358965f14b6b2 (diff) | |
| download | perlweeklychallenge-club-a082cea38f18371298c0309224afcd88fde2f4d9.tar.gz perlweeklychallenge-club-a082cea38f18371298c0309224afcd88fde2f4d9.tar.bz2 perlweeklychallenge-club-a082cea38f18371298c0309224afcd88fde2f4d9.zip | |
fix
| -rw-r--r-- | challenge-246/cheok-yin-fung/perl/ch-2.pl | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/challenge-246/cheok-yin-fung/perl/ch-2.pl b/challenge-246/cheok-yin-fung/perl/ch-2.pl index 6bb71825bc..06db7aa977 100644 --- a/challenge-246/cheok-yin-fung/perl/ch-2.pl +++ b/challenge-246/cheok-yin-fung/perl/ch-2.pl @@ -76,7 +76,7 @@ sub check { return 0 if $a[3] % $d1 != 0; $u0 = $u0 *($a[3]/$d1); $v0 = $v0 *($a[3]/$d1); - say "$a[3] = $a0*$u0+$b0*$v0"; + say "$a[3] = $a1*$u0+$b1*$v0"; # for my $j (-10..10) { # my $x1 = $u0 + $b1/$d1*$j ; # my $y1 = $v0 - $a1/$d1*$j; @@ -112,7 +112,7 @@ sub check { } } -use Test::More tests=>10; +use Test::More tests=>11; ok check(1, 1, 2, 3, 5); ok !check(4, 2, 4, 5, 7); ok check(4, 1, 2, -3, 8); @@ -126,3 +126,4 @@ ok check(1, 0, 0, 0, 0); ok check(0, 3, 0, 0, 0); ok !check(0, 0, 3, 0, 0); +ok check(2, 4, 8, 16, 32); |
