Anonymous user
Product of divisors: Difference between revisions
→{{header|Julia}}
Line 1,090:
</pre>
One-liner version:
<lang julia>proddivisors_oneliner(n) = prod(n%i==0 ? i : 1 for i in 1:n)</lang>
It's shorter but with the cost of an higher complexity, <math>\Theta(m)</math> where m is the number of digits of n.
=={{header|Kotlin}}==
|