Additive primes: Difference between revisions
Content added Content deleted
Thundergnat (talk | contribs) m (Automated syntax highlighting fixup (second round - minor fixes)) |
m (→{{header|Rust}}: syntaxhighlight lang="rust") |
||
Line 2,988: | Line 2,988: | ||
===Flat implementation=== |
===Flat implementation=== |
||
<syntaxhighlight lang=" |
<syntaxhighlight lang="rust">fn main() { |
||
let limit = 500; |
let limit = 500; |
||
let column_w = limit.to_string().len() + 1; |
let column_w = limit.to_string().len() + 1; |
||
Line 3,020: | Line 3,020: | ||
primal implements the sieve of Eratosthenes with optimizations (10+ times faster for large limits) |
primal implements the sieve of Eratosthenes with optimizations (10+ times faster for large limits) |
||
<syntaxhighlight lang=" |
<syntaxhighlight lang="rust">// [dependencies] |
||
// primal = "0.3.0" |
// primal = "0.3.0" |
||