Problem:
 Score : 400 points    Problem Statement  Given is a positive integer N . Consider repeatedly applying the operation below on N :   First, choose a positive integer z satisfying all of the conditions below:  z can be represented as z=p^e , where p is a prime number and e is a positive integer;  z divides N ;  z is different from all integers chosen in previous operations.    Then, replace N with N/z .   Find the maximum number of times the operation can be applied.      Constraints   All values in input are integers.  1 \leq N \leq 10^{12}         Input  Input is given from Standard Input in the following format:  N       Output  Print the maximum number of times the operation can be applied.        Sample Input 1 24      Sample Output 1 3  We can apply the operation three times by, for example, making the following choices:   Choose z=2 (=2^1) . (Now we have N=12 .)  Choose z=3 (=3^1) . (Now we have N=4 .)  Choose z=4 (=2^2) . (Now we have N=1 .)        Sample Input 2 1      Sample Output 2 0  We cannot apply the operation at all.       Sample Input 3 64      Sample Output 3 3  We can apply the operation three times by, for example, making the following choices:   Choose z=2 (=2^1) . (Now we have N=32 .)  Choose z=4 (=2^2) . (Now we have N=8 .)  Choose z=8 (=2^3) . (Now we have N=1 .)        Sample Input 4 1000000007      Sample Output 4 1  We can apply the operation once by, for example, making the following choice:   z=1000000007 (=1000000007^1) . (Now we have N=1 .)        Sample Input 5 997764507000      Sample Output 5 7

Solution (Python):





import sys,os
from io import BytesIO, IOBase
import collections,itertools,bisect,heapq,math,string
from decimal import *


BUFSIZE = 8192

BUFSIZE = 8192

class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip("\r\n")

def main():
    n=int(input())
    
    def isprime(n):
        if n <= 1:
            return 0
        for x in range(2,int(math.sqrt(n))+1):
            if n%x == 0:
                return 0
        return 1
    
    ans=[]
    def bprime(n):
        if isprime(n):
            ans.append(n)
        else:
            x = 2
            while x <= int(n/2):
                if n%x == 0:
                    ans.append(x)
                    return bprime(n//x)
                x = x + 1
    bprime(n)
    
    d=collections.Counter(ans)
    mx=0
    for k in d.keys():
        i=1
        v=d[k]
        cnt=0
        while v>0:
            v=v-i
            i=i+1
            cnt+=1
        if v==0:
            mx+=cnt
        else:
            mx+=(cnt-1)
    print (mx)
if __name__ == "__main__":
    main()

Solution (Python):
from collections import Counter
N = int(input())
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
ans = 0
primes = prime_factorize(N)
pc = Counter(primes)
for v in pc.values():
    now = 1
    while now*(now+1)//2 <= v:
        now += 1
    ans += now-1
print(ans)

Solution (Python):
from collections import deque
import bisect
m=int(input())
def fa(n):
    arr =deque([])
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

x=0
count=0
box=[]
for i in range(1,1000):
    box.append(i*(i+1)//2)

for i,j in fa(m):
    

    count+=bisect.bisect_right(box, j)


print(count)

Solution (Python):
def factorization(y):
    arr = []
    temp = y
    for i in range(2, int(-(-y**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])
    if arr==[]:
        arr.append([y, 1])
    return arr
n=int(input())
if n==1:
  print(0)
  exit()
ans=0
l=factorization(n)
for i,j in l:
    if j<=2:
      ans+=1
    else:
      t=1
      while j:
        if j<t:
          break
        ans+=1
        j-=t
        t+=1           
print(ans)

Solution (Python):
from math import *

def aaa(n):
  return int((sqrt(8*n+1)-1)/2)

def bk(n):
  if n <= 1:
    return {}
  r = {}
  for i in range(2, ceil(sqrt(n))+1):
    if n % i != 0:
      continue
    r.setdefault(i,0)
    while n % i == 0:
      n //= i
      r[i] += 1
    if n == 1:
      return r
  r.setdefault(n, 1)
  return r

n = int(input())
f = bk(n)
print(sum((aaa(m) for m in f.values())))

Solution (Python):


N = int(input())














p = 2
dict = {}
while p**2 <= N:
    if N % p == 0:
        now = 0
        while N % p == 0:
            N //= p
            now += 1
        dict[p] = now
    p += 1
if N != 1:
    dict[N] = 1
ans = 0
for i in dict.keys():
    n = dict[i]
    j = 1
    while j <= n:
        n -= j
        j += 1
        ans += 1
print(ans)

Solution (Python):
N = int(input())

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return list(set(a))

a = prime_factorize(N)
count, j = 0, 0
for i in a:
    j = 0
    while N % pow(i, j+1) == 0:
        N /= pow(i, j+1)
        j += 1
    count += j
        
print(count)

Solution (Python):
def main():
  
  
  from collections import Counter

  
  

  
  
  
  if 'get_ipython' in globals(): 
    
    n = 64

  else:
    
    n =int(input())
    

  
  def prime_fact(n):
    P = []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            P.append(i)
            n //= i
    if n != 1:
        P.append(n)
    return P

  cnt = Counter(prime_fact(n))

  ans = 0
  for c in cnt.values():
    tmp = 1
    while c >= tmp:
      c -= tmp
      ans += 1
      tmp += 1
    
  print(ans)
    
main()

Solution (Python):
from collections import Counter

def prime_fact(n):
    P= []
    for i in range(2, int(n ** 0.5) + 1):
        while n % i == 0:
            P.append(i)
            n //= i
    if n != 1:
        P.append(n)
    return P

n = int(input())
cnt = Counter(prime_fact(n))

ans = 0
for c in cnt.values():
  tmp = 1
  while c >= tmp:
    c -= tmp
    ans += 1
    tmp += 1
print(ans)

Solution (Python):
def fc(n):
    wk =0
    for i in range(2,int(n**0.5)):
        j=i
        while n%j == 0:
            wk+=1
            n//=j 
            j*=i
        while n%i==0:
            n//=i
            continue
    if n!=1:
        wk+=1
    return wk

n =int(input())
print(fc(n))

Solution (Python):

def primefact(n):
    l=[]
    if n%2==0:
        while n%2==0:
            n=n//2
        l.append(2)
    for i in range(3,int(n**0.5)+1,2):
        if n%i==0:
            while n%i==0:
                n=n//i
            l.append(i)
    if n>2:
        l.append(n)
    return l

n=int(input())
c=0
a=(primefact(n))
for i in a:
    x=i
    while n%x==0:
        n=n//x
        c+=1
        x=x*i
print(c)

Solution (Python):
from collections import Counter

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        while n % f == 0:
            a.append(f)
            n //= f
        f += 2
    if n != 1:
        a.append(n)
    return a

x = int(input())
y = Counter(prime_factorize(x))

num = 0
for v in y.values():
    now_v = v
    i = 1
    while True:
        if now_v < i:
            break
        now_v -= i
        num += 1
        i += 1

print(num)

Solution (Python):
def prime_factorize(n):
    a = {}
    while n % 2 == 0:
        if 2 not in a:
            a[2] = 1
        else:
            a[2] += 1
        n //= 2
    f = 3
    while f * f <= n:
        while n % f == 0:
            if f not in a:
                a[f] = 1
            else:
                a[f] += 1
            n //= f
        f += 2
    if n != 1:
        if f not in a:
            a[f] = 1
        else:
            a[f] += 1
    return a

x = int(input())
y = prime_factorize(x)

num = 0
for v in y.values():
    now_v = v
    i = 1
    while True:
        if now_v < i:
            break
        now_v -= i
        num += 1
        i += 1

print(num)

Solution (Python):
def prime_factorize(n):
    a = {}
    while n % 2 == 0:
        if 2 not in a:
            a[2] = 1
        else:
            a[2] += 1
        n //= 2
        
    f = 3
    while f * f <= n:
        while n % f == 0:
            if f not in a:
                a[f] = 1
            else:
                a[f] += 1
            n //= f
        f += 2
        
    if n != 1:
        if f not in a:
            a[f] = 1
        else:
            a[f] += 1
        
    return a

x = int(input())
y = prime_factorize(x)



num = 0
for v in y.values():
    now_v = v
    i = 1
    while True:
        if now_v < i:
            break
        now_v -= i
        num += 1
        i += 1

print(num)

Solution (Python):
from collections import Counter


n = int(input())

if n == 1:
    print(0)
    exit()


def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a


ans = 0
for v in Counter(prime_factorize(n)).values():
    i = 1
    while v >= i:
        v -= i
        ans += 1
        i += 1

print(ans)

Solution (Python):
import math

N = int(input())
Prime = []
ans = 0

def func(n):
    while n % 2 == 0:
        n = n // 2
        Prime.append(2)
    for i in range(3, int(math.sqrt(n)) + 1, 2):
        while n % i == 0:
            n = n //i
            Prime.append(i)
    if n > 2:
        Prime.append(n)

func(N)

for i in set(Prime):
    c = i
    while N % c == 0:
        N = N // c
        ans += 1
        c = c * i

print(ans)

Solution (Python):
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

n=int(input())

if n==1:
    print(0)
else:
    result=factorization(n)
    primes=len(result)
    
    ans=0
    for i in range(primes):
        tmp=result[i][1]
        cnt=0
        j=1
        while 1:
            tmp-=j
            if tmp>=0:
                cnt+=1
            else:
                break
            j+=1
        
        ans+=cnt

    print(ans)

Solution (Python):
def resolve():
	answer = 0
	N = int(input())
	if N==1:
		print(answer)
	else:
		
		for p in range(2, int(N**0.5)+2):
			e = 0
			while (N % p == 0):
				N /= p
				e += 1
			
			if e>0:
				
				for i in range(1, e+1):
					if e >= i:
						e -= i
						answer += 1
		
		if N!=1:
			answer += 1
		print(answer)
        
resolve()

Solution (Python):
import collections

N = int(input())

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a


primes = collections.Counter(prime_factorize(N))
ans = 0
for prime, num in primes.items():
    n = 1
    while (n + 1) * (n + 2) / 2 <= num:
        n += 1
    ans += n

print(ans)

Solution (Python):
import math
N = int(input())

def primary(x):
  D = {}
  for num in range(2, int(math.sqrt(x))+2):
    while x % num == 0:
      if num in D:
        D[num] += 1
      else:
        D.setdefault(num, 1)
      x = x // num
  if x > 1:
    D.setdefault(x, 1)
  if not D:
    return 0
  else:
    return D

primaryN = primary(N)

a = 0
if N == 1:
  print(0)
elif primary(N) == 0:
  print(1)
else:
  for i in primaryN:
    j = 1
    while primaryN[i] > 0:
      primaryN[i] = primaryN[i] - j
      if primaryN[i] >= 0:
        a = a + 1
      j = j + 1
  print(a)

Solution (Python):
n = int(input())

d = 2 
ans = 0
while d * d <= n:
  if n % d != 0:
    d += 1
    continue
  
  z = d
  
  while n % z == 0:
    n //= z 
    z *= d
    ans += 1
    
  while n % d == 0:
    n /= d

if n != 1:
  ans += 1
  
print(ans)

Solution (Python):
import math
def prime_diviation(n):
    factors = []
    i = 2
    while i <= math.floor(math.sqrt(n)):
        if n%i == 0:
            factors.append(int(i))
            n //= i
        else:
            i += 1
    if n > 1:
        factors.append(n)
    return factors
N = int(input())

ls = prime_diviation(N)
now = 0 
ren = 0 
target = 2 
ans = 0 
for i in range(len(ls)):
    if i == 0:
        
        now = ls[i]
        ans += 1
    else:
        
        if ls[i] == now:
            ren += 1
            if ren == target:
                ans += 1
                ren = 0
                target += 1
        else:
            ans += 1
            ren = 0
            target = 2
            now = ls[i]
print(ans)

Solution (Python):
import math
import bisect

def main():
    n = int(input())
    primes = {}
    s = [(1+i) * i // 2 for i in range(1, 300000)]
    for i in range(2, int(math.sqrt(n))+2):
        if n % i == 0:
            primes[i] = 0
        else:
            continue
        while n % i == 0:
            n /= i
            primes[i] += 1

    if n != 1:
        primes[n] = 1

    ans = 0
    for _, v in primes.items():
        i = bisect.bisect_right(s, v)
        ans += i

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
import numpy as np
import scipy.sparse as sps
import scipy.misc as spm
import collections as col
import functools as func
import itertools as ite
import fractions as frac
import math as ma
from math import cos,sin,tan
import cmath as cma
import copy as cp
import sys
import re
def sinput(): return sys.stdin.readline().strip()
def iinput(): return int(sinput())
def imap(): return map(int, sinput().split())
def fmap(): return map(float, sinput().split())
def iarr(n=0):
    if n: return [0 for _ in range(n)]
    else: return list(imap())
def farr(): return list(fmap())
def sarr(n=0):
    if n: return ["" for _ in range(n)]
    else: return sinput().split()
def barr(n): return [False for _ in range(n)]
def adj(n): return [[] for _ in range(n)]
sys.setrecursionlimit(10**7)
MOD = 10**9 + 7; EPS = sys.float_info.epsilon
PI = np.pi; EXP = np.e; INF = np.inf

def prime(n):
    ans = []
    for i in range(2,int(n**0.5)+1):
        while n%i == 0:
            n //= i
            ans.append(i)
    if n > 1: ans.append(n)
    return ans

n = iinput()
primes = prime(n)
cnt = col.Counter(primes)

ans = 0
for key,val in cnt.items():
    i = 1
    while 1:
        val -= i
        if val < 0: break
        ans += 1
        i += 1

print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
    
def div_game(n):
    zs = []
    li = list(set( prime_factorize(n)))
    
    for p in li:
        a = 1
        z = 1        
        while n > 1 and n >= z:
            z = p ** a
            if n % z == 0 and z not in zs:
                n = n/z
                zs.append(z)
                
            a += 1
    
    return len(zs)

if __name__ == "__main__":
    n = int(input())
    print(div_game(n))

Solution (Python):
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr
  

N = int(input())
S = []
if N == 1:
  print(0)
  exit(0)
fac = factorization(N)
for i in range(len(fac)):
  S.append(fac[i][1])
ans = 0
for i in range(len(S)):
  for j in range(1,S[i] + 1):
    if S[i] - j < 0:
      break
    ans += 1
    S[i] -= j
print(ans)

Solution (Python):
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
N = int(input())
pf = prime_factorize(N)
m = 1
ext = {}
c = 0
l = 1
if len(pf) > 0:
  l = pf[0]
while True:
  if len(pf) == 0:
    break
  i = pf.pop()
  if l != i:
    l = i
    m = 1
  m = m * i
  if not m in ext:
    ext[m] = m
    m = 1
    c += 1
print(c)

Solution (Python):
n=int(input())

if n==1:
  print(0)
  
else:
  
  def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr
  
  l=factorization(n)
  ans=0
  for i in l:
    m=i[1]
    j=1
    while m>=j:
      m-=j
      ans+=1
      j+=1
  print(ans)

Solution (Python):
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

import math

n = ni()


nn = 10**6+2
divs=[0]*nn
ans=0

for i in range(2,nn):
  while n%i==0:
    divs[i]+=1
    n//=i






if n!=1:
  ans+=1

for i in range(nn):
  for j in range(1,nn):
    if divs[i]<j:
      break
    divs[i]-=j
    ans+=1


print(ans)

Solution (Python):
import math
import collections

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

n = int(input())

c = collections.Counter(prime_factorize(n))

d = list(c.values())


ans = 0

x = 1
for i in d:
    s = i
    x=1
    while s>0:
        s = s - x
        
        x +=1
        if s>=0:
            ans+=1

print(ans)

Solution (Python):
import collections

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

N = int(input())
fact = prime_factorize(N)

b = []
c = fact.copy()
q = 1
for p in fact:
    if p not in b:
        while c.count(p) >= q:
            for i in range (q):
                c.remove(p)
                
            b.append(p ** q)
            
            q += 1
    q = 1
    
    

print(len(b))

Solution (Python):
a=int(input())
x=[]
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr
if a==1:
	print(0)
else:
	x=factorization(a)
	t=len(x)
	k=0
	n=1
	ans=0
	for i in range(t):
		k=x[i][1]
		n=1
		while k>=n:
			ans=ans+1
			k=k-n
			n=n+1

	print(ans)

Solution (Python):
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr
n=int(input())
arr=factorization(n)

cnt=0

if n == 1:
  cnt=0
else:
  for i in arr:
    
    x=i[1]
    inc=0
    if x == 1:
      cnt+=1
    else:
      for ii in range(1,x):
        inc+=ii
        
        if inc > x:
          break
        cnt+=1
        

print(cnt)

Solution (Python):
n=int(input())
cnt=0
for i in range(2,int(n**0.5)+2):
    if n%i==0:
        expo=0
        while n%i==0:
            n//=i
            expo+=1
        j=1
        while expo-j>=0:
            cnt+=1
            expo-=j
            j+=1
if n>1:
    cnt+=1
print(cnt)

Solution (Python):
import math

n = int(input())
nroot = int(math.sqrt(n)) +1

result = {}

for i in range(2,nroot+1):
    while n%i==0:
        if i in result:
            result[i] +=1
        else:
            result[i] = 1
        
        n = n//i
if (n>nroot):
    result[n] = 1

ans = 0
for _, i in result.items():
    r = 1
    add = 0
    while  i >= r:
        i -=  r
        r +=1
        add +=1
    
        
    ans += add
if ans > 0:
    print(ans)
else:
    if n > 1:
        print(1)
    else:
        print(0)

Solution (Python):








N = int(input())







if N==1:
    print(0)
    exit()
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr
z=0
for v in factorization(N):
    fla=True

    i=1
    while fla==True:

        if v[1]-i>=0:
            v[1] -= i
            z+=1
            i+=1
        else:
            fla=False
print(z)

Solution (Python):

n=int(input())
res=0
for i in range(2,int(n**0.5)+2):
 if n%i==0:
  cnt=0
  while n%i==0:
   n//=i
   cnt+=1
  j=1
  while cnt-j>=0:
   res+=1
   cnt-=j
   j+=1
if n>1:
 res+=1
print(res)

Solution (Python):
def factorization(n):
    arr = []
    for i in range(2, int(-(-n**0.5//1))+1):
        if n%i == 0:
            cnt=0
            while n%i == 0:
                cnt += 1
                n //= i
            arr.append([i, cnt])

    if n != 1:
        arr.append([n, 1])

    return arr
N = int(input())
ans = 0
if N != 1:
    fact_list = factorization(N)
    for _, i in fact_list:
        j = 1
        while i >= j:
            ans += 1
            i = i - j
            j += 1
            
print(ans)

Solution (Python):
n = int(input())
p = []
n2 = n
for i in range(2,int(n2**0.5//1 + 1)):
  index = 0
  while n2%i == 0:
    index+=1
    n2 = n2//i
  if index != 0:
    p.append(index)
  else:
    continue
count = 0
t = 1

if n2 == 1:
  next
else:
  count+=1

if n == 1:
  print(0)
elif not p:
  print(1)
else:
  for i in range(len(p)):
    while p[i] - t >= 0:
      p[i]-=t
      count+=1
      t+=1
    t = 1
  print(count)

Solution (Python):
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

N = int(input())
ans = 0

A = factorization(N)

for x in A:
    e = x[1]
    for y in range(1,N):
        if e >= y:
            e -= y
            ans += 1
        else:
            break

print(ans)

Solution (Python):
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.buffer.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.buffer.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.buffer.readline().split()))

n = ri()
ans = 0
d = 2
while d**2 <= n:
    if n % d != 0:
        d += 1
        continue

    dd = d
    while n % d == 0:
        n //= d
        d *= dd
        ans += 1

    while n % dd == 0:
        n //= dd
    d = dd + 1

if n != 1:
    ans += 1
print(ans)

Solution (Python):
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.buffer.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.buffer.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.buffer.readline().split()))

n = ri()
ans = 0
d = 2
while d**2 <= n:
    if n % d != 0:
        d += 1
        continue
    dd = d
    while n % d == 0:
        n //= d
        d *= dd
        ans += 1
    while n % dd == 0:
        n //= dd
    d = dd + 1
    
if n != 1:
    ans += 1
print(ans)

Solution (Python):
from collections import Counter

def get_prime_factors(x):
    out = []
    if x < 1:
        return out
    while not x%2:
        out.append(2)
        x //= 2
    i = 3
    while i*i <= x:
        if not x%i:
            out.append(i)
            x //= i
        else:
            i += 2
    if x != 1:
        out.append(x)
    return out

def main():
    n = int(input())
    primes = Counter(get_prime_factors(n))
    ans = 0
    for k, v in primes.items():
        num = 1
        while v >= num:
            ans += 1
            v -= num
            num += 1
    print(ans)
    

if __name__ == "__main__":
    main()

Solution (Python):
import math

def factrization_prime(number):
    factor = {}
    div = 2
    s = math.sqrt(number)
    while div < s:
        div_cnt = 0
        while number % div == 0:
            div_cnt += 1
            number //= div
        if div_cnt != 0:
            factor[div] = div_cnt
        div += 1
    if number > 1:
        factor[number] = 1
    return factor

number = int(input())
factor = factrization_prime(number)
ans = 0
for i in factor.values():
  n = 0
  while n*(n+1)//2 <= i:
    n +=  1
  ans += n-1
print(ans)

Solution (Python):
import glob
import math



REL_PATH = 'ABC\\169\\D'


TOP_PATH = 'C:\\AtCoder'

class Common:

    problem = []
    index = 0

    def __init__(self, rel_path):
        self.rel_path = rel_path

    def initialize(self, path):
        file = open(path)
        self.problem = file.readlines()
        self.index = 0
        return

    def input_data(self):
        try:
            IS_TEST
            self.index += 1
            return self.problem[self.index-1]

        except NameError:
            return input()

    def resolve(self):
        pass

    def exec_resolve(self):
        try:
            IS_TEST
            for path in glob.glob(TOP_PATH + '\\' + self.rel_path + '/*.txt'):
                print("Test: " + path)
                self.initialize(path)
                self.resolve()
                print("\n\n")
        except NameError:
            self.resolve()


class Solver(Common):

    alph = []

    def rec(self, result, now, max, N):

        if now == N:
            res = ""
            for i in result:
                res += self.alph[i]
            print(res)
            return

        if now == 0:
            result[0] = 0
            self.rec(result, now+1, 0, N)
            return

        for i in range(0, max+2):
            if i == N:
                return
            result[now] = i
            if i > max:
                self.rec(result, now+1, i, N)
            else:
                self.rec(result, now+1, max, N)

    def resolve(self):

        count = 0

        N = int(self.input_data())
        
        n = int(math.sqrt(N))

        result = 0
        now = 2
        while now <= N:
            count = 0
            while True:
                if N % now == 0:
                    N = int(N / now)
                    count += 1
                else:
                    break
            for i in range(1,10000):
                if i <= count:
                    result += 1
                    count -= i
                else:
                    break

            now += 1

            if now > n:
                result += 1
                break



        print(str(result))

solver = Solver(REL_PATH)
solver.exec_resolve()

Solution (Python):
n = int(input())

def trial_division(n):
    if n < 2:
        return []
    res = []
    tmp = n
    for i in range(2, int(n**0.5)+1):
        c = 0
        if tmp%i == 0:
            while tmp%i == 0:
                c += 1
                tmp //= i
            res.append([i, c])
    if tmp != 1:
        res.append([tmp, 1])
    return res

div = trial_division(n)
c = 0
for d in div:
    k = d[1]
    i = 1
    while k-i >= 0:
        c += 1
        k -= i
        i += 1
print(c)

Solution (Python):



def soinsu_bunkai(m):
    pf={}

    for i in range(2,int(m**0.5)+1):
        while m%i==0:
            pf[i]=pf.get(i,0)+1
            m//=i
    if m>1:
        pf[m]=1
    return pf


N = int(input())
xx =[]
prime_factorization =soinsu_bunkai(N)
count =0
for i in prime_factorization.keys():
    x=1
    while x <= prime_factorization[i]:
        if N % i**x ==0:
            xx.append(i**x)
            count +=1
            N //= i**x
        x +=1
print(count)

Solution (Python):
import numpy as np
import sys

N = int(input())
if N == 1:
    print(0)
    sys.exit()

d = int(N ** .5)

def eratosthenes(N):
	is_prime = [True] * (N + 1)
	is_prime[0], is_prime[1] = False, False
	for i in range(2, int(N**(1/2)) + 1):
		if is_prime[i]:
			for j in range(i * 2, N + 1, i):
				is_prime[j] = False
	return [i for i in range(N+1) if is_prime[i]]

p_num = eratosthenes(d+1)
MAX_p = p_num[-1]
ans = 0
used = []
for p in p_num:
    t_p = p
    while N % p == 0:
        N //= p
        ans += 1
        p *= t_p
    while N % t_p == 0:
        N //= t_p

if N > MAX_p:
    dd = int(N ** .5)
    cond = 1
    for i in range(2, dd+1):
        if N % i == 0:
            cond = 0
            break
    if cond:
        ans += 1
    
print(ans)