Problem: 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.

Submission attempts (in order):
def prime(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(""))

s=0

t=0
lista=prime(n)
aa=len(lista)
c=lista[0]
for i in lista:
    if (c==i):
        t+=1
    else:
        k=1
        while(t>=k):
            t-=k
            s+=1
            k+=1
        t=1
        c=i

if(t!=1):
    k=1
    while(t>=k):
        t-=k
        s+=1
        k+=1
    


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

    print(s)
    
        
            
            
    
    


n=int(input(""))
s=0
i=1
while(n>i):
    
    i+=1
    if (n%2==0 and n!=2):
        continue
    t=0
    while(n%i==0):
        n/=i
        t+=1
    k=1
    while(t>=k):
    
        t-=k
        s+=1
        k+=1

print(s)

def prime(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(""))
if(n==1):
    print(0)
s=0

t=0
lista=prime(n)
aa=len(lista)
c=lista[0]
for i in lista:
    if (c==i):
        t+=1
    else:
        k=1
        while(t>=k):
            t-=k
            s+=1
            k+=1
        t=1
        c=i

if(t!=1):
    k=1
    while(t>=k):
        t-=k
        s+=1
        k+=1
    


        
    
    
    
    
    

print(s)
    
        
            
            
    
    


def prime(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(""))

if(n!=1):
    

    s=0

    t=0
    lista=prime(n)
    aa=len(lista)
    c=lista[0]
    for i in lista:
        if (c==i):
            t+=1
        else:
            k=1
            while(t>=k):
                t-=k
                s+=1
                k+=1
            t=1
            c=i

    if(t!=1):
        k=1
        while(t>=k):
            t-=k
            s+=1
            k+=1
        


            
        
        
    
    
if(n==1):
    s==0

print(s)
    
        
            
            
    
    


def prime(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(""))
s=0
if(n!=1):
    

    

    t=0
    lista=prime(n)
    #print(lista)
    
    c=lista[0]
    for i in lista:
        if (c==i):
            t+=1
        else:
            k=1
            while(t>=k):
                t-=k
                s+=1
                k+=1
            t=1
            c=i


    k=1
    while(t>=k):
        t-=k
        s+=1
        k+=1
        


            
        
        
    
    


print(s)
    
        
            
            
    
    


Verdicts: Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Accepted