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:
# import sys
# import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import product,permutations,\
#     combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import itemgetter,mul
# from fractions import Fraction
# from functools import reduce

mod = int(1e9+7)
# mod = 998244353
INF = 1<<29
lINF = 1<<35

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

def prime_fact(a): # 素因数分解
    fact = {}
    prime = set()
    for i in range(2,int(a**(1/2)+1)):
        if a%i==0:
            fact[i] = 0
            while a%i==0:
                a //= i
                fact[i] += 1
    if not fact:
        fact[a] = 1
    return fact

def main():
    n = int(input())
    if n==1:
        print(0)
        return
    fact = prime_fact(n)
    ans = 0
    for x in fact.keys():
        i = 1
        while i<=fact[x]:
            fact[x] -= i
            i += 1
            ans += 1
    print(ans)
    return

if __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math
from collections import Counter
A= int(input())
resArray = []
tmpA = A
i = 1
while i <= math.sqrt(A):
    #print (i)
    i += 1
    if tmpA == 1:
        break

    if i >2 and i %2 == 0:
        continue


    while tmpA % i == 0:
        tmpA = tmpA / i
        resArray.append(i)

res = 0
if tmpA == A:
    print(1)
    exit()
elif tmpA > 1:
    res += 1


cArray = Counter(resArray)

for i in cArray.values():
    if i > 0:
        
        tmp = 1
        while tmp*(tmp+1)//2 <= i:
            tmp += 1
        res += tmp -1
print(res)

Submission status: Wrong Answer

Solution code:
from queue import deque
from math import log2

N = int(input())

primenum = []

for i in range(2, int(log2(N))+1):
    for n in primenum:
        if i % n == 0:
            break
    else:
        primenum.append(i)

kouho_num = set()

for n in primenum:
    for i in range(1, int(log2(N)/log2(n))+1):
        if n**i <= N:
            kouho_num.add(n**i)
        else:
            break

queue = deque([(N, 0, kouho_num)])

divnum, countnum = 0, 0
pnum = set()

res = 0

while queue:
    divnum, countnum, pnum = queue.popleft()
    if divnum == 1:
        res = max(res, countnum)
        continue
    elif divnum < 0:
        continue
    flag = 1
    for num in pnum:
        if divnum % num == 0:
            queue.append((divnum//num, countnum + 1, pnum - set([num])))
            flag = 0
    if divnum > 1 and flag:
        res = max(res, countnum+1)
print(res)

Submission status: Wrong Answer

Solution code:
import math
from collections import Counter
A= int(input())
resArray = []
tmpA = A
i = 1
while i <= math.sqrt(A):
    #print (i)
    i += 1
    if tmpA == 1:
        break

    if i >2 and i %2 == 0:
        continue


    while tmpA % i == 0:
        tmpA = tmpA / i
        resArray.append(i)

res = 0
if tmpA == A:
    print(1)
    exit()
else:
    res += 1


cArray = Counter(resArray)

for i in cArray.values():
    if i > 0:
        
        tmp = 1
        while tmp*(tmp+1)//2 <= i:
            tmp += 1
        res += tmp -1
print(res)

Submission status: Wrong Answer

Solution code:
n = int(input())
#print(n)
if n == 1:
    print(0)
    exit()

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

    if seq==[]:
        seq.append(n)
    return seq

#print(factorization(n))

ans = []
tmp = 1
for j in factorization(n):
    if j not in ans:
        ans.append(j)
    else:
        r = tmp * j
        if r != tmp:
            if r not in ans:
                ans.append(r)
                tmp = 1
            else:
                tmp = r
#print(ans)
print(len(ans))

Submission status: Wrong Answer

Solution code:
# import sys
# import math #sqrt,gcd,pi
# import decimal
# import queue # queue
# import bisect
# import heapq # priolity-queue
# import time
# from itertools import product,permutations,\
#     combinations,combinations_with_replacement
# 重複あり順列、順列、組み合わせ、重複あり組み合わせ
# import collections # deque
# from operator import itemgetter,mul
# from fractions import Fraction
# from functools import reduce

mod = int(1e9+7)
# mod = 998244353
INF = 1<<29
lINF = 1<<35

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

def prime_fact(a): # 素因数分解
    fact = {}
    for i in range(2,int(a**(1/2)+1)):
        if a%i==0:
            fact[i] = 0
            while a%i==0:
                a //= i
                fact[i] += 1
    if not fact:
        fact[a] = 1
    return fact

def main():
    n = int(input())
    fact = prime_fact(n)
    ans = 0
    for x in fact.keys():
        i = 1
        while i<=fact[x]:
            fact[x] -= i
            i += 1
            ans += 1
    print(ans)
    return

if __name__=='__main__':
    main()

Submission status: Wrong Answer

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

l = prime_factorize(n)
s = set(l)
x = len(l)
y = len(s)
print(x - (x - y)//2)

Submission status: Wrong Answer

Solution code:
def prime_factorize(n):
    a = []
    tmp = n
    for i in range(2,int(n**0.5//1+1)):
        if tmp%i == 0:
            cnt = 0
            while tmp%i == 0:
                cnt += 1
                tmp //= i
            a.append([i,cnt])
        
    if tmp != 1:
        a.append([tmp,1])
    
    if a == []:
        a.append([n,1])
    
    return a

n = int(input())

x = prime_factorize(n)
cnt = 0

if x[0][0]==1:
    print(x)
    exit

for i in range(len(x)):
    k = x[i][1]
    for j in range(k):
        if n%(x[i][0]**(j+1)) == 0:
            n //= x[i][0]**(j+1)
            cnt += 1
            k-=(j+1)
        elif n%(x[i][0]**(j+1)) != 0:
            break
        if k <= 0:
            break
print(cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())

if n == 1:
    print(0)

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

fact = factorization(n)

ans = 0
for x, y in fact:
    tmp = 1
    while True:
        if (tmp + 1) * (tmp + 2) // 2 <= y:
            tmp += 1
        else:
            break

    ans += tmp

print(ans)

Submission status: Wrong Answer

Solution code:
import math
num = int(input())
if num == 0 or num ==1:
    print(0)
elif num == 2:
    print(1)
else:
    start = 2
    k = 0
    while start <=  num:
        if num % start == 0:
            k += 1
            num = int(num/start)
            start += 1
        else:
            start += 1
    print(k)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
n = N
for i in range(2, int(N**0.5)+1):
    if n % i == 0:
        list1 = []
        while n % i == 0:
            list1.append(i)
            n //= i
        x = len(list1)
        ans += -0.5+((1+8*x)**0.5)/2
if ans == 0 and N != 1:
    ans = 1
ansstr = str(ans)
print(int(ansstr[0]))

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
n = N
for i in range(2, int(N**0.5)+1):
    if n % i == 0:
        list1 = []
        while n % i == 0:
            list1.append(i)
            n //= i
        x = len(list1)
        ans += int(-0.5+((1+8*x)**0.5)/2)
if ans == 0 and N != 1:
    ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
n = N
for i in range(2, int(N**0.5)+1):
    if n % i == 0:
        list1 = []
        while n % i == 0:
            list1.append(i)
            n //= i
        ans += int((-1+(1+8*(len(list1)))**0.5)//2)
if ans == 0 and N != 1:
    ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:
"""
~~ Author : Bhaskar
~~ Dated : 01~06~2020
"""

import sys
from bisect import *
from math import floor,sqrt,ceil,factorial as F,gcd,pi
from itertools import chain,combinations,permutations,accumulate
from collections import Counter,defaultdict,OrderedDict,deque
from array import array
INT_MAX = sys.maxsize
INT_MIN = -(sys.maxsize)-1
mod = 1000000007
lcm = lambda a,b : (a*b)//gcd(a,b)
setbit = lambda x : bin(x)[2:].count("1")

def solve():
    n = int(sys.stdin.readline())
    d = Counter()
    while n%2 == 0:
        d[2] += 1
        n //= 2
    i = 3
    while i*i < n:
        if n%i == 0:
            while n%i == 0:
                d[i] += 1
                n //= i
        i += 2
    if n != 1:
        d[n] += 1
    ans = 0
    for k,v in d.items():
        ans += len(bin(v))-2
    print(ans)

if __name__ == "__main__":
    try:
        sys.stdin = open("input.txt","r")
    except :
        pass
    solve()

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
N = n
a = []
for i in range(2,int(n**0.5//1)+2):
  if n % i == 0:
    ans += 1
    n //= i
    a.append(i)
    
if n > 1 and a.count(n) == 0:
  ans = ans + 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
N = n
a = []
for i in range(2,int(n**0.5//1 + 2)):
  if n % i == 0:
    ans += 1
    n //= i
    a.append(i)
    
if n > 1 and a.count(n) == 0:
  ans = ans + 1
print(ans)

Submission status: Wrong Answer

Solution code:
"""
~~ Author : Bhaskar
~~ Dated : 01~06~2020
"""

import sys
from bisect import *
from math import floor,sqrt,ceil,factorial as F,gcd,pi
from itertools import chain,combinations,permutations,accumulate
from collections import Counter,defaultdict,OrderedDict,deque
from array import array
INT_MAX = sys.maxsize
INT_MIN = -(sys.maxsize)-1
mod = 1000000007
lcm = lambda a,b : (a*b)//gcd(a,b)
setbit = lambda x : bin(x)[2:].count("1")

primes = []
maxN = 10**6

def seive():
    bool = [True]*(maxN+10)
    bool[0] = bool[1] = False
    p = 2
    while p*p < maxN:
        if bool[p]:
            i = p*p
            while i < maxN:
                bool[i] = False
                i+=p
        p += 1
    for i in range(2,maxN):
        if bool[i]:
            primes.append(i)

def solve():
    seive()
    # print(pri mes)
    n = int(sys.stdin.readline())
    d = Counter()
    for i in primes:
        if i*i < n:
            if n%i == 0:
                while n%i == 0:
                     d[i]+=1
                     n //= i
    if (n!=1):
         d[n]+=1
    ans = 0
    for k,v in d.items():
        ans += len(bin(v))-2
    print(ans)

if __name__ == "__main__":
    try:
        sys.stdin = open("input.txt","r")
    except :
        pass
    solve()

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
d = 0
for i in range(2,int(n**0.5//1 + 2)):
  if n % i == 0:
    d = 1
    ans += 1
    n //= i
    
if n > 1 and d == 0:
  ans = ans + 1
print(ans)

Submission status: Wrong Answer

Solution code:
"""
~~ Author : Bhaskar
~~ Dated : 01~06~2020
"""

import sys
from bisect import *
from math import floor,sqrt,ceil,factorial as F,gcd,pi
from itertools import chain,combinations,permutations,accumulate
from collections import Counter,defaultdict,OrderedDict,deque
from array import array
INT_MAX = sys.maxsize
INT_MIN = -(sys.maxsize)-1
mod = 1000000007
lcm = lambda a,b : (a*b)//gcd(a,b)
setbit = lambda x : bin(x)[2:].count("1")

primes = []
maxN = 10**5

def seive():
    bool = [True]*(maxN+10)
    bool[0] = bool[1] = False
    p = 2
    while p*p < maxN:
        if bool[p]:
            i = p*p
            while i < maxN:
                bool[i] = False
                i+=p
        p += 1
    for i in range(2,maxN):
        if bool[i]:
            primes.append(i)

def solve():
    seive()
    # print(pri mes)
    n = int(sys.stdin.readline())
    d = Counter()
    for i in primes:
        if i*i < n:
            if n%i == 0:
                while n%i == 0:
                     d[i]+=1
                     n //= i
    if (n!=1):
         d[n]+=1
    ans = 0
    for k,v in d.items():
        ans += len(bin(v))-2
    print(ans)

if __name__ == "__main__":
    try:
        sys.stdin = open("input.txt","r")
    except :
        pass
    solve()

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())

    fp = {}
    i = 1
    tmp = n
    while i * i <= n:
        i += 1
        while tmp % i == 0:
            tmp = int(tmp // i)
            if i in fp.keys():
                fp[i] += 1
            else:
                fp[i] = 1
    if len(fp.keys()) == 0:
        fp[n] = 1

    ans = 0
    for cnt in fp.values():
        i = 1
        while(cnt >= i):
            cnt -= i
            ans += 1
            i += 1
    print(int(ans))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())

    fp = {}
    i = 1
    tmp = n
    while i * i <= n:
        i += 1
        while tmp % i == 0:
            tmp = int(tmp / i)
            if i in fp.keys():
                fp[i] += 1
            else:
                fp[i] = 1
    if len(fp.keys()) == 0:
        fp[n] = 1

    ans = 0
    for cnt in fp.values():
        i = 1
        while(cnt >= i):
            cnt -= i
            ans += 1
            i += 1
    print(int(ans))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())

    fp = {}
    i = 1
    tmp = n
    while i * i <= n:
        i += 1
        while tmp % i == 0:
            tmp /= i
            if i in fp.keys():
                fp[i] += 1
            else:
                fp[i] = 1
    if len(fp.keys()) == 0:
        fp[n] = 1

    ans = 0
    for cnt in fp.values():
        i = 1
        while(cnt >= i):
            cnt -= i
            ans += 1
            i += 1
    print(int(ans))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 0

i = 2
num = n
while i * i <= n:
  cnta = 0
  cntb = 0
  while num % i == 0:
    num //= i
    if cnta == cntb:
      ans += 1
      cnta = 0
      cntb += 1
    else:
      cnta += 1
  i += 1
  
if ans == 0 and n != 1:
  ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
d = 0
for i in range(2,int(n**0.5//1 + 1)):
  if n % i == 0:
    d = 1
    ans += 1
    n //= i
    
if n > 1:
  ans = ans + 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 0

i = 2
num = n
while i * i <= n:
  cnta = 0
  cntb = 0
  while num % i == 0:
    num //= i
    if cnta == cntb:
      ans += 1
      cnta = 0
      cntb += 1
    else:
      cnta += 1
  i += 1
  
if ans == 0:
  flag = 1
  j = 2
  num2 = n
  while j * j <= num:
    if num % j == 0:
      flag = 0
      bleak
    j += 1
  if flag and n != 1:
    ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
i = 2

while n>1 and i*i<=n:
  if n % i == 0:
    c = 0
    while n % i == 0:
      n = n / i
      c = c + 1
    Y=1
    U=2
    while c>=Y:
      ans=ans+1
      Y=Y+U
      U=U+1

  i = i + 1
      
    
if n > 1:
  ans = 1

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
i = 2

while n>1 and i*i<=n:
  if n % i == 0:
    c = 0
    while n % i == 0:
      n = n / i
      c += 1
    Y=1
    U=2
    while c>=Y:
      ans=ans+1
      Y=Y+U
      U=U+1

  i = i + 1
      
    
if n > 1:
  ans = 1

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 0

i = 2
num = n
while i * i <= n:
  cnta = 0
  cntb = 0
  while num % i == 0:
    num /= i
    if cnta == cntb:
      ans += 1
      cnta = 0
      cntb += 1
    else:
      cnta += 1
  i += 1
  
if ans == 0:
  flag = 1
  j = 2
  num2 = n
  while j * j <= num:
    if num % j == 0:
      flag = 0
      bleak
    j += 1
  if flag and n != 1:
    ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
N = n
ans = 0
d = 0
i = 2
while n>1 and i*i<=N:
  c = 0
  if n % i == 0:
    d == 1
    while n % i == 0:
      n = int(n / i)
      c += 1
    Y=1
    U=2
    while c>=Y:
      ans=ans+1
      Y=Y+U
      U=U+1

  i = i + 1
      
    
if n > 1:
  ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 0

i = 2
num = n
while i * i <= n:
  cnta = 0
  cntb = 0
  while num % i == 0:
    num /= i
    if cnta == cntb:
      ans += 1
      cnta = 0
      cntb += 1
    else:
      cnta += 1
  i += 1
  
if ans == 0:
  flag = 1
  j = 2
  num2 = n
  while j * j <= num:
    if num % j == 0:
      flag = 0
      bleak
    j += 1
  if flag:
    ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
N = n
ans = 0
d = 0
i = 2
while n>1 and i*i<=N:
  c = 0
  if n % i == 0:
    d == 1
    while n % i == 0:
      n = int(n / i)
      c += 1
    Y=1
    U=2
    while c>=Y:
      ans=ans+1
      Y=Y+U
      U=U+1

  i += 1
      
    
if n > 1:
  ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:
def is_prime(N, i):
    if N <= 1:
        return False, i
    if i >= 2:
        i += 1
    else:
        i = 2
    while i*i <= N:
        if N%i == 0:
            return True, i
        i += 1
    return True, N

N = int(input())

ans = []
i = 0
while True:
    F, i = is_prime(N, i)
    if F:
        ans.append(i)
        N //= i
    else:
        break
ans = set(ans)
print(len(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())
N = n
ans = 0
d = 0
i = 2
while n>1 and i*i<=N:
  c = 0
  if n % i == 0:
    d == 1
    while n % i == 0:
      n = n / i
      c += 1
    j = 1
    cou = 0
    while c - j>= 0:
      cou += 1
      c -= j
      j += 1
    ans += cou  
  i += 1
      
    
if n > 1:
  ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
N = n
ans = 0
d = 0
i = 2
while n>1 and i*i<=N:
  c = 0
  if n % i == 0:
    d == 1
    while n % i == 0:
      n = int(n / i)
      c += 1
    j = 1
    cou = 0
    while c - j>= 0:
      cou += 1
      c -= j
      j += 1
    ans += cou  
  i += 1
      
    
if n > 1:
  ans = 1
print(ans)

Submission status: Wrong Answer

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

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

    e = d
    while n % e == 0:
        print(n, e)
        n //= e
        e *= d
        ans += 1

if n != 1:
    ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
N = n
ans = 0
d = 0
for i in range(2,int(N**0.5//1 + 1)):
  c = 0
  if n % i == 0:
    d == 1
    while n % i == 0:
      n = int(n / i)
      c += 1
    j = 1
    cou = 0
    while c - j>= 0:
      cou += 1
      c -= j
      j += 1
    ans += cou  
      
    
if d == 0 and n != 1:
  ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:
def solve(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())
print(solve(n))

Submission status: Wrong Answer

Solution code:
n = int(input())
N = n
ans = 0
d = 0
for i in range(2,int(N**0.5//1 + 3)):
  c = 0
  if n % i == 0:
    d == 1
    while n % i == 0:
      n //= i
      c += 1
    j = 1
    cou = 0
    while c> 0:
      cou += 1
      c -= j
      j += 1
    ans += cou  
      
    
if d == 0 and n != 1:
  ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
N = n
ans = 0
d = 0
for i in range(2,int(N**0.5//1 + 3)):
  c = 0
  if n % i == 0:
    d == 1
    while n % i == 0:
      n //= i
      c += 1
    j = 1
    cou = 0
    while c> 0:
      cou += 1
      c -= j
      j += 1
    ans += cou  
      
    
if d == 0 and n != 1:
  ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
d = 0
for i in range(2,int(n**0.5//1 + 3)):
  c = 0
  if n % i == 0:
    d == 1
    while n % i == 0:
      n //= i
      c += 1
    j = 1
    cou = 0
    while c> 0:
      cou += 1
      c -= j
      j += 1
    ans += cou  
      
    
if d == 0 and n != 1:
  ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(100000)


def ins(): return input().split()
def ii(): return int(input())
def iil(): return list(map(int, ins()))
def lin(): return list(input())
def iin(): return map(int, ins())

from collections import defaultdict
from math import sqrt

arr = []
max_p = int(50000)
l1 = [1 for i in range(max_p)]
l2 = set()
l2.add(2)
for i in range(max_p):
    if not l1[i]:
        continue
    l2.add(2*i+3)
    for j in range(3*i+3, max_p, 2*i+3):
        l1[j] = 0

n = int(input())
#n = 10 ** 12
dic = defaultdict(int)
for i in l2:
    while n % i == 0:
        n //= i
        dic[i] += 1
if n != 1:
    dic[n] += 1

ans = 0
for i in dic.values():
    #ans += (-1 + sqrt(1 + 8 * i))//2
    cp = i
    val = 1
    while cp >= val:
        cp -= val
        val += 1
        ans += 1
print(ans)

Submission status: Wrong Answer

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

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

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

if n != 1:
    ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

def factorization(n):
    arr = []
    if n == 1:
        return 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

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
d = 0
for i in range(2,int(n**0.5//1 + 3)):
  if n % i == 0:
    d = 1
    ans += 1
    n //= i
    
if d == 0 and n != 1:
  ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
d = 0
for i in range(2,int(n**0.5//1 + 1)):
  if n % i == 0:
    d = 1
    ans += 1
    n //= i
    
if d == 0 and n != 1:
  ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
N = n
ans = 0
i = 2
d = 0
while 5e6 > i:
  if n % i == 0:
    d = 1
    ans += 1
    n //= i
  i += 1

if d == 0 and N != 1:
  ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:
from collections import defaultdict

N = int(input())


def prime_factorization(N):
    PC = defaultdict(int)

    P = 2
    while N % P == 0:
        PC[P] += 1
        N //= P

    P = 3
    while P * P <= N:
        if N % P == 0:
            PC[P] += 1
            N //= P
        else:
            P += 2

    if N != 1:
        PC[N] += 1

    return PC


PC = prime_factorization(N)

ans = 0
for PI in PC.values():
    PIc = 0
    while PI > PIc:
        ans += 1
        PI -= 1
        PIc += 1

print(ans)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(100000)


def ins(): return input().split()
def ii(): return int(input())
def iil(): return list(map(int, ins()))
def lin(): return list(input())
def iin(): return map(int, ins())

from collections import defaultdict
from math import sqrt

arr = []
max_p = int(50000)
l1 = [1 for i in range(max_p)]
l2 = set()
l2.add(2)
for i in range(max_p):
    if not l1[i]:
        continue
    l2.add(2*i+3)
    for j in range(3*i+3, max_p, 2*i+3):
        l1[j] = 0

n = int(input())
dic = defaultdict(int)
for i in l2:
    while n % i == 0:
        n //= i
        dic[i] += 1
if n != 1:
    dic[n] += 1

ans = 0
for i in dic.values():
    ans += (-1 + sqrt(1 + 8 * i))//2
print(int(ans))

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(100000)


def ins(): return input().split()
def ii(): return int(input())
def iil(): return list(map(int, ins()))
def lin(): return list(input())
def iin(): return map(int, ins())

from collections import defaultdict
from math import sqrt

arr = []
max_p = int(50000)
l1 = [1 for i in range(max_p)]
l2 = set()
l2.add(2)
for i in range(max_p):
    if not l1[i]:
        continue
    l2.add(2*i+3)
    for j in range(3*i+3, max_p, 2*i+3):
        l1[j] = 0

n = int(input())
dic = defaultdict(int)
for i in l2:
    while n % i == 0:
        n //= i
        dic[i] += 1
if n != 1:
    dic[n] += 1

ans = 0
for i in dic.values():
    ans += (-1 + sqrt(1 + 8 * i))//2
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
N = n
ans = 0
i = 2
d = 0
while 10**6 > i:
  if n % i == 0:
    d = 1
    ans += 1
    n //= i
  i += 1

if d == 0 and N != 1:
  ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
N = n
ans = 0
i = 2
d = 0
while True:
  c=0  
  while n % i == 0:
    d = 1
    c += 1
    n //= i

  ln = 0
  leng = c
  for j in range(leng):
    if leng < j+1:
      break
    leng -= j+1
    ln += 1
  ans += ln
  if i>10**6:
    break
  i += 1

  
if d == 0 and N != 1:
  ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
N = n
ans = 0
i = 2
d = 0
while True:
  c=0  
  while n % i == 0:
    d = 1
    c += 1
    n //= i

  ln = 0
  leng = c
  for j in range(leng):
    if leng < j+1:
      break
    leng -= j+1
    ln += 1
  ans += ln
  if (i-1) ** 2 > N:
    break
  i += 1

  
if d == 0 and N != 1:
  ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
N = n
ans = 0
i = 2
d = 0
while True:
  c=0  
  while n % i == 0:
    d = 1
    c += 1
    n //= i

  ln = 0
  leng = c
  for j in range(leng):
    if leng < j+1:
      break
    leng -= j+1
    ln += 1
  ans += ln
  if i*i > 10**8:
    break
  i += 1

  
if d == 0 and N != 1:
  ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
temp = n
p = []
for i in range(2,math.isqrt(n)+1):
  if n%i==0:
    p.append(i)
  while n%i==0:
    n //= i
count = 0
n = temp
for x in p:
  po = 1
  while n%(x**po)==0:
    n //= (x**po)
    count += 1
    po += 1
if  n==1:
  print(0)
else :
  if p:
    print(count)
  else :
    print(1)

Submission status: Wrong Answer

Solution code:
def SieveOfEratosthenes(n): 
    prime = [True for i in range(n+1)] 
    p = 2
    while (p * p <= n):  
        if (prime[p] == True): 
            for i in range(p * p, n+1, p): 
                prime[i] = False
        p += 1
    l=[]
    for p in range(2, n+1): 
        if prime[p]: 
            l.append(p)
    return(l)
l=SieveOfEratosthenes(1000000)
for i in l:
    pw=2
    while i**pw<=10**12:
        l.append(i**pw)
        pw+=1
l.sort()
cnt=0
n=int(input())
for i in l:
    if n%i==0:
        n//=i
        cnt+=1
    if n==1 or n<i:
        break
print(cnt)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
temp = n
p = []
for i in range(2,math.isqrt(n)+1):
  if n%i==0:
    p.append(i)
  while n%i==0:
    n //= i
count = 0
n = temp
for x in p:
  po = 1
  while n%(x**po)==0:
    n //= (x**po)
    count += 1
    po += 1
if  n==1 or n==2 or n==3:
  print(min(1,n-1))
else :
  print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
N = n
ans = 0
i = 2
d = 0
while True:
  c=0  
  while n % i == 0:
    d = 1
    c += 1
    n //= i

  ln = 0
  leng = c
  for j in range(leng):
    if leng < j+1:
      break
    leng -= j+1
    ln += 1
  ans += ln
  if i*i > N:
    break
  i += 1

  
if d == 0 and N != 1:
  ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
N = n
ans = 0
i = 2
d = 0
while True:
  c=0  
  while n % i == 0:
    d = 1
    c += 1
    n //= i

  ln = 0
  leng = c
  for j in range(leng):
    if leng < j+1:
      break
    leng -= j+1
    ln += 1
  ans += ln
  if i*i >= N:
    break
  i += 1

  
if d == 0 and N != 1:
  ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
N = n
ans = 0
i = 2
c = []
d = 0
while True:
  c.clear()  
  while n % i == 0:
    d = 1
    c.append(0)
    n //= i

  ln = 0
  leng = len(c)
  for j in range(leng):
    if leng < j+1:
      break
    leng -= j+1
    ln += 1
  ans += ln
  if i*i >= N:
    break
  i += 1

  
if d == 0 and N != 1:
  ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:
#D
import math
N = int(input())
Nsyo = N
count = 0
div = 2
divcount = 0
divlist = []
while N > 1 and div <= math.sqrt(Nsyo)+1:
    if N%div == 0:
        while N%div == 0:
            N = N/div
            divcount = divcount+1
        divlist.append(divcount)
        divcount = 0
    else:
        pass
    div = div + 1
div = 1
divcount = 0
for i in divlist:
    while i >= div:
        i = i-div
        divcount = divcount + 1
        div = div + 1
        
    count = count +divcount
    divcount = 0
    div = 1
if N > math.sqrt(Nsyo):
    count = 1
print(count)

Submission status: Wrong Answer

Solution code:
#D
import math
N = int(input())
Nsyo = N
count = 0
div = 2
divcount = 0
divlist = []
while N > 1 and div <= math.sqrt(Nsyo)+1:
    if N%div == 0:
        while N%div == 0:
            N = N/div
            divcount = divcount+1
        divlist.append(divcount)
        divcount = 0
    else:
        pass
    div = div + 1
div = 1
divcount = 0
for i in divlist:
    while i >= div:
        i = i-div
        divcount = divcount + 1
        div = div + 1
        
    count = count +divcount
    divcount = 0
    div = 1
if divlist == [] and N >1:
    count = 1
print(count)