Skip to main content
Post Undeleted by Giuseppe
added 191 characters in body
Source Link
Giuseppe
  • 28.8k
  • 3
  • 31
  • 105

MATLR + numbers, 892 bytes

Ninja'd, nothing to see here.

&YFhuZpz
function(n)sum(1|unique((x=c((r=rle(primeFactors(n)))$l,r$v))[isPrime(x)]))
library(numbers)

Try it online!Try it online!

MATL, 8 bytes

Ninja'd, nothing to see here.

&YFhuZpz

Try it online!

R + numbers, 92 bytes

function(n)sum(1|unique((x=c((r=rle(primeFactors(n)))$l,r$v))[isPrime(x)]))
library(numbers)

Try it online!

Post Deleted by Giuseppe
Source Link
Giuseppe
  • 28.8k
  • 3
  • 31
  • 105

MATL, 8 bytes

Ninja'd, nothing to see here.

&YFhuZpz

Try it online!