aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-140/james-smith/perl/ch-2.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/challenge-140/james-smith/perl/ch-2.pl b/challenge-140/james-smith/perl/ch-2.pl
index c37be1e0cf..74114cf551 100644
--- a/challenge-140/james-smith/perl/ch-2.pl
+++ b/challenge-140/james-smith/perl/ch-2.pl
@@ -24,8 +24,8 @@ is( get_num_exp(@{$_->[0]}), $_->[1] ) for @TESTS;
done_testing();
sub get_num {
- my($i,$j,$k,$t) = @_;
- (sort{$a<=>$b}map{++$t;map{$t*$_}1..$i}1..$j)[$k-1];
+ my$t;
+ (sort{$a<=>$b}map{++$t;map{$t*$_}1..$_[0]}1..$_[1])[$_[2]-1];
}
sub get_num_exp {