Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re: (Golf): Sieve of Eratosthenes

by chromatic (Archbishop)
on May 19, 2001 at 21:45 UTC ( #81739=note: print w/ replies, xml ) Need Help??


in reply to (Golf): Sieve of Eratosthenes

72, and there's some nasty bits at the end:

sub p{@_=(2..pop);while($a=$_[0]){@_=grep{$_%$a}@_;$_.=" $a";}split' ';}

Be glad I didn't post the regex one.


Comment on Re: (Golf): Sieve of Eratosthenes
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://81739]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (7)
As of 2014-12-28 19:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (182 votes), past polls