4 replaced http://stackoverflow.com/ with https://stackoverflow.com/

# Python 2, 1009998 96 bytes

n=input()
i=2
f=[]
while i<n:
if n%i:i+=1
else:n/=i;f+=i,
if-~n:f+=n,
print len(f)-len(set(f))


Most of the code is taken up by a golfed version of this SO answerthis SO answer, which stores the prime factors of the input in f. Then we simply use set manipulation to calculate the excess factors.

Thanks to Leaky Nun for saving 1 3 bytes!

# Python 2, 1009998 96 bytes

n=input()
i=2
f=[]
while i<n:
if n%i:i+=1
else:n/=i;f+=i,
if-~n:f+=n,
print len(f)-len(set(f))


Most of the code is taken up by a golfed version of this SO answer, which stores the prime factors of the input in f. Then we simply use set manipulation to calculate the excess factors.

Thanks to Leaky Nun for saving 1 3 bytes!

# Python 2, 1009998 96 bytes

n=input()
i=2
f=[]
while i<n:
if n%i:i+=1
else:n/=i;f+=i,
if-~n:f+=n,
print len(f)-len(set(f))


Most of the code is taken up by a golfed version of this SO answer, which stores the prime factors of the input in f. Then we simply use set manipulation to calculate the excess factors.

Thanks to Leaky Nun for saving 1 3 bytes!

3 Saved 2 more bytes thanks to Leaky Nun

# Python 2, 100999898 96 bytes

n=input()
i=2
f=[]
while i<1e5i<n:
if n%i:i+=1
else:n/=i;f+=i,
if-~n:f+=n,
print len(f)-len(set(f))


Most of the code is taken up by a golfed version of this SO answer, which stores the prime factors of the input in f. Then we simply use set manipulation to calculate the excess factors.

Thanks to Leaky Nun for saving a byte1 3 bytes!

# Python 2, 1009998 bytes

n=input()
i=2
f=[]
while i<1e5:
if n%i:i+=1
else:n/=i;f+=i,
if-~n:f+=n,
print len(f)-len(set(f))


Most of the code is taken up by a golfed version of this SO answer, which stores the prime factors of the input in f. Then we simply use set manipulation to calculate the excess factors.

Thanks to Leaky Nun for saving a byte!

# Python 2, 1009998 96 bytes

n=input()
i=2
f=[]
while i<n:
if n%i:i+=1
else:n/=i;f+=i,
if-~n:f+=n,
print len(f)-len(set(f))


Most of the code is taken up by a golfed version of this SO answer, which stores the prime factors of the input in f. Then we simply use set manipulation to calculate the excess factors.

Thanks to Leaky Nun for saving 1 3 bytes!

2 Saved another byte

# Python 2, 10010099 98 bytes

n=input()
i=2
f=[]
while i*i<=ni<1e5:
if n%i:i+=1
else:n/=i;f+=i,
if n>1-~n:f+=n,
print len(f)-len(set(f))


Most of the code is taken up by a golfed version of this SO answer, which stores the prime factors of the input in f. Then we simply use set manipulation to calculate the excess factors.

Thanks to Leaky Nun for saving a byte!

# Python 2, 100 bytes

n=input()
i=2
f=[]
while i*i<=n:
if n%i:i+=1
else:n/=i;f+=i,
if n>1:f+=n,
print len(f)-len(set(f))


Most of the code is taken up by a golfed version of this SO answer, which stores the prime factors of the input in f. Then we simply use set manipulation to calculate the excess factors.

# Python 2, 10099 98 bytes

n=input()
i=2
f=[]
while i<1e5:
if n%i:i+=1
else:n/=i;f+=i,
if-~n:f+=n,
print len(f)-len(set(f))


Most of the code is taken up by a golfed version of this SO answer, which stores the prime factors of the input in f. Then we simply use set manipulation to calculate the excess factors.

Thanks to Leaky Nun for saving a byte!

1