Primes whose sum of digits is 25: Difference between revisions
m
→{{header|Wren}}: Minor tidy
m (→J: simplify) |
m (→{{header|Wren}}: Minor tidy) |
||
Line 2,217:
{{libheader|Wren-math}}
{{libheader|Wren-fmt}}
<syntaxhighlight lang="wren">import "./math" for Int
var sumDigits = Fn.new { |n|
Line 2,237 ⟶ 2,235:
}
System.print("The %(primes25.count) primes under 5,000 whose digits sum to 25 are:")
{{out}}
Line 2,250 ⟶ 2,248:
{{libheader|Wren-gmp}}
Run time is about 25.5 seconds.
<syntaxhighlight lang="
import "./fmt" for Fmt
|