Numbers which are the cube roots of the product of their proper divisors: Difference between revisions
Content added Content deleted
(Added Sidef) |
m (→{{header|Wren}}: Changed to Wren S/H) |
||
Line 2,005: | Line 2,005: | ||
{{libheader|Wren-long}} |
{{libheader|Wren-long}} |
||
{{libheader|Wren-fmt}} |
{{libheader|Wren-fmt}} |
||
<syntaxhighlight lang=" |
<syntaxhighlight lang="wren">import "./math" for Int, Nums |
||
import "./long" for ULong, ULongs |
import "./long" for ULong, ULongs |
||
import "./fmt" for Fmt |
import "./fmt" for Fmt |
||
Line 2,049: | Line 2,049: | ||
</pre> |
</pre> |
||
Alternatively and a bit quicker, inspired by the C++ entry and the OEIS comment that (apart from 1) n must have exactly 8 divisors: |
Alternatively and a bit quicker, inspired by the C++ entry and the OEIS comment that (apart from 1) n must have exactly 8 divisors: |
||
<syntaxhighlight lang=" |
<syntaxhighlight lang="wren">import "./fmt" for Fmt |
||
var divisorCount = Fn.new { |n| |
var divisorCount = Fn.new { |n| |