From 81455cd0c01e629908ea9f1437fac5864669c279 Mon Sep 17 00:00:00 2001 From: robbie-hatley Date: Wed, 17 Jan 2024 20:27:22 -0800 Subject: Corrected some minor errors. --- challenge-252/robbie-hatley/perl/ch-2.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/challenge-252/robbie-hatley/perl/ch-2.pl b/challenge-252/robbie-hatley/perl/ch-2.pl index 119ba7629e..4edb5e4b68 100755 --- a/challenge-252/robbie-hatley/perl/ch-2.pl +++ b/challenge-252/robbie-hatley/perl/ch-2.pl @@ -77,8 +77,8 @@ sub is_pos_int ($x) { return $x =~ m/^[1-9]\d*$/; } +# Return array of unique ints adding to $n: sub usz ($n) { - return ('$n not pos int') if !is_pos_int($n); my @a = (); push @a, -int($n/2)..-1; 1 == $n%2 and push @a, 0; -- cgit