Cuban primes: Difference between revisions
Content deleted Content added
Thundergnat (talk | contribs) →{{header|Perl 6}}: Faster prime testing, big speed boost |
|||
Line 899:
===The task (k == 1)===
Not the most efficient, but concise, and good enough for this task. Use the ntheory library for prime testing; gets it down to around 20 seconds.
<lang perl6>
use ntheory:from<Perl5> <:all>;
my @cubans = lazy (1..Inf
put @cubans[^200]».&comma».fmt("%9s").rotor(10).join: "\n";
|