diff options
| author | Doomtrain14 <yet.ebreo@gmail.com> | 2019-08-22 00:37:57 +0800 |
|---|---|---|
| committer | Doomtrain14 <yet.ebreo@gmail.com> | 2019-08-22 00:37:57 +0800 |
| commit | ebcd3041fe5a77b11f05c39c28e9686b562fd0d0 (patch) | |
| tree | ef0005c2d0bc641e1deeb2a6b66cf50c673198b4 | |
| parent | 465a728659d3009ebcc366c1d46a8cab0e2deb1e (diff) | |
| download | perlweeklychallenge-club-ebcd3041fe5a77b11f05c39c28e9686b562fd0d0.tar.gz perlweeklychallenge-club-ebcd3041fe5a77b11f05c39c28e9686b562fd0d0.tar.bz2 perlweeklychallenge-club-ebcd3041fe5a77b11f05c39c28e9686b562fd0d0.zip | |
Fixed a bug in generating primes
| -rw-r--r-- | challenge-022/yet-ebreo/perl5/ch-1.pl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/challenge-022/yet-ebreo/perl5/ch-1.pl b/challenge-022/yet-ebreo/perl5/ch-1.pl index fa4f0ca9fd..fbc68cb5fd 100644 --- a/challenge-022/yet-ebreo/perl5/ch-1.pl +++ b/challenge-022/yet-ebreo/perl5/ch-1.pl @@ -6,7 +6,7 @@ #This part determines the primes from 0 to 54 using sieve of eratosthenes #Multiple of each current value (from 0..54) are set to 0 leaving only those #which are not (Primes) -@_=grep{@_[ map $x*$_,//..@_/($x=$_) ] =0 if $_[$_] > 1}@_=0..54; +@_=grep{@_[ map $x*$_,$_..@_/($x=$_) ] =0 if $_[$_] > 1}@_=0..54; #The ocde below go through the primes generated above and print combinations #which have difference of +6 |
