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



Sample input:
24


Sample output:
3

Submission status: Wrong Answer

Solution code:
from functools import reduce
def divgame(n):    
    r=set(reduce(list.__add__, 
                ([i, n//i] for i in range(1, int(n**0.5) + 1) if n % i == 0)))
    r=len(r)
    if r%2==0:
        return r/2
    else:
        return (r-1)/2
inp=int(input())
print(int(divgame(inp)))

Submission status: Wrong Answer

Solution code:
import math
import sys
from collections import Counter

N = int(input())
Ns = N
Nso = []
i = 0

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

Nruto = math.sqrt(N)
Nruto = math.floor(Nruto)

#素因数分解していきますpart2
for i in range(2,Nruto+1):
    while N%i==0:
        N=N/i
        Nso.append(i)
    if N==1:
        break
    Nruto = math.sqrt(N)
    Nruto = math.floor(Nruto)


Nso.append(Ns)


# Nso^xの形にカウントしていきます
Nso.sort()
Nso = Counter(Nso)

# 設問の操作をしていきます
x = 0
count = 0
xcount = 0
while Ns > 1 and x <= len(Nso):
    for x in Nso.keys():
        for y in range(1, Nso[x]+1, +1):
            if Ns % (x**y) == 0:
                count = count+1
                Ns = Ns/(x**y)
                xcount = xcount+y
            else:
                break

print(count)

Submission status: Wrong Answer

Solution code:
import math
import sys
from collections import Counter

N = int(input())
Ns = N
Nso = []
i = 0

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

Nruto = math.sqrt(N)
Nruto = math.floor(Nruto)

#素因数分解していきますpart2
for i in range(2,Nruto):
    while N%i==0:
        N=N/i
        Nso.append(i)
    if N==1:
        break
    Nruto = math.sqrt(N)
    Nruto = math.floor(Nruto)

Nso.append(Ns)

# Nso^xの形にカウントしていきます
Nso.sort()
Nso = Counter(Nso)

# 設問の操作をしていきます
x = 0
count = 0
xcount = 0
while Ns > 1 and x <= len(Nso):
    for x in Nso.keys():
        for y in range(1, Nso[x]+1, +1):
            if Ns % (x**y) == 0:
                count = count+1
                Ns = Ns/(x**y)
                xcount = xcount+y
            else:
                break

print(count)

Submission status: Wrong Answer

Solution code:
import sys

n = int(input())
b = 0
if n == 1:
    print(0)
    sys.exit()
c = n
for a in range(2,int(n**(1/2))+1):
    if c % a == 0:
        b = b+1
        c = c/a
if c > n**(1/2):
    b = b+1
print(b)

Submission status: Wrong Answer

Solution code:
import sys

n = int(input())
b = 0
if n == 1:
    print(0)
    sys.exit()
c = n
for a in range(2,int(n**(1/2))+1):
    if c % a == 0:
        b = b+1
        c = c/a
if c > n**(1/2):
    b = b+1
if b == 0:
    b =1
print(b)

Submission status: Wrong Answer

Solution code:
import sys

n = int(input())
b = 0
if n == 1:
    print(0)
    sys.exit()
for a in range(2,int(n**(1/2))+1):
    if n % a == 0:
        b = b+1
        n = n/a
if b == 0:
    b =1
print(b)

Submission status: Wrong Answer

Solution code:
n = int(input())
b = 0
for a in range(2,int((n **(1/2)))+2):
    if n % a == 0:
        b = b+1
        n = n/a
if b == 0:
    b = 1
if n == 1:
    b = 0
print(b)

Submission status: Wrong Answer

Solution code:
n = int(input())
b = 0
for a in range(2,int((n **(1/2)))+2):
    if n % a == 0:
        b = b+1
        n = n/a
if b == 0:
    b = 1
print(b)

Submission status: Wrong Answer

Solution code:
n = int(input())
b = 0
for a in range(2,int((n **(1/2)))+2):
    if n % a == 0:
        b = b+1
        n = n/a
print(b)

Submission status: Wrong Answer

Solution code:
N = int(input())

div_counts = []
for i in range(2, int(N**0.5)+1):
  count = 0
  while N%i == 0:
    count += 1
    N //= i
    if N == 1:
      break
  div_counts.append(count)
  
if N != 1:
  div_counts.append(1)
  
ans = 0
for count in div_counts:
  for i in range(1, count):
    if count >= i:
      ans += 1
      count -= i
print(ans)

Submission status: Wrong Answer

Solution code:
import math
 
N = int(input())
num_list = [0] + [0] * (int(math.sqrt(N))+1)  # 0~N
pn_list = []
for i in range(2, int(math.sqrt(N))+2):
    if num_list[i] == 0:
        pn_list.append(i)
        num_list[i::i] = [1] * len(num_list[i::i])
        
count = 0
for pn in pn_list:
    e = 1
    while N%(pn**e)==0 and N//(pn**e)>=1:
        N //= (pn**e)
        e += 1
        count += 1
if count == 0 and N>1:
    count += 1
print(count)

Submission status: Wrong Answer

Solution code:
import math

N = int(input())
num_list = [0] + [0] * int(math.sqrt(N))  # 0~N
pn_list = []
for i in range(2, int(math.sqrt(N))+1):
    if num_list[i] == 0:
        pn_list.append(i)
        num_list[i::i] = [1] * len(num_list[i::i])

count = 0
for pn in pn_list:
    e = 1
    while N%(pn**e)==0 and N//(pn**e)>=1:
        N //= (pn**e)
        e += 1
        count += 1
if count == 0 and N>1:
    count += 1
print(count)

Submission status: Wrong Answer

Solution code:
import math

N = int(input())
num_list = [0] + [0] * int(math.sqrt(N))  # 0~N
pn_list = []
for i in range(2, int(math.sqrt(N))+1):
    if num_list[i] == 0:
        pn_list.append(i)
        num_list[i::i] = [1] * len(num_list[i::i])

count = 0
for pn in pn_list:
    e = 1
    while N%(pn**e)==0 and N//(pn**e)>=1:
        N //= (pn**e)
        e += 1
        count += 1
if count == 0:
    count += 1
print(count)

Submission status: Wrong Answer

Solution code:
import math

N = int(input())
num_list = [0] + [0] * int(math.sqrt(N))  # 0~N
pn_list = []
for i in range(2, int(math.sqrt(N))+1):
    if num_list[i] == 0:
        pn_list.append(i)
        num_list[i::i] = [1] * len(num_list[i::i])

count = 0
for pn in pn_list:
    e = 1
    while N%(pn**e)==0 and N//(pn**e)>=1:
        N //= (pn**e)
        e += 1
        count += 1
if count == 0:
    count += 1
print(count)
print(count)

Submission status: Wrong Answer

Solution code:
import math

N = int(input())
num_list = [0] + [0] * int(math.sqrt(N))  # 0~N
pn_list = []
for i in range(2, int(math.sqrt(N))+1):
    if num_list[i] == 0:
        pn_list.append(i)
        num_list[i::i] = [1] * len(num_list[i::i])

count = 0
for pn in pn_list:
    e = 1
    while N%(pn**e)==0 and N//(pn**e)>=1:
        N //= (pn**e)
        e += 1
        count += 1
if count == 0:  # count==0のとき，Nは素数のため
    count += 1
print(count)
print(count)

Submission status: Wrong Answer

Solution code:
import math

N = int(input())
num_list = [0] + [0] * int(math.sqrt(N))  # 0~N
pn_list = []
for i in range(2, int(math.sqrt(N))+1):
    if num_list[i] == 0:
        pn_list.append(i)
        num_list[i::i] = [1] * len(num_list[i::i])

count = 0
for pn in pn_list:
    e = 1
    while N%(pn**e)==0 and N//(pn**e)>=1:
        N //= (pn**e)
        e += 1
        count += 1
print(count)

Submission status: Wrong Answer

Solution code:
import math
import sys
from collections import Counter

def is_mod(num):
    if num % soList[0] == 0:
        return False
    else:
        return True

N = int(input())
Ns=N
Nso = []
soList = []
i=0

#高速化のためのいろいろ
while N%10==0:
    N=N/10
    Nso.append(2)
    Nso.append(5)

while N%9==0:
    N=N/9
    Nso.append(3)
    Nso.append(3)

while N%5==0:
    N=N/5
    Nso.append(5)

while N%111==0:
    N=N/111
    Nso.append(37)
    Nso.append(3)

while N%11==0:
    N=N/11
    Nso.append(11)    



Nruto = math.sqrt(N)
Nruto = math.ceil(Nruto)

Nruto2 = math.sqrt(Nruto)
Nruto2 = math.ceil(Nruto2)

if N!=1:
    # 2~√Nまでと、自身の数字をsoListに入れます
    soList = list(range(2, Nruto+1))
    soList.append(N)

    # 素因数分解していきます
    while len(soList)>0:
        while N % soList[0] == 0:
            N = N/soList[0]
            Nso.append(soList[0])

        soList = list(filter(is_mod, soList))
        if Nruto2<=soList[0]:
            break

#残りのsoListは全部素数なのでNsoにいれていく
Nso.extend(soList)

if len(Nso)==0:
    print(0)
    sys.exit()

# Nso^xの形にカウントしていきます
Nso = Counter(Nso)

# 設問の操作をしていきます
x = 0
count = 0
while Ns > 1 and x <= len(Nso):
    for x in Nso.keys():
        for y in range(1, Nso[x]+1, +1):
            if Ns % (x**y) == 0:
                count = count+1
                Ns = Ns/(x**y)
            else:
                break

print(count)

Submission status: Wrong Answer

Solution code:
import math
import sys
from collections import Counter

def is_mod(num):
    if num % soList[0] == 0:
        return False
    else:
        return True

N = int(input())
Ns=N
Nso = []
soList = []
i=0


while N%10==0:
    N=N/10
    Nso.append(2)
    Nso.append(5)

while N%9==0:
    N=N/9
    Nso.append(3)
    Nso.append(3)

while N%5==0:
    N=N/5
    Nso.append(5)

while N%111==0:
    N=N/111
    Nso.append(37)
    Nso.append(3)

while N%11==0:
    N=N/11
    Nso.append(11)    



Nruto = math.sqrt(N)
Nruto = math.ceil(Nruto)


if N!=1:
    # 2~√Nまでと、自身の数字をsoListに入れます
    soList = list(range(2, Nruto+1))
    soList.append(N)

    # 素因数分解していきます
    while len(soList)>0:
        while N % soList[0] == 0:
            N = N/soList[0]
            Nso.append(soList[0])
        soList = list(filter(is_mod, soList))


if len(Nso)==0:
    print(0)
    sys.exit()

# Nso^xの形にカウントしていきます
Nso = Counter(Nso)

# 設問の操作をしていきます
x = 0
count = 0
while Ns > 1 and x <= len(Nso):
    for x in Nso.keys():
        for y in range(1, Nso[x]+1, +1):
            if Ns % (x**y) == 0:
                count = count+1
                Ns = Ns/(x**y)
            else:
                break

print(count)

Submission status: Wrong Answer

Solution code:
import math
import sys
from collections import Counter

def is_mod(num):
    if num % soList[0] == 0:
        return False
    else:
        return True

N = int(input())
Ns=N
Nso = []
soList = []
i=0

while N%10==0:
    N=N/10
    Nso.append(2)
    Nso.append(5)

while N%9==0:
    N=N/9
    Nso.append(3)
    Nso.append(3)

Nruto = math.sqrt(N)
Nruto = math.floor(Nruto)

if N!=1:
    # 2~√Nまでと、自身の数字をsoListに入れます
    soList = list(range(2, Nruto+1))
    soList.append(N)

    # 素因数分解していきます
    while len(soList)>0:
        while N % soList[0] == 0:
            N = N/soList[0]
            Nso.append(soList[0])
        soList = list(filter(is_mod, soList))


if len(Nso)==0:
    print(0)
    sys.exit()

# Nso^xの形にカウントしていきます
Nso = Counter(Nso)

# 設問の操作をしていきます
x = 0
count = 0
while Ns > 1 and x <= len(Nso):
    for x in Nso.keys():
        for y in range(1, Nso[x]+1, +1):
            if Ns % (x**y) == 0:
                count = count+1
                Ns = Ns/(x**y)
            else:
                break

print(count)

Submission status: Wrong Answer

Solution code:
import math
import sys
from collections import Counter

def is_mod(num):
    if num % soList[0] == 0:
        return False
    else:
        return True

N = int(input())
Ns=N
Nso = []
soList = []
i=0

while N%10==0:
    N=N/10
    Nso.append(2)
    Nso.append(5)



Nruto = math.sqrt(N)
Nruto = math.floor(Nruto)

if N!=1:
    # 2~√Nまでと、自身の数字をsoListに入れます
    soList = list(range(2, Nruto+1))
    soList.append(N)

    # 素因数分解していきます
    while len(soList)>0:
        while N % soList[0] == 0:
            N = N/soList[0]
            Nso.append(soList[0])
        soList = list(filter(is_mod, soList))


if len(Nso)==0:
    print(0)
    sys.exit()

# Nso^xの形にカウントしていきます
Nso = Counter(Nso)

# 設問の操作をしていきます
x = 0
count = 0
while Ns > 1 and x <= len(Nso):
    for x in Nso.keys():
        for y in range(1, Nso[x]+1, +1):
            if Ns % (x**y) == 0:
                count = count+1
                Ns = Ns/(x**y)
            else:
                break

print(count)

Submission status: Wrong Answer

Solution code:
import math
def primes(x):
    if x < 2: return []

    primes = [i for i in range(x)]
    primes[1] = 0

    for prime in primes:
        if prime > math.sqrt(x): break
        if prime == 0: continue
        for non_prime in range(2 * prime, x, prime): primes[non_prime] = 0

    return [prime for prime in primes if prime != 0]

def is_prime(n):
    if n == 1: return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False

    return True

n = int(input())
if n==1:
    print(0)
elif is_prime(n):
    print(1)
else:
    cnt = 0
    P = primes(int(math.sqrt(n))+1)
    for p in P:
        c = 1
        while n%pow(p,c)==0:
            n /= pow(p,c)
            cnt += 1
            c += 1
    print(cnt)

Submission status: Wrong Answer

Solution code:
import math
def primes(x):
    if x < 2: return []

    primes = [i for i in range(x)]
    primes[1] = 0

    for prime in primes:
        if prime > math.sqrt(x): break
        if prime == 0: continue
        for non_prime in range(2 * prime, x, prime): primes[non_prime] = 0

    return [prime for prime in primes if prime != 0]

def is_prime(n):
    if n == 1: return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False

    return True

n = int(input())
if n==1:
    print(0)
elif is_prime(n):
    print(1)
else:
    cnt = 0
    P = primes(int(math.sqrt(n)))
    for p in P:
        c = 1
        while n%pow(p,c)==0:
            n /= pow(p,c)
            cnt += 1
            c += 1
    print(cnt)

Submission status: Wrong Answer

Solution code:
import math
def primes(x):
    if x < 2: return []

    primes = [i for i in range(x)]
    primes[1] = 0

    for prime in primes:
        if prime > math.sqrt(x): break
        if prime == 0: continue
        for non_prime in range(2 * prime, x, prime): primes[non_prime] = 0

    return [prime for prime in primes if prime != 0]

n = int(input())
cnt = 0
P = primes(int(math.sqrt(n)))
for p in P:
    c = 1
    while n%pow(p,c)==0:
        n /= pow(p,c)
        cnt += 1
        c += 1
print(cnt if cnt!=0 else 1)

Submission status: Wrong Answer

Solution code:
import math
def primes(x):
    if x < 2: return []

    primes = [i for i in range(x)]
    primes[1] = 0

    for prime in primes:
        if prime > math.sqrt(x): break
        if prime == 0: continue
        for non_prime in range(2 * prime, x, prime): primes[non_prime] = 0

    return [prime for prime in primes if prime != 0]

n = int(input())
cnt = 0
P = primes(int(math.sqrt(n)))
for p in P:
    c = 1
    while n%pow(p,c)==0:
        n /= pow(p,c)
        cnt += 1
        c += 1
print(cnt)

Submission status: Wrong Answer

Solution code:
import math
from collections import defaultdict


def calc_prime(n):
    primes = set(list(range(3, n, 2)))
    primes.add(2)
    for a in range(3, n, 2):
        for i in range(a, n):
            x = a * i
            if x >= n:
                break
            if x in primes:
                primes.remove(x)

    return primes


def prime_fact(n):
    ps = calc_prime(int(math.sqrt(n + 1) + 1))
    ps = sorted(list(ps))
    vs = defaultdict(int)
    for p in ps:
        while True:
            if n % p == 0:
                n /= p
                vs[p] += 1
            else:
                break

    return vs


def main():
    n = int(input())
    if n == 1:
        print(0)
        return

    ps = prime_fact(n)
    if ps:
        #print(ps)
        c = 0
        for p, v in ps.items():
            i = 1
            #print(p, v)
            while v >= i:
                v -= i
                i += 1
                c += 1

        print(c)

    else:
        print(1)



main()

Submission status: Wrong Answer

Solution code:
import math


def calc_prime(n):
    primes = set(list(range(3, n, 2)))
    primes.add(2)
    for a in range(3, n, 2):
        for i in range(a, n):
            x = a * i
            if x >= n:
                break
            if x in primes:
                primes.remove(x)

    return primes


def prime_fact(n):
    ps = calc_prime(int(math.sqrt(n) + 1))
    ps = sorted(list(ps))
    vs = {}
    for p in ps:
        while True:
            if n % p == 0:
                n /= p
                if p in vs:
                    vs[p] += 1
                else:
                    vs[p] = 1
            else:
                break

    return vs
    

def main():
    n = int(input())
    if n == 1:
        print(0)
        return
    ps = prime_fact(n)
    if ps:
        #print(ps)
        c = 0
        for p, v in ps.items():
            i = 1
            #print(p, v)
            while v >= i:
                v -= i
                i += 1
                c += 1
                
        print(c)
            
    else:
        print(1)
        

    

main()

Submission status: Wrong Answer

Solution code:
def main():
    n=int(input())
    dic={}
    i=2
    import math
    maxi=n
    while n>1 and i<=maxi//2+2:
        if n%i==0:
            tmp=0
            while n%i==0:
               n//=i
               tmp+=1
            dic[i]=tmp
        i+=1
    if len(dic)==0:
        dic[n]=1
    ans=0
    for v in dic.values():
        tmp=1
        while v>0:
            v-=tmp
            tmp+=1
            if v>=0:
                ans+=1
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    n=int(input())
    dic={}
    i=2
    import math
    maxi=n
    while n>1 and i<=int(maxi)+2:
        if n%i==0:
            tmp=0
            while n%i==0:
               n//=i
               tmp+=1
            dic[i]=tmp
        i+=1
    if len(dic)==0:
        dic[n]=1
    ans=0
    for v in dic.values():
        tmp=1
        while v>0:
            v-=tmp
            tmp+=1
            if v>=0:
                ans+=1
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    n=int(input())
    dic={}
    i=2
    import math
    maxi=math.sqrt(n)
    while n>1 and i<=int(maxi)+2:
        if n%i==0:
            tmp=0
            while n%i==0:
               n//=i
               tmp+=1
            dic[i]=tmp
        i+=1
    if len(dic)==0:
        dic[n]=1
    ans=0
    for v in dic.values():
        tmp=1
        while v>0:
            v-=tmp
            tmp+=1
            if v>=0:
                ans+=1
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math

def primelist(num):
    if num < 2:
        return []
    ls = [2]
    n = int(math.sqrt(num))
    for i in range(3, n+1, 2):
        prime = True
        for j in ls:
            if i % j ==0:
                prime = False
                break
        if prime:
            ls += [i]
    prime = True
    for j in ls:
        if num % j ==0:
            prime = False
            break
    if prime:
        ls += [num]
    return ls

n = int(input())
ls = primelist(n)

ans = 0
for i in ls:
    j = i
    while n % j == 0:
        ans += 1
        j *= i
print(ans)

Submission status: Wrong Answer

Solution code:
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) 
print(arr)

cnt = 0
if n == 1:
    pass
else:
    for ar in arr:
        i = 1
        while 1:
            ar[1]-=i
            if ar[1] < 0:
                break
            cnt += 1
            i+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
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) 
print(arr)

cnt = 0
for ar in arr:
    i = 1
    while 1:
        ar[1]-=i
        if ar[1] < 0:
            break
        cnt += 1
        i+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
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) 
print(arr)

cnt = 0
for ar in arr:
    i = 1
    while ar[1]>0:
        cnt+=1
        ar[1]-=i
        i+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
from collections import defaultdict
import math
#%% prime_numbers
def trial_division(n: int) -> defaultdict:
    #素因数の辞書
    factor = defaultdict(int)
    #2から√n以下の数字で割っていく
    tmp = int(math.sqrt(n)) + 1
    for num in range(2,tmp):
        while n % num == 0:
            n //= num
            factor[num] += 1
    #リストが空ならそれは素数
    if not factor:
        factor[n] = 1
    else:
        factor[n] += 1
    return factor

if __name__ == "__main__":
    N = int(input())
    factor = trial_division(N)
    ans = 0
    for key in factor.keys():
        if(key != 1):
            ans += math.ceil(factor[key] / 2)
    print(ans)

Submission status: Wrong Answer

Solution code:
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())
cnt = 0
for fact in factorization(n):
    for j in range(fact[1]):
        z = fact[0] ** j
        if n % z == 0:
            if z != fact[0] and z != j and z != n:
                n = n // z
                cnt += 1
print(cnt)

Submission status: Wrong Answer

Solution code:
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())
cnt = 0
if n > 0:
    for fact in factorization(n):
        for j in range(fact[1]):
            z = fact[0] ** j
            if n % z == 0:
                if z != fact[0] and z != j and z != n:
                    n = n // z
                    cnt += 1
print(cnt)

Submission status: Wrong Answer

Solution code:
# prime factorization
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)
cnt = 0
if n == 1:
    print("0")
    exit()
for i in ans:
    print(i)
    num = i[1]
    j = 1
    while num - j >= 0:
        num = num - j
        j +=1
        cnt +=1
print(cnt)

Submission status: Wrong Answer

Solution code:
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)
cnt=0
if N==1:
  print("0")
  exit()
for i in ans:
  num=i[1]
  j=1
  while True:
    num=num-j
    j+=1
    cnt+=1
    if num<=0:
      break
print(cnt)

Submission status: Wrong Answer

Solution code:
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)
cnt=0
for i in ans:
  num=i[1]
  j=1
  while True:
    num=num-j
    j+=1
    cnt+=1
    if num<=0:
      break
print(cnt)

Submission status: Wrong Answer

Solution code:
from math import sqrt

N = int(input())

prime = 2
total_count = 0

def different_nums(count, num=1):
  if count - num == 0:
    return 1
  elif count - num > 0:
    return 1 + different_nums(count - num, num + 1)
  else:
    return 0
  


while N != 1:
  count = 0
  rooted_N = sqrt(N)
  
  if prime > rooted_N:
    total_count = 1
    break
  while N % prime == 0:
    N = N // prime
    count += 1
  total_count += different_nums(count)
  if prime == 2:
    prime = 3
  else:
    prime += 2

  
print(total_count)

Submission status: Wrong Answer

Solution code:
import math


# 素数の判定
def is_prime(n):
    if n == 1:
        return 0

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            if k not in check:
                check[k] = 0
                return n / k
            else:
                continue
    if n in check:
        return 0
    else:
        return 1


check = {}
n = int(input())
if n == 1:
    print(0)
else:
    ans = 0
    while (1):
        n = is_prime(n)
        if n == 0:
            break
        else:
            ans += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
from math import sqrt

N = int(input())

prime = 2
total_count = 0

def different_nums(count, num=1):
  if count - num == 0:
    return 1
  elif count - num > 0:
    return 1 + different_nums(count - num, num + 1)
  else:
    return 0
  
rooted_N = sqrt(N)

while N != 1:
  count = 0
  if prime > rooted_N:
    total_count = 1
    break
  while N % prime == 0:
    N = N / prime
    count += 1
  total_count += different_nums(count)
  if prime == 2:
    prime = 3
  else:
    prime += 2

  
print(total_count)

Submission status: Wrong Answer

Solution code:
from math import sqrt

N = int(input())

prime = 2
total_count = 0

def different_nums(count, num=1):
  if count - num == 0:
    return 1
  elif count - num > 0:
    return 1 + different_nums(count - num, num + 1)
  else:
    return 0
  
rooted_N = sqrt(N)

while N != 1:
  count = 0
  if prime >= rooted_N:
    total_count = 1
    break
  while N % prime == 0:
    N = N / prime
    count += 1
  total_count += different_nums(count)
  if prime == 2:
    prime = 3
  else:
    prime += 2

  
print(total_count)

Submission status: Wrong Answer

Solution code:
from math import sqrt

N = int(input())

prime = 2
total_count = 0

def different_nums(count, num=1):
  if count - num == 0:
    return 1
  elif count - num > 0:
    return 1 + different_nums(count - num, num + 1)
  else:
    return 0
  
rooted_N = sqrt(N)

while N != 1:
  count = 0
  while N % prime == 0:
    N = N / prime
    count += 1
  total_count += different_nums(count)
  if prime == 2:
    prime = 3
  else:
    prime += 2
  if prime >= rooted_N:
    total_count = 1
    N = 1
  
print(total_count)

Submission status: Wrong Answer

Solution code:
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

import collections
n = int(input())
c = collections.Counter(prime_factorize(n))
ans = 0
for key in c.keys():
    if c[key] == 1:
        ans += 1
    elif c[key] % 2 == 0:
        ans += c[key] // 2
    elif c[key] % 2 == 1:
        ans += c[key] // 2 + 1
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
k=2
c=0
while n!=1:
  while n%k!=0:
    k+=1
  n=n/k
  c+=1
print(c-1)

Submission status: Wrong Answer

Solution code:
n = int(input())

s = []
for i in range(2, int(n**0.5)+1):
  t = 0
  while n%i == 0:
    n //= i
    t += 1
  s.append(t)
  if n == 1: break

if n > 1: s.append(1)
  
ans = 0
for i in s:
  for j in range(1, i+1):
    if i >= j:
      i -= 1
      ans += 1
    else:
      break
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

s = []
for i in range(2, int(n**0.5)):
  t = 0
  while n%i == 0:
    n //= i
    t += 1
  s.append(t)
  if n == 1: break

if n > 1: s.append(1)
  
ans = 0
for i in s:
  for j in range(1, i+1):
    if i >= j:
      i -= 1
      ans += 1
    else:
      break
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

s = []
for i in range(2, int(n**0.5)):
  t = 0
  while n%i == 0:
    n //= i
    t += 1
  s.append(t)
  if n == 1: break

if n > 1: s.append(1)
  
ans = 0
for i in s:
  for j in range(1, i+1):
    if i >= j:
      i -= 1
      ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
r = 0

for p in range(2, int(n**0.5)+1):
    e = 0
    if n%p == 0:
        e += 1
        n /= p
    i = 1
    if e >= i:
        e -= i
        r += 1
        i += 1

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

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
total = 0
count2 = 0
for n in range(2,int(math.sqrt(N))+1):
  if N%n == 0:
    count1 = 1
    count2 = 0
    while N%n==0:
      N = N//n
      count2+=1
      if count2 == count1:
        count2 = 0
        count1 += 1
        total += 1
if total==0 and N!=1 and count2 == 0:
  print(1)
else:
  print(total)

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
total = 0
for n in range(2,int(math.sqrt(N))+1):
  if N%n == 0:
    count1 = 1
    count2 = 0
    while N%n==0:
      N = N//n
      count2+=1
      if count2 == count1:
        count2 = 0
        count1 += 1
        total += 1
if total==0 and N!=1:
  print(1)
else:
  print(total)

Submission status: Wrong Answer

Solution code:
from typing import List
from collections import Counter


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


def count_answer(counter):
    ans = 0
    for count in counter.values():
        i = 1
        while count >= i:
            ans += 1
            count -= 1
            i += 1
    return ans


if __name__ == "__main__":
    prime_factors = Counter(prime_factorize(int(input())))
    print(count_answer(prime_factors))