aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCY Fung <fungcheokyin@gmail.com>2023-12-05 20:59:13 +0800
committerCY Fung <fungcheokyin@gmail.com>2023-12-05 20:59:13 +0800
commit9f45d7243c2c8db9f7b9c7b079f358965f14b6b2 (patch)
treed2ced86a49f9d0f836d7a4b9a950b53cbd8aaf26
parent89d9805ffe20aa4061d0cc74469d71c1bfcac059 (diff)
downloadperlweeklychallenge-club-9f45d7243c2c8db9f7b9c7b079f358965f14b6b2.tar.gz
perlweeklychallenge-club-9f45d7243c2c8db9f7b9c7b079f358965f14b6b2.tar.bz2
perlweeklychallenge-club-9f45d7243c2c8db9f7b9c7b079f358965f14b6b2.zip
Week 246
-rw-r--r--challenge-246/cheok-yin-fung/perl/ch-2.pl2
1 files changed, 1 insertions, 1 deletions
diff --git a/challenge-246/cheok-yin-fung/perl/ch-2.pl b/challenge-246/cheok-yin-fung/perl/ch-2.pl
index 50a4f1ebc5..6bb71825bc 100644
--- a/challenge-246/cheok-yin-fung/perl/ch-2.pl
+++ b/challenge-246/cheok-yin-fung/perl/ch-2.pl
@@ -95,7 +95,7 @@ sub check {
my $x1 = $u0 + $b1/$d1*$j;
my $y1 = $v0 - $a1/$d1*$j;
say "($x1, $y1)";
- return -1 if int($x1) != $x1 || int($y1) != $y1;
+ return 0 if int($x1) != $x1 || int($y1) != $y1;
return ($a[4] == $a[2]*$x1+$a[3]*$y1) ? 1 : 0;
}
else {