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

def prime_factorization(N):
  n = int(N**0.5)
  numList = [i if i != 1 else 2 for i in range(1, n, 2) ]
  primeList = [2]
  ansDict = {}
  idx = 0
  for data in numList:
    for x in primeList:
      if (data%x != 0 or x == 2):
        count = 0
        while N%data == 0:
          count += 1
          N //= data
        if count > 0:
          ansDict[data] = count
        if N == 1:
          return ansDict
        if x != 2:
          primeList.append(data)
        break           
  return ansDict
    
ansDict = prime_factorization(N)
ansCount = 0
if ansDict == {}:
  print(0)
else: 
  for k,v in ansDict.items():
    tmpCount = 1
    while tmpCount <= v:
      ansCount += 1
      v -= tmpCount
      tmpCount += 1    
  print(ansCount)

Submission status: Wrong Answer

Solution code:
import collections


# 素因数分解（試し割り法）
def prime_factorize(n: int) -> list:
    """
    整数 n を素因数分解する
    :param n: 整数
    :return a:リスト
    """
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f <= n ** 0.5:
        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))

count = 0
for i in c.values():
    if i > 2:
        n = 1
        while i > 0:
            count += 1
            i -= n
            n += 1
    else:
        count += 1

print(count)

Submission status: Wrong Answer

Solution code:
import collections


# 素因数分解（試し割り法）
def prime_factorize(n: int) -> list:
    """
    整数 n を素因数分解する
    :param n: 整数
    :return a:リスト
    """
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f <= n ** 0.5:
        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))

count = 0
for i in c.values():
    n = 1
    while i > 0:
        count += 1
        i -= n
        n += 1

print(count)

Submission status: Wrong Answer

Solution code:
import sys
import math
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
from collections import deque
from bisect import bisect_left
from itertools import product
def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
#文字列を一文字ずつ数字に変換、'5678'を[5,6,7,8]とできる
def LSI(): return list(map(int, list(sys.stdin.readline().rstrip())))
def LSI2(N): return [list(map(int, list(sys.stdin.readline().rstrip()))) for i in range(N)]
#文字列として取得
def ST(): return sys.stdin.readline().rstrip()
def LST(): return sys.stdin.readline().rstrip().split()
def LST2(N): return [sys.stdin.readline().rstrip().split() for i in range(N)]
def FILL(i,h): return [i for j in range(h)]
def FILL2(i,h,w): return [FILL(i,w) for j in range(h)]
def FILL3(i,h,w,d): return [FILL2(i,w,d) for j in range(h)]
def FILL4(i,h,w,d,d2): return [FILL3(i,w,d,d2) for j in range(h)]
def sisha(num,digit): return Decimal(str(num)).quantize(Decimal(digit),rounding=ROUND_HALF_UP)
#'0.01'や'1E1'などで指定、整数に戻すならintをかます
MOD = 1000000007
INF = float("inf")
sys.setrecursionlimit(10**6+10)
import math

def isPrime(num):
    for i in range(3,math.floor(math.sqrt(num))+1,2):
        if num%i==0:
            return False
    return True


N = I()
cnt = 0
ans = 0
while N%2==0:
    N /= 2
    cnt += 1
power = 1
while cnt>0:
    cnt -= power
    ans += 1
    power += 1
while True:
    if N==1:
        break
    if isPrime(N):
        ans += 1
        break
    else:
        for i in range(3,math.floor(math.sqrt(N))+1,2):
            cnt = 0
            if isPrime(i) and N%i==0:
                while N%i==0:
                    N /= i
                    cnt += 1
                power = 1
                while cnt-power>=0:
                    cnt -= power
                    ans += 1
                    power += 1

print(ans)

Submission status: Wrong Answer

Solution code:
import sys
import math
from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN
from collections import deque
from bisect import bisect_left
from itertools import product
def I(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
#文字列を一文字ずつ数字に変換、'5678'を[5,6,7,8]とできる
def LSI(): return list(map(int, list(sys.stdin.readline().rstrip())))
def LSI2(N): return [list(map(int, list(sys.stdin.readline().rstrip()))) for i in range(N)]
#文字列として取得
def ST(): return sys.stdin.readline().rstrip()
def LST(): return sys.stdin.readline().rstrip().split()
def LST2(N): return [sys.stdin.readline().rstrip().split() for i in range(N)]
def FILL(i,h): return [i for j in range(h)]
def FILL2(i,h,w): return [FILL(i,w) for j in range(h)]
def FILL3(i,h,w,d): return [FILL2(i,w,d) for j in range(h)]
def FILL4(i,h,w,d,d2): return [FILL3(i,w,d,d2) for j in range(h)]
def sisha(num,digit): return Decimal(str(num)).quantize(Decimal(digit),rounding=ROUND_HALF_UP)
#'0.01'や'1E1'などで指定、整数に戻すならintをかます
MOD = 1000000007
INF = float("inf")
sys.setrecursionlimit(10**6+10)
import math

N = I()
cnt = 0
ans = 0
while N%2==0:
    N /= 2
    cnt += 1
power = 1
while cnt>0:
    cnt -= power
    ans += 1
    power += 1
for i in range(3,math.floor(math.sqrt(N))+1,2):
    cnt = 0
    isPrime = True
    nisPrime = True
    for j in range(3, math.floor(math.sqrt(i))+1, 2):
        if i % j == 0:
            isPrime = False
    if isPrime:
        if N%i == 0:
            nisPrime = False
        while N%i==0:
            N /= i
            cnt += 1
        power = 1
        while cnt>0:
            cnt -= power
            ans += 1
            power += 1
        if nisPrime:
            ans += 1
            N = 1
    if N==1:
            break
print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np

def seachPrimeNum(MAX):
    sosuu = [2]
    for L in range(3, MAX, 2):
        if all(L % L2 != 0 for L2 in sosuu):
            sosuu.append(L)
    return sosuu


N = int(input())
n = N
s = 0

prime = np.array(seachPrimeNum(int(np.sqrt(N))))
prime = prime[N % prime == 0]

for p in prime:
    e = 1
    while n % p ** e == 0:
        n = n / p ** e
        e = e + 1
        s += 1
if n != 1:
    s += 1

print(s)

Submission status: Wrong Answer

Solution code:
import numpy as np

def seachPrimeNum(MAX):
    sosuu = [2]
    for L in range(3, MAX, 2):
        if all(L % L2 != 0 for L2 in sosuu):
            sosuu.append(L)
    return sosuu


N = int(input())
n = N
s = 0

prime = np.array(seachPrimeNum(int(np.sqrt(N))))


for p in prime:
    e = 1
    while n % p ** e == 0:
        n = n / p ** e
        e = e + 1
        s += 1
if n != 1:
    s += 1

print(s)

Submission status: Wrong Answer

Solution code:
n = int(input())

def factorization(x):
   arr = []
   tmp = x
   for i in range(2, int(n**0.5)+1):
      if tmp % i == 0:
         cnt = 0
         while tmp % i == 0:
            cnt += 1
            tmp //= i
         arr.append([i, cnt])
   if tmp != 1:
      arr.append([tmp, i])
   if len(arr) == 0:
      arr.append([x, 1])
   return arr

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

ans = 0
for p, i in factorization(n):
   j = 0
   while i > j:
      j += 1
      i -= j
      ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

def factorization(x):
   arr = []
   tmp = x
   for i in range(2, int(n**0.5+1)):
      if tmp % i == 0:
         cnt = 0
         while tmp % i == 0:
            tmp //= i
            cnt += 1
         arr.append([i, cnt])
   if len(arr) == 0 and tmp > 1:
      arr.append([tmp, 1])
   return arr

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

ans = 0
for p, i in factorization(n):
   j = 0
   while i > j:
      j += 1
      i -= j
      ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
from collections import Counter

n = int(input())

def factorization(x):
   arr = []
   tmp = x
   for i in range(2, int(n**0.5+1)):
      if tmp % i == 0:
         cnt = 0
         while tmp % i == 0:
            tmp //= i
            cnt += 1
         arr.extend([i]*cnt)
   if len(arr) == 0 and tmp > 1:
      arr.append(tmp)
   return arr

ans = 0
for k, v in Counter(factorization(n)).items():
   i = 0
   while v > i:
      i += 1
      v -= i
      ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
"""
- Nを素因数分解する
- N = p[i]^1*p[i]^2...*p[k]^1*p[k]^2...
"""
from collections import Counter
N = int(input())
factors = []
i = 2

while N > 1:
  if N < i * i:
    factors.append(N)
    break
  while N % i == 0:
    factors.append(i)
    N //= i
  i += 1
# N == 1
ans = 0
print(factors)
for count in Counter(factors).values():
  i = 1
  while count >= i:
    count -= i
    i += 1
    ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
def func(N):
    tmp=N
    arr=[]
    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
            arr.append([i,cnt])
            
    
    if arr==[]:
        arr.append([tmp,1])
   
    return arr

N=int(input())
a=func(N)
ans=0
if a[0][0]==1:
        print(0)
        exit()
        
b=[1,3,6,10,15,21,28,36,45]
for i in a:
    for j in range(len(b)):
       if  i[1]<b[j]:
          ans+=j
          break
print(ans)

Submission status: Wrong Answer

Solution code:
def func(N):
    tmp=N
    arr=[]
    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
            arr.append([i,cnt])
    if arr==[]:
        arr.append([tmp,1])
   
    return arr

N=int(input())
a=func(N)
ans=0
if a[0][0]==1:
        print(0)
        exit()
        
b=[1,3,6,10,15,21,28,36,45]
for i in a:
    for j in range(len(b)):
       if  i[1]<b[j]:
          ans+=j
          break
print(ans)

Submission status: Wrong Answer

Solution code:
def func(N):
    tmp=N
    arr=[]
    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
            arr.append([i,cnt])
    if arr==[]:
        arr.append([tmp,1])
   
    return arr

N=int(input())
a=func(N)
ans=0
if a[0][0]==1:
        print(0)
        exit()
        
b=[1,3,6,10,15,21,28,36,45]
for i in a:
    for j in range(len(b)):
       if  i[1]<b[j]:
          ans+=j
          break
print(ans)

Submission status: Wrong Answer

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

N=int(input())
a=func(N)
ans=0
if a[0][0]==1:
        print(0)
        exit()
        
b=[1,3,6,10,15,21,28,36,45]
for i in a:
    for j in range(len(b)):
       if  i[1]<b[j]:
          ans+=j
          break
print(ans)

Submission status: Wrong Answer

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

N=int(input())
a=func(N)
ans=0
b=[1,3,6,10,15,21,28,36,45]
for i in a:
    for j in range(len(b)):
       if  i[1]<b[j]:
          ans+=j
          break
print(ans)

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
  
from collections import Counter
n=int(input())
s=Counter(prime_factorize(n))
t=list(s.values())
cnt=0
#print(s)
#print(t)
for i in t:
  if i==1:
    cnt+=1
    
  else:
    s=1
    while i>0:
      i=i-s
      s+=1
      cnt+=1
      
print(cnt)

Submission status: Wrong Answer

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


ans=0
for i in factorization(n):
    p = i[0]
    ex = i[1]
    for j in range(1,ex+1):
        if n % p**j == 0:
            n //= p**j
            ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
def factorization(n):
    m=n
    counter_map={}
    i=2
    tmp=1
    while n!=1:
        #因数に持つか判定
        if n%i==0:
            n=n//i
            #素数判定
            for j in range(2,int(i**(1/2))+1):
                if i%j==0:
                    break
            else:
                tmp*=i
                if i not in counter_map:
                    counter_map[i]=1
                    tmp=1
                else:
                    if tmp not in counter_map:
                        counter_map[tmp]=1
                        tmp=1
        else:
            i+=1
            tmp=1
        if i>int(n**(1/2)) and n!=1:
            counter_map[n]=1
            break
        #print(i,n,counter_map)
    return counter_map


a=int(input())
b=factorization(a)
#print(b)

print(len(b))

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

f_list = factorization(n)
ans = 0

for i in range(len(f_list)):
    tmp = f_list[i][1]
    j = 1
    while tmp >= 0:
        tmp -= j
        j += 1
        ans += 1

print(ans-2)

Submission status: Wrong Answer

Solution code:
def factorization(n):
    m=n
    counter_map={}
    i=2
    tmp=1
    while n!=1:
        #因数に持つか判定
        if n%i==0:
            n=n//i
            #素数判定
            for j in range(2,int(i**(1/2))+1):
                if i%j==0:
                    break
            else:
                tmp*=i
                if i not in counter_map:
                    counter_map[i]=1
                else:
                    if tmp not in counter_map:
                        counter_map[tmp]=1
                        tmp=1
        else:
            i+=1
            tmp=1
        if i>int(m**(1/2)) and n!=1:
            counter_map[n]=1
            break
        #print(i,n,counter_map)
    return counter_map


a=int(input())
b=factorization(a)
#print(b)
sum=0

# for i in b.keys():
#     counter=0
#     for j in range(1,41):
#         if b[i]>=1+(j+2)*(j-1)//2:
#             counter=j
#         else:
#             break
#     sum+=counter

# print(sum)

print(len(b))

Submission status: Wrong Answer

Solution code:
def factorization(n):
    m=n
    counter_map={}
    i=2
    tmp=1
    while n!=1:
        #因数に持つか判定
        if n%i==0:
            n=n//i
            #素数判定
            for j in range(2,int(i**(1/2))+1):
                if i%j==0:
                    break
            else:
                tmp*=i
                if i not in counter_map:
                    counter_map[i]=1
                else:
                    if tmp not in counter_map:
                        counter_map[tmp]=1
                        tmp=1
        else:
            i+=1
            tmp=1
        if i>int(n**(1/2)) and n!=1:
            counter_map[n]=1
            break
        #print(i,n,counter_map)
    return counter_map


a=int(input())
b=factorization(a)
#print(b)
sum=0

# for i in b.keys():
#     counter=0
#     for j in range(1,41):
#         if b[i]>=1+(j+2)*(j-1)//2:
#             counter=j
#         else:
#             break
#     sum+=counter

# print(sum)

print(len(b))

Submission status: Wrong Answer

Solution code:
def factorization(n):
    m=n
    counter_map={}
    i=2
    tmp=1
    while n!=1:
        #因数に持つか判定
        if n%i==0:
            n=n//i
            #素数判定
            for j in range(2,int(i**(1/2))+1):
                if i%j==0:
                    break
            else:
                tmp*=i
                if i not in counter_map:
                    counter_map[i]=1
                else:
                    if tmp not in counter_map:
                        counter_map[tmp]=1
                        tmp=1
        else:
            i+=1
        if i>int(n**(1/2)) and n!=1:
            counter_map[n]=1
            break
        #print(i,n,counter_map)
    return counter_map


a=int(input())
b=factorization(a)
#print(b)
sum=0

# for i in b.keys():
#     counter=0
#     for j in range(1,41):
#         if b[i]>=1+(j+2)*(j-1)//2:
#             counter=j
#         else:
#             break
#     sum+=counter

# print(sum)

print(len(b))

Submission status: Wrong Answer

Solution code:
from itertools import accumulate
from collections import defaultdict


def main():
    n = int(input())
    prime_counter = defaultdict(int)  # key ^ value
    acc = tuple(accumulate(range(1, 42)))  # because 10^12 < 2^39

    def facs(n):
        yield 2
        for x in range(3, int(n ** 0.5) + 1, 2):
            yield x
        yield n

    for fac in facs(n):
        while n % fac == 0:
            n //= fac
            prime_counter[fac] += 1
            # ここで if fac * fac > n: braek を入れると，
            # 計算量の少ないケースでは早く，多いケースでは遅くなる。

    ans = 0
    for c in prime_counter.values():
        for i, x in enumerate(acc):
            if c < x:
                tmp = i
                break
        ans += tmp
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math

n = int(input())
list = {}
flag = True
while flag:
    flag = False
    for i in range(2,int(math.sqrt(n)+1)):
        if n%i==0:
            if i in list:
                list[i] = list[i]+1
            else:
                list[i] = 1
            n /= i
            flag = True
            break
if n in list:
    list[n] = list[n]+1
else:
    list[n] = 1
ans = 0
for i in list.keys():
    m = list[i]
    for j in range(1,m):
        if not j>m:
            ans += 1
            m -= j
        else:
            break
print(ans)

Submission status: Wrong Answer

Solution code:
import math

n = int(input())
list = {}
flag = True
while flag:
    flag = False
    for i in range(2,int(math.sqrt(n)+1)):
        if n%i==0:
            if i in list:
                list[i] = list[i]+1
            else:
                list[i] = 1
            n /= i
            flag = True
            break
if n in list:
    list[n] = list[n]+1
else:
    list[n] = 1
ans = 0
for i in list.keys():
    m = list[i]
    for j in range(m):
        if not j>m:
            ans += j
            m -= j
        else:
            break
print(ans)

Submission status: Wrong Answer

Solution code:
import math

#nの素因数分解(O(n**0.5)
def prime_factor(n):
    ass = []
    for i in range(2,int(n**0.5)+1):
        while n % i==0:
            ass.append(i)
            n = n//i
    if n != 1:
        ass.append(n)
    return ass


N = int(input())
ans = 0
howmany = []
nums = sorted(prime_factor(N))
if len(nums)>0:
    count = 1
else:
    count = 0
for one, two in zip(nums,nums[1:]):
    if one != two:
        howmany.append(count)
        count = 1
    else:
        count += 1
else:
    howmany.append(count)
print(howmany)

for i in howmany:
    for j in range(1,20):
        if j * (j + 1) // 2 > i:

            ans += j - 1
            break

print(ans)

Submission status: Wrong Answer

Solution code:
from math import sqrt
N=int(input())
rN=int(sqrt(N))

ans=1
#self sosu
for i in range(2,rN+1):
  if N%i==0:
    ans-=1
    break
    
sosu=[]
for i in range(2,rN+1):
  flag=0
  ri=int(sqrt(i))+1
  for j in sosu:
    if j>ri:
      break
    if i%j==0:
      flag=1
      break
  if flag==0: sosu.append(i)

X=[]
for s in sosu:
  count=0
  while True:
    if N%s==0:
      N=N/s
      count+=1
    else:
      break
  if count!=0: X.append(count)

for x in X:
  count=1
  while x>=count:
    ans+=1
    x-=count
    count+=1
print(ans)

Submission status: Wrong Answer

Solution code:
from math import sqrt
N=int(input())
rN=int(sqrt(N))

ans=1
#self sosu
for i in range(2,rN+1):
  if N%i==0:
    ans-=1
    break
    
sosu=[]
for i in range(2,rN+1):
  flag=0
  ri=int(sqrt(i))
  for j in sosu:
    if j>ri:
      break
    if i%j==0:
      flag=1
      break
  if flag==0: sosu.append(i)

X=[]
for s in sosu:
  count=0
  while True:
    if N%s==0:
      N=N/s
      count+=1
    else:
      break
  if count!=0: X.append(count)

for x in X:
  count=1
  while x>=count:
    ans+=1
    x-=count
    count+=1
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(1000000)
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
from collections import defaultdict
n = I()

def primes(n):
    cnt = defaultdict(int)
    for i in range(2,int(n**0.5)+1): # range(3)だと、0,1,2が出てくる。
        while n % i == 0:
            cnt[i] += 1 # 同じ素数で何回割れるか辞書型で登録しておく
            n //= i # iで割り切った商で更新しておく
    if n > 1: # nの平方根より大きい値があった場合、追加
        cnt[n] += 1
    return cnt

prs = primes(n) #　素数の辞書
ans = 0
for key in prs.keys(): #辞書から素数を抽出して、その素数の指数値をvとして格納する。
    v = prs[key]
    for i in range(100):
        # if (i * (i+1)) // 2 <= v:　これだと何度も足し算してしまう。
        if (i * (i + 1)) // 2 > v: # 指数eを超えた一つ前が目的の計数である。
            ans += (i-1)
print(ans)

Submission status: Wrong Answer

Solution code:
from math import sqrt
N=int(input())
rN=int(sqrt(N))

ans=1
#self sosu
for i in range(2,rN+1):
  if N%i==0:
    ans-=1
    break
    
sosu=[]
for i in range(2,rN+1):
  flag=0
  ri=int(sqrt(i))
  for j in sosu:
    if j>ri:
      break
    if i%j==0:
      flag=1
      break
  if flag==0: sosu.append(i)

X=[]
for s in sosu:
  flag=0
  count=0
  while flag==0:
    if N%s==0:
      N=N/s
      count+=1
    else:
      flag=1
  if count!=0: X.append(count)

for x in X:
  count=1
  while x>=count:
    ans+=1
    x-=count
    count+=1
print(ans)

Submission status: Wrong Answer

Solution code:
import math

#nの素因数分解(O(n**0.5)
def prime_factor(n):
    ass = []
    for i in range(2,int(n**0.5)+1):
        while n % i==0:
            ass.append(i)
            n = n//i
    if n != 1:
        ass.append(n)
    return ass


N = int(input())
ans = 0
count = 1
howmany = []
nums = sorted(prime_factor(N))

for one, two in zip(nums,nums[1:]):
    if one != two:
        howmany.append(count)
        count = 1
    else:
        count += 1
else:
    howmany.append(count)


for i in howmany:
    for j in range(1,i+2):

        if j * (j + 1) // 2 > i:
            ans += j - 1
            break

print(ans)

Submission status: Wrong Answer

Solution code:
import math

#nの素因数分解(O(n**0.5)
def prime_factor(n):
    ass = []
    for i in range(2,int(n**0.5)+1):
        while n % i==0:
            ass.append(i)
            n = n//i
    if n != 1:
        ass.append(n)
    return ass


N = int(input())
ans = 0
count = 1
howmany = []
nums = sorted(prime_factor(N))

for one, two in zip(nums,nums[1:]):
    if one != two:
        howmany.append(count)
        count = 1
    else:
        count += 1
else:
    howmany.append(count)
print(howmany)

for i in howmany:
    for j in range(1,i+2):
        print( j * (j + 1) // 2 , i)
        if j * (j + 1) // 2 > i:
            ans += j - 1
            break

print(ans)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(1000000)
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
from collections import defaultdict
n = I()
n_z = n # n/z
p = 2 # 最初の素数
e = 1

# def fermat_test(q):
#     if q == 2: return True
#     elif q < 2 or q & 1 == 0: return False   # q & 1 == 0 偶数の場合のFalseを返す意。 
#     # x(int) & y(int)と表記すると2進数表記にしたときに、各桁のどこかが一致する場合は1、どこも一致しない場合は0を返す。
#     # 例えば10→2進数:1010と1→2進数:1を比較するとドコモ一致しないので、0が帰ってくる。
#     # 2進数表記の偶数は一番下の桁が0のため、2進数表記の1は一致しないため、0が返ってくる。


# まずは試し割法で与えられたnの素因数分解する
#　素因数探索はO(n ** 0.5)の計算量で済むことが大事 5 * 5 = 25　nの平方根
# したがって、探索の最大値もnの平方根としておく。
def primes(n):
    cnt = defaultdict(int)
    for i in range(2,int(n**0.5)+1): # range(3)だと、0,1,2が出てくる。
        while n % i == 0:
            cnt[i] += 1 # 同じ素数で何回割れるか辞書型で登録しておく
            n //= i # iで割り切った商で更新しておく
    if n > 1: # nの平方根より大きい値があった場合、追加
        cnt[n] += 1
    return cnt

prs = primes(n) #　素数の辞書
l = 0
ans = 0

# 各素数pに対して指数eをカウント、合計して行けばよい。
# 指数eは1からスタートの等差数列になるため、等差数列の和：k(k+1)//2を用いて、対象となる素数の値以下になる数値を探索すればよい。
# その値kがある素数に対する指数の数となる。
for key in prs.keys(): #辞書から素数を抽出して、その素数の指数値をvとして格納する。
    v = prs[key]
    for i in range(100):
        if (i * (i+1)) // 2 <= v:
            ans += (i)
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(1000000)
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
from collections import defaultdict
n = I()
n_z = n # n/z
p = 2 # 最初の素数
e = 1

def primes(n):
    cnt = defaultdict(int)
    for i in range(2,int(n**0.5)+1): # range(3)だと、0,1,2が出てくる。
        while n % i == 0:
            cnt[i] += 1 # 同じ素数で何回割れるか辞書型で登録しておく
            n //= i # iで割り切った商で更新しておく
    return cnt

prs = primes(n) #　素数の辞書
l = 0
ans = 0
for key in prs.keys(): #辞書から素数を抽出して、その素数の指数値をvとして格納する。
    v = prs[key]
    for i in range(100):
        if (i * (i+1)) // 2 <= v:
            ans += (i)
print(ans)

Submission status: Wrong Answer

Solution code:
t=1
while (t):
	t-=1
	n=int(input())
	ans=0
	power=0
	#it is the power of every prime number
	#and as z is always a prime numer we should not bother about
	# combiations of prime numer dividing N
	for i in range(2,1000000):
		power=0
		j=1
		if(n%i==0):
			while(n%i==0):
				power+=1
				n=(n//i)
			while(power>=j):
				power-=j
				j+=1
				ans+=1
	print(ans)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(1000000)
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())
n = I()
n_z = n # n/z
prs = [] # 素数のリスト
p = 2 # 最初の素数
e = 1
def primes(n):
    cnt = []
    for i in range(p,int(n**0.5)):
        while n & i == 0:
            cnt.append(i)
            n //= i 
    if n > 1:
        cnt.append(i)

    return cnt

prs = primes(n)
ans = 0

for v in prs:
    for i in range(100):
        if (i * (i+1)) // 2 >= v:
            ans += (i - 1)
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())

def primes_factraizar(n):
    rn = int(n**0.5)
    is_prime = [True] * (rn+1) #まずは[1]*n^0.5を用意
    is_prime[0] = False 
    is_prime[1] = False
    for i in range(2, rn + 1): #素数の判定√nまでで十分
        if not is_prime[i]: #非素数は無視
            continue            #continue分はループ中の後続の命令をスキップする
        for j in range(i * 2, rn + 1, i): #i*2~nまでのiの倍数を順番に消す
            is_prime[j] = False
    return [i for i in range(rn + 1) if is_prime[i]]
primes = primes_factraizar(n)

if n==0 or n==1:
    print(0)
    exit()



div = []
for i in primes:
    N=n
    for j in range(10**9):
        if N%i==0:
            N=N//i
        else:
            if j == 0:
                break
            div.append(j)
            break

if div == []:
    print(1)
    exit()
ans = 0
for i in div:
    c = 0
    for j in range(1,10**9):
        if i >= c+j:
            c+=j
        else:
            ans += j-1
            break
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())

def primes_factraizar(n):
    rn = int(n**0.5)
    is_prime = [True] * (rn+1) #まずは[1]*n^0.5を用意
    is_prime[0] = False 
    is_prime[1] = False
    for i in range(2, rn + 1): #素数の判定√nまでで十分
        if not is_prime[i]: #非素数は無視
            continue            #continue分はループ中の後続の命令をスキップする
        for j in range(i * 2, rn + 1, i): #i*2~nまでのiの倍数を順番に消す
            is_prime[j] = False
    return [i for i in range(rn + 1) if is_prime[i]]
primes = primes_factraizar(n)

if n==0 or n==1:
    print(0)
    exit()



div = []
for i in primes:
    N=n
    for j in range(100):
        if N%i==0:
            N=N//i
        else:
            if j == 0:
                break
            div.append(j)
            break

if div == []:
    print(1)
    exit()
ans = 0
for i in div:
    c = 0
    for j in range(1,100):
        if i >= c+j:
            c+=j
        else:
            ans += j-1
            break
print(ans)