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):
N = int(input())

def factorizatio(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

ans = 0
for i in factorizatio(N):
    cnt = i[1]
    a = 0
    for j in range(1, cnt+1):
        a += j            
        if a > cnt:
            break
        b += 1    
    ans += b

print(ans)

from collections import Counter

N = 2

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

c = Counter(prime(N))

ans = 0
for i in c.values():
    if i > 0:
        a = 0
        b = 0
        for j in range(1, i+1):
            a += j
            if a > i:
                break
            b += 1    
        ans += b

print(ans)

N = int(input())
if N == 1:
    print(0)
else:
    ans = 0
    for i in range(2, int(N**0.5)+1):
        cnt = 0
        while N%i == 0:
            N /= i
            cnt += 1
            a = 0
            b = 0
            for j in range(1, cnt+1):
                a += j
                if a > cnt:
                    break
                    b += 1    
                    ans += b

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

N = int(input())

ans = 0
for i in range(2, int(N**0.5)+1):
    cnt = 0
    while N%i == 0:
        N /= i
        cnt += 1
    a = 0
    b = 0
    for j in range(1, cnt):
        a += j
        if a > cnt:
            break
        b += 1
        
    ans += b

print(1 if ans==0 else ans)

N = int(input())

def factorizatio(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

ans = 0
for i in factorizatio(N):
    cnt = i[1]
    a = 0
    b = 0
    for j in range(1, cnt+1):
        a += j            
        if a > cnt:
            break
        b += 1    
    ans += b

N = int(input())

ans = 0
for i in range(2, int(N**0.5)+1):
    cnt = 0
    while N%i == 0:
        N /= i
        cnt += 1
    a = 0
    b = 0
    for j in range(1, cnt+1):
        a += j
        if a > cnt:
            break
        b += 1    
    ans += b

if N == 1:
    print(0)
elif ans == 0:
    print(1)
else:
    print(ans)

N = int(input())

if N == 1:
    print(0)

else:
    ans = 0
    for i in range(2, int(N**0.5)+1):
        cnt = 0
        while N%i == 0:
            N /= i
            cnt += 1
            a = 0
            b = 0
            for j in range(1, cnt+1):
                a += j
                if a > cnt:
                    break
                    b += 1    
                ans += b

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

from collections import Counter

N = int(input())

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

c = Counter(prime(N))

ans = 0
for i in c.values():
    if i > 0:
        a = 0
        for j in range(1, cnt+1):
            a += j
            if a > cnt:
                break
            b += 1    
        ans += b

print(ans)

N = int(input())

ans = 0
for i in range(2, int(N**0.5)+1):
    cnt = 0
    while N%i == 0:
        N /= i
        cnt += 1
 
    a = 0
    b = 0
    for j in range(1, cnt+1):
        a += j
        if a > cnt:
            break
        b += 1
        
    ans += b

print(0  N == 1 else 1 if ans==0 else ans)

N = int(input())

def factorizatio(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

ans = 0
for i in factorizatio(N):
    cnt = i[1]
    a = 0
    b = 0
    for j in range(1, cnt+1):
        a += j            
        if a > cnt:
            break
        b += 1    
    ans += b

print(0 if N == 1 else ans)

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Runtime Error

Accepted