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


def I(): return int(sys.stdin.buffer.readline())


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 = I()
if n == 1:
    print(0)
    sys.exit()


facts = factorization(n)

ans = 0
for prime, e in facts:
    
    i = 1
    while e > 0:
        
        if e - i < 0:
            break
        e -= i
        ans += 1
        
        i += 1
print(ans)

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

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

arr = factorization(n) 

ans = 0

tosa = [0 for _ in range(1000)]
for i in range(1000):
    tosa[i] = int(i*(i+1)/2)


for s in arr:
    if(s[0] == 1):
        continue
    num = s[1]
    cnt = bisect.bisect_right(tosa, num) - 1
    
    ans += cnt

print(ans)

Solution (Python):
import collections


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


def solve():
    N = int(input())
    if N == 1:
        return 0
    D = factorization(N)
    R = primes()

    result = 0
    for d in D:
        result += R[d[1]]

    return result


def primes():
    R = [0 for i in range(41)]
    for i in range(40, 0, -1):
        tmp_R = R[:]
        for j in range(i, 41):
            tmp_R[j] = max(R[j], R[j - i] + 1)
        R = tmp_R

    return R


if __name__ == "__main__":
    print(solve())

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


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


np = factorization(n)


def cont(x):
    a = 0
    c = 0
    while True:
        c += 1
        a += c

        if x >= a and x < a + c + 1:
            break

    return c


ans = 0
for i in np:
    if i[0] == 1:
        continue
    else:
        
        ans += cont(i[1])

print(ans)

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

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

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

def is_prime(q):
    q = abs(q)
    if q == 2: return True
    if q < 2 or q&1 == 0: return False
    return pow(2, q-1, q) == 1

k=make_divisors(n)
c=0
for i in range(len(k)):
    if i==0:pass
    else:
        l1=factorization(k[i])
        seigo=is_prime(l1[0][0])
        if len(l1)==1 and seigo==True and n%k[i]==0:
            n//=k[i]
            c+=1
        
print(c)

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


a = int(input().split()[0])
prime_res = prime_factorize(a)

prime_dict = {}
for prime_i in prime_res:
    if prime_i not in prime_dict:
        prime_dict[prime_i] = 1
    else:
        prime_dict[prime_i] += 1

res = 0
for key in prime_dict:
    base = 1
    while True:
        if prime_dict[key] < base:
            break
        else:
            prime_dict[key] -= base
            base += 1
            res += 1

print(res)

Solution (Python):
import math
def c(x):
    global yaku
    now=x
    for i in range(2,int(math.sqrt(now))+1):
        while now%i==0:
            if i in sosu.keys():
                v=sosu[i]
                sosu[i]=v+1
            else:
                sosu[i]=1
            now=now//i
            yaku+=1
    if(now!=1):
        sosu[now]=1
        yaku+=1
def d(x):
    global ans
    q=x
    cur=1
    while(q>0):
        q=q-cur
        if q>=0:
            ans+=1
        cur+=1
    
n=int(input())
sosu={}
yaku=0
c(n)
if n==1:
    print(0)
else:
    if(yaku==1):
        print(1)
    else:
        ans=0
        
        for i in sosu.keys():
            d(sosu[i])
        print(ans)

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

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



fac = factorization(n)
ans = 0
if n == 1:
    print(0)
else:
    for i in fac:
        tem = 1
        while tem*(tem+1)//2 < i[1]:
            if i[1] >= (tem+1)*(tem+2)//2:
                tem += 1
            else:
                break
        ans += tem

    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())
l = prime_factorize(N)
m = collections.Counter([])
m[1]=1
x=1
cnt=0
y=list()
for i in range(len(l)):
    if x!=1 and x%l[i]!=0:
        x=1
    x*=l[i]
    
    if m[x]==0:
        y.append(x)
        m[x]=1
        cnt+=1
        x=1



print(cnt)

Solution (Python):
n = int(input())
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])

count = 0

for k in arr:
    if k[0] == 1:
        continue
    now = 1
    while k[1] >= now:
        k[1] -= now
        now += 1
        count += 1

print(count)

Solution (Python):
import numpy as np
import math
import collections
import bisect
from decimal import *


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 collections.Counter(a)


N = int(input())
ruisekiwa = [0]
for i in range(1, 50):
    ruisekiwa.append(i + ruisekiwa[i - 1])
PF = prime_factorize(N)

ans = 0
for v in PF.values():
    ans += bisect.bisect_right(ruisekiwa, v) - 1

print(ans)

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

facts = Counter(prime_factorize(N))
cnt = 0

def pattern_cnt(n):
  res = 0
  cur = 1
  while n - cur >= 0:
    n -= cur
    res += 1
    cur += 1
  return res

for k in facts:
  cnt += pattern_cnt(facts[k])
  

print(cnt)

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 a

a = prime_factorize(N)
b = set(a)

dic = {}
for i in b:
    n = 0
    while True:
        n += 1
        if a == []:
            break
        a.pop(0)
        if a == []:
            break
        if a[0] != i:
            break
    dic[i] = n


an = 0
for k, v in dic.items():
    num = int((-1+(1+8*v)**(1/2))/2)
    an += num

print(an)

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


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 n == 1:
    print("0")
    exit()

a = factorization(n)
cnt = 0

for i in range(len(a)):
    b = a[i]
    c = b[1]
    for j in range(1, 100):
        c = c - j
        cnt += 1
        if c <= j:
            break

print(cnt)

Solution (Python):
n=int(input())
ans=0
i=2
while i*i<=n:
    cnt=0
    while n%i==0:
        n//=i
        cnt+=1
    j=0
    
    for k in range(1,cnt+1):
        if (k*(k+1))//2<=cnt:
            j=max(j,k)
    ans+=j
    i+=1

if n>1:
    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



c = collections.Counter(prime_factorize(int(input())))
ans=0
l=list(c.values())

for i in l:
    j=int(i)
    a=1
    while j>0:
        if j>=a:
            j-=a
            ans+=1
            a+=1
        else:
            break

print(ans)

Solution (Python):
def d():
    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))
    ans = 0
    for i in c.values():
        j = 1
        while j <= i:
            i -= j
            ans += 1
            j += 1

    print(ans)



if __name__ == "__main__":
    d()

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())
lis = factorization(N)
ans = 0

if N == 1:
    print(0)
    exit()
for i in lis:
    cnt = 1
    target = i[1]
    while target > 0:
        if target - cnt >= 0:
            ans += 1
        target -= cnt
        cnt+=1
print(ans)

Solution (Python):
import sys

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

readline = sys.stdin.readline
readall = sys.stdin.read
ns = lambda: readline().rstrip()
ni = lambda: int(readline().rstrip())
nm = lambda: map(int, readline().split())
nl = lambda: list(map(int, readline().split()))
prl = lambda x: print(*x ,sep='\n')

a = [i*(i+1)//2 for i in range(60)]
n = ni()
l = factorization(n)
res = 0
for i in range(len(l)):
    j =  l[i][1]
    if l[i][0] == 1:
        continue
    for k,k_ in enumerate(a):
        if j < k_:
            res += k-1
            break
print(res)

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())
fac_list = factorization(n)
a = [0]*len(fac_list)
for i in range(len(fac_list)):
    a[i] = fac_list[i][1]
t = 0
if n == 1:
        print(0)
else:
    for j, aa in enumerate(a):
        p = 0
        for i in range(1,aa+1):
            p += i
            if p <= aa:
                t += 1
            else:
                break
    print(t)

Solution (Python):
import collections
n = int(input())
result = 0
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

c = collections.Counter(prime_factorize(n))
for i in c.values():
    temp = 0
    for j in range(i+1):
        if (1+j/2)*(j+1) > i:
            result += j
            break
        else:
            continue
print(result)

Solution (Python):

import numpy as np
from functools import *
import sys
sys.setrecursionlimit(100000)
input = sys.stdin.readline


import numpy as np

def acinput():
    return list(map(int, input().split(" ")))

    
def factorize(n):
    fct = []  
    b, e = 2, 0  
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct



s=factorize(float(input()))

res=0

for ss,n in s:
    tmp=np.floor((np.sqrt(8*n+1)-1)/2)
    
    res+=tmp

print(int(np.floor(res)))

Solution (Python):
n=int(input())
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

a=factorization(n)

l=len(a)
ans=l
c=1
for i in range(l):
    a[i][1]-=1

while(c<100):
    c+=1
    for i in range(l):
        if a[i][1]>=c:
            a[i][1]-=c
            ans+=1
if n!=1 and n!=0:
    print(ans)
else:
    print(0)

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())
z=[]

p=factorization(n) 
sum=0
if n==1:
    print(0)
    exit()
else:
    for pair in p:
        for i in range(pair[1]):
            z.append(pair[0]**(i+1))
            

while True:
    now=z.pop(0)
    if n>=now and n%now==0:
        sum+=1

        n=n/now
    if len(z)==0:
        break
print(sum)

Solution (Python):
N= int(input())
       
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 N != 1:  
 listA=factorization(N) 
 nagasa=len(listA)
 nn=0
 kk=1
 count=0
 while nn<nagasa:
   while kk*(kk+1)/2 <=listA[nn][1]:
     count=count+1
     kk=kk+1
   kk=1
   nn=nn+1
 print(count)
if N==1:
  print(0)

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())
prime = factorization(n)
prime_array = []
for i in range(len(prime)):
    prime_array.append(prime[i][1])

ans = 0
for j in range(len(prime_array)):
    check = True
    num = 1
    test = 1
    while check == True:
        if prime_array[j] == num:
            check = False
            ans += test
        elif prime_array[j] < num:
            check = False
            ans += test - 1
        test += 1
        num += test
if n == 1:
    ans = 0
print(ans)

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

P = collections.Counter(prime_factorize(n))

def counter(n):
    i = 1
    counter = 0
    while True:
        n-=i
        if n<0:
            break
        else:
            counter += 1
            i += 1
    return counter
  
ans = 0
for p in P.values():
  ans += counter(p)

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

def getTime(v):
  time = 0
  total = 0
  while total <= v:
    time += 1
    total += time
  return (time - 1)

N = int(input())
result = 0
c = collections.Counter(prime_factorize(N))
for k in c.keys():
  result += getTime(c[k])
  
print(result)

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
def make_divisors(n):
  lower_divisors,upper_divisors=[],[]
  i=1
  while i*i<=n:
    if n%i==0:
      lower_divisors.append(i)
      if i!=n//i:
        upper_divisors.append(n//i)
    i+=1
  return lower_divisors+upper_divisors[::-1]
N=int(input())
t=make_divisors(N)
u=[]
count=0
if N==1:
  print(0)
else:
  for i in range(1,len(t)):
    if 2>len(factorization(t[i])):
      u.append(t[i])
  for i in range(len(u)):
    if N%u[i]==0:
      N=int(N//u[i])
      count+=1
    if N==1:
      break
  print(count)

Solution (Python):
import collections
def 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 numcount(n):
    i = 1
    while True:
        n -= i
 
        if n <= i:
            break
        i += 1
    return i
A = int(input())
L = factorize(A)
C = collections.Counter(L)
ret = 0
for c in C:
    ret += numcount(C[c])
print(ret)

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

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

arr = factorization(N)
sum = 0
for s in arr:
    if s[0] == 1:
        print(0)
        exit()
    sum += math.floor((-1+math.sqrt(1+8*s[1]))/2)
print(sum)

Solution (Python):
import numpy as np
import math
from decimal import Decimal

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 = factorization(N)
if ans[0][0] == 1:
    print(0)
else:
    count = 0
    for i in range(len(ans)):
        an = 1
        n = 1
        while an <= ans[i][1]:
            n = n + 1
            an = n*(n+1)/2
            count = count +1

    print(count)

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

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 N == 1:
    print(0)

else:
    F = factorization(N)
    ans = 0
    for i in range(len(F)):
        k, num = F[i]
        j = 1
        while num >= j:
            ans += 1
            num -= j
            j += 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())
c= collections.Counter(prime_factorize(n))

sum=0
for i in c:
    n=1
    while n*(n+1)/2<=c[i]:
        n=n+1
    sum=sum+n-1
print(sum)

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

factorization(24) 

n = int(input())
P = factorization(n)

Q = []
for i in range(len(P)):
    temp = 1
    while P[i][1] >= temp and P[i][0] != 1:
        t = P[i][0] ** temp
        Q.append(t)
        P[i][1] -= temp
        temp += 1

print(len(Q))

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())
N = factorization(N)
count = 0

if N[0][0] == 1:
    print(0)
else:
    for i in range(0,len(N)):
        t = 0
        for j in range(1,N[i][1]+1):
            t += j
            if N[i][1] == t:
                count += j
                break
            elif N[i][1] < t:
                count += j-1
                break
            else:
                pass
    print(count)

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 a

f = prime_factorize(n)

ans = 0
for i in set(f):
    c = f.count(i)
    j = 1
    while True:
        if 0 <= c-j:
            ans += 1
            c = c-j
            j += 1
        else:
            break

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:
    l = factorization(n)
    dic = []
    for i in range(len(l)):
        tmp = l[i][0]
        dic.append(tmp)
        while n >= tmp:
            tmp *= l[i][0]
            if n < tmp:
                break
            dic.append(tmp)
    dic.sort()
    cnt = 0
    while n != 1:
        flag = True
        for i in range(len(dic)):
            if n%dic[i] == 0:
                n //= dic[i]
                cnt += 1
                dic.pop(i)
                flag = False
                break
        if flag:
            break
    print(cnt)

Solution (Python):

nn = int(input());
n = nn;

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)

b = len(a);


if nn == 1:
    count = 0;
else:
    count = 1;
    x = 1;
    y = 1;

    for i in range(1,b):
        if a[i] == a[i-1]:
            x += 1;
            z = y * (y+1) // 2;
            if x - z > y:
                count += 1;
                y += 1;
            
        else:
            x = 1;
            y = 1;
            count += 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())
pf = factorization(n)
cnt = 0
for p in pf:
    i = 1
    while True:
        if p[0] == 1:
            break
        n /= p[0]**i
        p[1] -= i
        cnt += 1
        i += 1
        if p[1] < i:
            break

print(cnt)

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

if N == 1:
    print(0)
else:
    t = factorization(N)
    for i in t:
        t_ = i[1]
        now = 1
        while True:
            if now > t_:
                break
            ans += 1
            t_ -= now
            now += 1
    print(ans)

Solution (Python):
n=int(input())
ans=0
p=2

while p<=10**6 and n!=1:
  dv=0
  wa=1
  num=1
  while n%p==0:
    n/=p
    n=int(n)
    dv+=1
  if dv>0:
    while dv>=wa:
      num+=1
      wa+=num
    num-=1
    ans+=num
  p+=1
  
if n!=1:
  print(str(ans+1))
  exit()
  
print(str(ans))

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

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)

ttl = 0
if l == [[1, 1]]:
    ttl = 0
else:
    for m in l:
        x = m[1]
        for i in range(1, x + 1):
            x -= i
            if x >=0:
                ttl += 1
            else:
                break

print(ttl)

Solution (Python):
import collections

def fanctionA(n):
    AList = []
    tmp = 2
    
    while n % tmp == 0:
        AList.append(tmp)
        n //= tmp
    tmp = 3
    while tmp * tmp <= n:
        if n % tmp == 0:
            AList.append(tmp)
            n //= tmp
        else:
            tmp += 2
    if n != 1:
        AList.append(n)
    return AList
  
    
N = int(input())

arr = collections.Counter(fanctionA(N))

arr = list(arr.values())

tmp = 1
count = 0
for a in arr:
    while 'true':
        if a >= tmp:
            a -= tmp
            count += 1
            tmp += 1
        else:
            tmp = 1
            break

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=[]
            count = 1
            while temp%i==0:
                if(count not in cnt):
                  cnt.append(count)
                  count = 0 
                count += 1
                temp //= i
            arr.append(len(cnt))

    if temp!=1:
        arr.append(1)

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

    return arr

n = int(input())
num = factorization(n)
if(n == 1):
  num = [0]

print(sum(num))

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
s = factorization(N)

if s[0][0] != 1:
    for i in range(len(s)):
        cnt = 1
        rest = s[i][1]
        while True:
            if cnt <= rest:
                N = N//(s[i][0]**cnt)
                rest -= cnt
                cnt += 1
                ans += 1
            else:
                break
    print(ans)
else:
    print(0)