in reply to RE: RE: RE: RE: sieve of erothenes
in thread sieve of erothenes
which uses 2 more chars. Sigh.@_=(1);L:for(2..100){$i=0;while(@_>++$i){next L if!($_%$_[$i])}push@_, +$_}
UPDATE: I can do it with one less char then above, but still too many.:
Yes, I lie awake at night thinking about this stuff. No, not really. But when I get started thinking about it, I have a hard time stopping. But I doubt I'm alone in that disease. :)@_=(1);L:for(2..100){$i=-@_;while(++$i){next L if!($_%$_[$i])}push@_,$ +_}
|
---|