From 8a3a29ae08a1ecdf763466dfe998262c298cf618 Mon Sep 17 00:00:00 2001 From: Simon Green Date: Sun, 20 Nov 2022 20:28:06 +1100 Subject: Minor bug fix --- challenge-191/sgreen/perl/ch-1.pl | 2 +- challenge-191/sgreen/python/ch-1.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/challenge-191/sgreen/perl/ch-1.pl b/challenge-191/sgreen/perl/ch-1.pl index 487f9f15af..387ebbf45b 100755 --- a/challenge-191/sgreen/perl/ch-1.pl +++ b/challenge-191/sgreen/perl/ch-1.pl @@ -9,7 +9,7 @@ sub main (@nums) { # Sort the list numerically @nums = sort { $a <=> $b } @nums; - say $nums[-1] > 2 * $nums[-2] ? 1 : -1; + say $nums[-1] >+ 2 * $nums[-2] ? 1 : -1; } main(@ARGV); diff --git a/challenge-191/sgreen/python/ch-1.py b/challenge-191/sgreen/python/ch-1.py index 38e9b0b853..f121df2fba 100755 --- a/challenge-191/sgreen/python/ch-1.py +++ b/challenge-191/sgreen/python/ch-1.py @@ -8,7 +8,7 @@ def main(s): nums = [int(x) for x in s] nums.sort() - print(1 if nums[-1] > 2 * nums[-2] else -1) + print(1 if nums[-1] >= 2 * nums[-2] else -1) if __name__ == '__main__': -- cgit