aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--challenge-146/james-smith/README.md2
-rw-r--r--challenge-146/james-smith/perl/ch-1.pl2
2 files changed, 2 insertions, 2 deletions
diff --git a/challenge-146/james-smith/README.md b/challenge-146/james-smith/README.md
index 9574f3753d..b25034a695 100644
--- a/challenge-146/james-smith/README.md
+++ b/challenge-146/james-smith/README.md
@@ -26,7 +26,7 @@ We could use a Prime module, but finding primes is not that difficult so we will
my @primes = (3);
for( my $c=5; @primes<10000; $c+=2 ) {
- ($_>sqrt$c)?((push@primes,$c),last):$c%$_||last for @primes;
+ ($_*$_>$c)?((push@primes,$c),last):$c%$_||last for @primes;
}
say $primes[-1];
diff --git a/challenge-146/james-smith/perl/ch-1.pl b/challenge-146/james-smith/perl/ch-1.pl
index fe3c61704e..692ac8d92d 100644
--- a/challenge-146/james-smith/perl/ch-1.pl
+++ b/challenge-146/james-smith/perl/ch-1.pl
@@ -8,7 +8,7 @@ use feature qw(say);
my @primes = (2);
for( my $c=3; @primes<10001; $c+=2 ) {
- ($_>sqrt$c)?((push@primes,$c),last):$c%$_||last for @primes;
+ ($_*$_>$c)?((push@primes,$c),last):$c%$_||last for @primes;
}
say $primes[-1];