From 9f45d7243c2c8db9f7b9c7b079f358965f14b6b2 Mon Sep 17 00:00:00 2001 From: CY Fung Date: Tue, 5 Dec 2023 20:59:13 +0800 Subject: Week 246 --- challenge-246/cheok-yin-fung/perl/ch-2.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 { -- cgit