Jump to content

Product of divisors: Difference between revisions

Added R.
(Add BQN)
(Added R.)
Line 1,178:
1521 2560000 41 3111696 43 85184 91125 2116 47 254803968 343 125000</pre>
 
=={{header|R}}==
This only takes one line.
<lang R>sapply(1:50, function(n) prod(c(Filter(function(x) n %% x == 0, seq_len(n %/% 2)), n)))</lang>
 
=={{header|Raku}}==
331

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.