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:
#!/usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float("INF")

#solve
def solve():
    n = II()
    ans = 0
    d = defaultdict(int)
    d[1] = 1 
    for i in range(2, int(sqrt(n)) + 1):
        x = i
        while 1:
            if n % x == 0:
                ans += 1
                n //= x
                d[x] = 1
            else:
                break
            x *= i
    if d[n]:
        print(ans)
    else:
        print(ans + 1)
    return


#main
if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

Solution code:

def fctr1(n):
    f = {}
    c = 0
    r = int(n**0.5)
    for i in range(2, r+2):
        while n % i == 0:
            c += 1
            n = n//i
        if c != 0:
            f[i] = c
            c = 0
    if n != 1:
        f[n] = 1
    return f


N = int(input())
p = fctr1(N)
ans = 0
for k, v in p.items():
    t = 0
    c = 0
    while (t+c+1) <= v:
        t += c
        c += 1
    ans += c
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())

dat = factorization(n)
#print(dat)

buf = []

for a,b in dat:
    for j in range(b):
        buf.append(a)
dat.sort(key=lambda x: x[0])

used = dict()
cur = 1
res = 1
while True:
    canPickUp = False
    for i in range(len(dat)):
        if dat[i][0] == 1:
            continue
        if dat[i][1] == 0:
            continue
        val = dat[i][0]
        dat[i][1] -= 1
        cur *= val
        canPickUp= True
        break

    if canPickUp is False:
        break

    if cur not in used:
        used[cur] = True
        cur = 1
        res += 1

print(len(used))

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


num=factorization(n)
if(n==1):
    print(0)
    exit()
#rint(num)

co=0
for i in num:
    a=int((2*i[1])**0.5)
    co+=a

    
print(co)

Submission status: Wrong Answer

Solution code:
import math
N_ = N = int(input())
div = {}
for i in range(2, int(math.sqrt(N))+1):
    while N % i == 0:
        N /= i
        if i in div:
            div[i] += 1
        else:
            div[i] = 1
    if N == 1:
        break
if len(div) == 0:
    div[N_] = 1
ans = 0
for v in div.values():
    i = 1
    while v >= i:
        v -= i
        i += 1
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
def make_divisors(n):
    divisors=[]
    for i in range(1,int(n**0.5)+1):
        if n%i==0:
            divisors.append(i)
            if i!=n//i:
                divisors.append(n//i)
    divisors.sort()
    return divisors


n=int(input())
prime=make_divisors(n)

A=set()
for i in prime:
    if i==1:continue
    num,e=i,1
    while num<=n:
        A.add(num)
        e +=1
        num=i**e
cnt=0
for i in sorted(A):
    if n%i==0:
        cnt +=1
        n //=i
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

f = factorization(N)
#print(f)
ans = 0
amari_cnt = 0
for a,b in f:
  wk = b
  tempc = 1
  while wk  - tempc >= 0:
    wk -= tempc
    ans += 1
    tempc *= 2

print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
def fac(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(cnt)
    if temp!=1:
        arr.append(1)
    if arr==[]:
        arr.append(1)
    return arr
anss=fac(n)
dic={}
ans=0
for i in anss:
    if i in dic:
        ans+=dic[i]
    elif i==1:
        dic[i]=1
        ans+=1
    else:
        j=i
        ansss=0
        cou=1
        while j>cou:
            ansss+=1
            j-=cou
        ans+=ansss
        dic[i]=ansss
print(ans)

Submission status: Wrong Answer

Solution code:
def solve(n):
    if n == 1:
        return 0
    res = 0
    for i in range(2, int(n ** 0.5) + 1):
        cnt = 1
        while n % (i ** cnt) == 0:
            n //= i ** cnt
            res += 1
            cnt += 1
    return max(res, 1)

n = int(input())
ans = solve(n)
print(ans)

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**2<=n:
        if n%f==0:
            a.append(f)
            n//=f
        else:
            f+=2
    if n!=1:
        a.append(n)
    return(a)
import collections
A=collections.Counter(prime_factorize(n))
ans=0
import math
for v in A.values():
    x=math.floor(v**0.5)
    while x*(x+1)<v:
        x+=1
    ans+=x
print(ans)

Submission status: Wrong Answer

Solution code:
import collections
import bisect
n = int(input())

primes = []
a = 2
while n > a*a:
    while n % a == 0:
        primes.append(a)
        n //= a
    a += 1
if n != 1:
    primes.append(n)

num = [(i+1)*(i+2)//2 for i in range(100000)]
ctr = collections.Counter(primes)
ans = 0
for k,v in ctr.items():
    ans += bisect.bisect_left(num, v) + 1
print(ans)

Submission status: Wrong Answer

Solution code:
from bisect import bisect_right

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())
L = factorization(N)
A = [i for i in range(1,51)]
for i in range(49):
    A[i+1] += A[i]

ans = 0
for _, l in L:
    ans += bisect_right(A,l)
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
  
if __name__=="__main__":
  n=int(input())
  soinnsuu=factorization(n)
  ans = 0
  for sosuu in soinnsuu:
    x = 1
    while True:
      if sosuu[1]>=x:
        ans+=1
        sosuu[1]-=x
        x+=1
      else:
        break
  print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[]
for i in range(2,int(n**0.5)+1):
  for k in l:
     if i%k==0: break
  else: l.append(i)
d={}
for k in l:
  c=0
  while n%k==0: n//=k; c+=1
  if c>0: d[k]=c
s=[1]
for i in range(2,9):
  s.append(s[-1]+i)
a=0
for i in d.values():
  for j in s:
    if j>i: break
    a+=1
print(a)

Submission status: Wrong Answer

Solution code:
from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations # (string,3) 3回
from collections import deque
from collections import defaultdict
import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
#n = 2*10**8
n = 3000000
prime = [] # i番目の素数
is_prime = [True] * (n+1)
p = 0 # 何番目か　0-indexed
is_prime[0] = False
is_prime[1] = False
ll = 0
#print('a')
for i in range(2,n+1):
    #ll += 1
    #print(i)
    if is_prime[i] == True:
        prime.append(i) # p番目の素数はiとなる
        p += 1
        # print(ll)
        # if p == 1000*ll:
        #     print(p)
        for j in range(2*i, n+1,i):
            is_prime[j] = False # その素数の倍数のやつ

#print(sieve(n,11000000))
#print(prime)
import math
def is_prime(n):
    for i in range(2,int(math.sqrt(n)+1)):
        if n % i == 0:
            return False
    return n != 1 # 1の場合は除外

n = int(input())
if is_prime(n):
    print(1)
    exit()
cnt = 0
for v in prime:
    nya = v
    while n % v == 0:
        cnt += 1
        n //= v
        v *= nya
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())

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

primes = factorization(N)

ans = 0
for _, cnt in primes:
    n = 0
    while n * (n + 1) // 2 < cnt:
        n += 1
    ans += n

print(ans)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10000000)
import numpy as np
from heapq import heapify, heappop, heappush
import copy
from math import gcd, ceil
from collections import deque
# queueとして使う場合 push, popleftを使う
from bisect import bisect_left, bisect_right
# bisect_left: 配列の順序関係が崩れない条件で挿入することができる一番左の点
# bisect_right: 配列の順序関係が崩れない条件で挿入することができる一番右の点
# A = [1, 1, 1, 2, 2, 2, 4]
# print(bisect_left(A, 2))  # 3
# print(bisect_right(A, 2))  # 6
# print(bisect_left(A, 3))  # 6
# print(bisect_right(A, 3))  # 6


def is_prime(N):
    """Nを2~int(N**0.5)までで割る"""
    for i in range(2, int(N**0.5)+1):
        if N % i == 0:
            return False
    return True


def main():
    N = int(input())
    if N == 1:
        print(0)
        sys.exit()
    if is_prime(N):
        print(1)
        sys.exit()
    num = int(N ** 0.5) + 1
    count = 0
    for i in range(2, num):
        if N % i == 0:
            N = N // i
            count += 1
    print(count)
    




if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    def eratos(n):
        flag = [True] * (n + 1)
        for i in range(2, int(n**0.5) + 1):
            if flag[i]:
                for j in range(2*i, n + 1, i):
                    flag[j] = False
        return [i for i, x in enumerate(flag) if x and i >= 2]
    p = eratos(10**6)
    work = []
    for i in p:
        piyo = 0
        while n % i == 0:
            n //= i
            piyo += 1
        if piyo > 0:
            work.append(piyo)
        if n == 1:
            break
    if len(work) == 0:
        result = 1
    else:
        result = 0
        for i in work:
            for j in range(1, 10**6):
                i -= j
                if i <0:
                    break
                result += 1
    print(result)
main()

Submission status: Wrong Answer

Solution code:
n=int(input())
import sys
sys.setrecursionlimit(2147483647)
input=sys.stdin.readline

import math
def isPrime(num):
    if num < 2: return False
    elif num == 2: return True
    elif num % 2 == 0: return False
    for i in range(3, math.floor(math.sqrt(num))+1, 2):
        if num % i == 0:
            return False
    return True
def callIsPrime(input_num):
    numbers = []
    for i in range(1, input_num):
        if isPrime(i):
            numbers.append(i)
    return numbers

sosu=(callIsPrime(int(n**0.5)))
sosu.sort()
sosu.append(n)

cnt=0
for item in sosu:
    c=item
    while n%c==0:
        n=n//c
        c=c*item
        cnt+=1

print(cnt)

Submission status: Wrong Answer

Solution code:
import sys, collections
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = 10**20
def I(): return int(input())
def F(): return float(input())
def S(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()

def resolve():
    N = I()

    ans = []
    temp = N
    for i in range(2, int(N**0.5)+1):
        if temp%i == 0:
            ans.append(i)
            temp //= i
    if temp > int(N**0.5):
        ans.append(temp)

    print(len(ans))

if __name__ == '__main__':
    resolve()

Submission status: Wrong Answer

Solution code:
from collections import defaultdict

n = int(input())
dd = defaultdict(int)
for i in range(2, int(n ** (1 / 3) + 2)):
    while n % i == 0:
        dd[i] += 1
        n //= i
if n != 1:
    dd[n] += 1
ans = 0
cnt = {}
for i in range(20):
    tmp = i * (i + 1) // 2
    cnt[tmp] = i
for i, j in dd.items():
    for num in cnt:
        if j >= num:
            continue
        ans += cnt[num] - 1
        break
print(ans)

Submission status: Wrong Answer

Solution code:
a=int(input())
ans = 0
tmp = 2 
while tmp*tmp <=a:
    ct = 0 
    while not a % tmp:
        ct+=1
        a/=tmp
    for i in range(1,ct):
        if (1+i)*i/2<=ct:
            ans+=1
        else:
            break
    tmp+=1
if a != 1:
    ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
import sys, collections
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = 10**20
def I(): return int(input())
def F(): return float(input())
def S(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()

def resolve():
    N = I()

    ans = []
    temp = N
    for i in range(2, int(N**0.5)+1):
        if temp%i == 0:
            ans.append(i)
            temp //= i
    if temp > int(N**0.5):
        ans.append(temp)

    print(ans)
    print(len(ans))

if __name__ == '__main__':
    resolve()

Submission status: Wrong Answer

Solution code:
n = int(input())

def soin(n):
    S = []
    for i in range(2, int(n ** 0.5) + 1):
        if n % i == 0:
            n //= i
            S.append(i)
    if S == []:
        S.append(n)
    else:
        if n != 1:
            S.append(n)
    return S

if n==1:
    print(0)
else:
    print(len(set(soin(n))))

Submission status: Wrong Answer

Solution code:
n = int(input())
if n == 1: print(0); exit()
x = n
ans = 0
for i in range(2, 10**6*2):
    if x % i == 0:
        x //= i
        ans += 1

if n == x: print(1)
else: print(ans)

Submission status: Wrong Answer

Solution code:
from collections import Counter 
from collections import defaultdict
from collections import deque
from functools import reduce
import math
import itertools
import heapq
import numpy as np
import bisect
import sys
#import sympy
sys.setrecursionlimit(10**6)


def bfs(s,n,node):
    #頂点が探索済みかどうかのチェック配列
    check=[False for _ in range(n)]
    check[s]=True
    #次見る頂点を格納するキュー
    queue=deque([s])
    visited_num=1

    #問題固有の配列
    #color_check=[[True for _ in range(l)] for _ in range(n)]
    color=[-1 for _ in range(n)]
    color[s]=0
    
    while visited_num<n:
        #グラフが全連結ではない場合
        if len(queue)==0:
            #空配列を返す
            #現状までの計算済み配列を返してもいいと思う
            return color

        now_vertex=queue.popleft()
        #インデックスがない場合は
        for next_vertex in node[now_vertex]:


            if check[next_vertex]==True:
                continue

            queue.append(next_vertex)
            check[next_vertex]=True

            #問題固有の計算
            color[next_vertex]=color[now_vertex]+1
            visited_num+=1

    return color

#n=int(input())z
#n,m=list(map(int,input().split()))
#a=list(map(int,input().split()))
ceil=lambda x,y: (x+y-1)//y
input_list = lambda : list(map(int,input().split()))



n=int(input())
#n,m=input_list()
#a=input_list()
#a=input().split()
#n=int(a[0])
#m=float(a[1])
#print(math.floor(n*m))
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
div=make_divisors(n)

ind=0
ans=0
while(n!=1 and n>=div[ind]):
    ind+=1
    if n%div[ind]==0:
        ans+=1
        n=n//div[ind]

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

def prime_factorize(n):
    map = {}
    while n % 2 == 0:
        if 2 in map:
            map[2]+=1
        else:
            map[2]=1
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            if f in map:
                map[f]+=1
            else:
                map[f]=1
            n //= f
        else:
            f += 2
    if n != 1:
        map[n]=1
    return map


map = prime_factorize(n)
count = 0
for key in map:
    k = 1
    while map[key] >= k:
        map[key]-=k
        count+=1
        k+=1
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
n = int(N**(1/2))
i = 2
c = 0
while i <= n and N !=1:
  if N%i ==0:
    N = int(N//i)
    c += 1
  i += 1
if c ==0:
  print(1)
else:  
  print(c)

Submission status: Wrong Answer

Solution code:
N = int(input())

p_dic = {}
i=2
while i < N:
  if N % i == 0:
    p_dic[i] = 0
    while N % i == 0:
      p_dic[i] += 1
      N /= i
  i += 1

def foo(x):
  r = 0
  base = 1
  while x >= base:
    x -= base
    r+=1
    base += 1
  return r

ans = 0
for v in p_dic.values():
#  print(v, foo(v))
  ans += foo(v)

print(ans)

Submission status: Wrong Answer

Solution code:
def prime_factorize(n):
    c = 0
    while n % 2 == 0:
        c += 1
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            c += 1
            n //= f
        else:
            f += 2
    if n != 1:
        c += 1
    return c
  
print(prime_factorize(int(input())))

Submission status: Wrong Answer

Solution code:
S=lambda:input()
I=lambda:int(input())
L=lambda:list(map(int,input().split()))
LS=lambda:list(map(str,input().split()))
 
def main():
    n=I()
    dic={}
    import math
    for i in range(2,int(math.sqrt(n))+2):
        if n%i==0:
            while(n%i==0):
                if i in dic:
                    dic[i]+=1
                else:
                    dic[i]=1
                n/=i
        if n==1:
            break
    if not dic:
        if n!=1:
            dic[n]=1
    ans=0
    for k,v in dic.items():
        tmp=v
        sub=1
        tmp-=sub
        if tmp==0:
            ans+=1
        while tmp>0:
            ans+=1
            tmp-=sub
            sub+=1
    print(ans)
        

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
from collections import defaultdict
import math

def divisors(n):
    arr = []
    i = 1
    while(i<=math.sqrt(n)):
        if(n%i==0):
            if(n//i==i):
                arr.append(i)
            else:
                arr+=[i,n//i]
        i+=1
    arr.sort()
    arr.remove(1)
    return arr

n = int(input())
uni = set()
ans = 0
while n>1:
    arr = divisors(n)
    for i in arr:
        if i not in uni:
            uni.add(i)
            n = n//i
            break
print(len(uni))
# print(uni)

Submission status: Wrong Answer

Solution code:
import math
n=int(input())
num=2
count=0
num2=int(math.sqrt(n))+1
while n!=1:
    if n%num==0:
        count+=1
        n=n//num
        num+=1
    else:
        num+=1
    if num2<num:
        count=1
        break
print(count)

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())
List=factorization(n) 
#print(List)
number=len(List)
ans=0
for i in range(number):
    for k in range(1,number+1):
        if (k<=List[i][1]):
            ans+=1
            List[i][1]-=k
        else:
            break
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())

import math
def isPrime(num):
    if num < 2: return False
    elif num == 2: return True
    elif num % 2 == 0: return False
    for i in range(3, math.floor(math.sqrt(num))+1, 2):
        if num % i == 0:
            return False
    return True
def callIsPrime(input_num):
    numbers = []
    for i in range(1, input_num):
        if isPrime(i):
            numbers.append(i)
    return numbers

sosu=(callIsPrime(int(n**0.5)))
sosu.sort()
sosu.append(n)

cnt=0
for item in sosu:
    c=item
    while n%c==0:
        n=n//c
        c=c*item
        cnt+=1

print(cnt)

Submission status: Wrong Answer

Solution code:
import math
l = []
n = int(input())
for i in range(2,int(math.sqrt(n))+1):
  flg = 0
  while n % i == 0:
    if flg == 0:
      l.append(1)
      flg = 1
    else:
      l[-1] += 1
    n = n//i

if l == [] and n != 1:
  l.append(1)

ans = 0
for i in range(len(l)):
  c = 1
  while l[i] - c >= 0:
    l[i] -= c
    c += 1
    ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
def search_devision(m,picked):
    i = 2
    while i <= m:
        if i not in picked:
            if m % i == 0:
                picked.add(i)
                return i,picked
        i += 1
    return None,picked

n = int(input())
picked = set()
a = 1
while a != None:
    i, picked = search_devision(n,picked)
    if i == None:
        break
    else:
        n = n/i 
print(len(picked))

Submission status: Wrong Answer

Solution code:
sosu = [1 for _ in range(10**6+5)]
sosu[0] = 0
sosu[1] = 0
for i in range(2, len(sosu)):
    if sosu[i]:
        j = i+i
        while j < len(sosu):
            sosu[j] = 0
            j += i

z_list = [0 for _ in range(10**6+5)]
for i in range(2, len(sosu)):
    if sosu[i]:
        j = i
        while j < len(sosu):
            z_list[j] = 1
            j *= i

# print(z_list[:20])

n = int(input())
o_n = n
cnt = 0
for i in range(len(z_list)):
    if z_list[i]:
        if n % i == 0:
            cnt += 1
            n //= i

if n >= 10**6+5:
    i = 2
    tmp = 1
    while i*i <= n:
        if n % i == 0:
            tmp = 0
            break
        i += 1
    cnt += tmp

# if cnt == 0:
#     i = 2
#     cnt = 1
#     if o_n == 1:
#         cnt = 0
#     while i*i <= o_n:
#         if o_n % i == 0:
#             cnt = 0
#             break
#         i += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
for i in range(2, 10 ** 6 + 1):
    if N // i == N / i:
        ans += 1
        N = N // i

if N > 10 ** 6:
    ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    if n==1:
        print(0)
        return
    d = {}
    ans = 0
    for i in range(2,int(n**0.5)+2):
        if n%i==0:
            if i not in d.keys():
                d[i] = [1]
                ans += 1
                n = n//i
            cnt = 0
            while n%i==0:
                n = n//i
                cnt += 1
                if cnt > d[i][-1]:
                    d[i].append(cnt)
                    cnt = 0
                    ans += 1
            if n==1:
                break
    if ans==0:
        print(1)
        return
    print(ans)



if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())
from collections import defaultdict
d = defaultdict(int)
a = []
kosuu = 0
n = N
while n % 2 == 0:
    kosuu += 1
    n //= 2
if kosuu != 0:
    a.append(kosuu)
kosuu = 0
f = 3
while f * f <= n:
    if n % f == 0:
        kosuu += 1
        n //= f
    elif kosuu != 0:
        a.append(kosuu)
        kosuu = 0
    else:
        f += 2
if n != 1:
    a.append(1)
ans = 0
for i in range(len(a)):
    for j in range(2,100):
        if a[i] < j*(j+1)//2:
            ans += j-1
            break
print(ans)

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
def sousa(n):
    x = [1,3,6,10,15,21,28,36,45,55]
    for i in range(10):
        a = x[i]
        if n < a:
            return i
            break
bunkai = factorization(N)
ans = 0
for i in range(len(bunkai)):
    c = bunkai[i][1]
    ans += sousa(c)
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
counter = 0
for i in range(2,n+1):
    if n%i == 0:
        counter+=1
        n = n/i
    if n < i:
        break
print(counter)

Submission status: Wrong Answer

Solution code:
n = int(input())
cnt = 0
for i in range(2,10**5):
	if n%i == 0:
		cnt += 1
		n = n//i
if n >= 10**5:
	if cnt == 0:
		print (1)
		exit()
print (cnt)

Submission status: Wrong Answer

Solution code:
from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from fractions import gcd
from itertools import combinations # (string,3) 3回
from collections import deque
from collections import defaultdict
import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def I():
  return int(input())
#n = 2*10**8
n = 100000
prime = [] # i番目の素数
is_prime = [True] * (n+1)
p = 0 # 何番目か　0-indexed
is_prime[0] = False
is_prime[1] = False
ll = 0
#print('a')
for i in range(2,n+1):
    #ll += 1
    #print(i)
    if is_prime[i] == True:
        prime.append(i) # p番目の素数はiとなる
        p += 1
        # print(ll)
        # if p == 1000*ll:
        #     print(p)
        for j in range(2*i, n+1,i):
            is_prime[j] = False # その素数の倍数のやつ

#print(sieve(n,11000000))
#print(prime)
import math
def is_prime(n):
    for i in range(2,int(math.sqrt(n)+1)):
        if n % i == 0:
            return False
    return n != 1 # 1の場合は除外

n = int(input())
if is_prime(n):
    print(1)
    exit()
cnt = 0
for v in prime:
    nya = v
    while n % v == 0:
        cnt += 1
        n //= v
        v *= nya
print(cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())

exp = []
for i in range(2, int(n**(1/2))+1):
    cnt = 0
    while n%i == 0:
        cnt += 1
        n //= i
    if cnt >= 1:
        exp.append(cnt)

opr = 0
for x in exp:
    for i in range(x+1):
        if i*(i+1)//2 <= x < (i+1)*(i+2)//2:
            opr += i
            break

print(opr)

Submission status: Wrong Answer

Solution code:
from bisect import bisect_right

def prime_factorize(n):
    a = []
    cnt = 0
    while n % 2 == 0:
        cnt += 1
        n //= 2
    if cnt != 0:
        a.append(cnt)
    cnt = 0
    f = 3
    while f * f <= n:
        if n % f == 0:
            cnt += 1
            n //= f
        else:
            if cnt != 0:
                a.append(cnt)
                cnt = 0
            f += 2
    if n == f:
        a.append(cnt + 1)
    elif cnt != 0:
        a.append(cnt)
        if n != 1:
            a.append(1)
    if n != 1 and len(a) == 0:
        a.append(1)
    return a

N = int(input())
L = prime_factorize(N)
A = [i for i in range(1,51)]
for i in range(49):
    A[i+1] += A[i]

ans = 0
for l in L:
    ans += bisect_right(A,l)
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())
a = factorization(n)
ans = 0
for i in a:
    t = i[1]
    b = 1
    while (b*(b+1))//2  <= t:
        b += 1
    ans += b-1
print(ans)

Submission status: Wrong Answer

Solution code:
import bisect

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


l = factorization(N)

a = [i * (i + 1) // 2 for i in range(2 * 10**6)]
ans = 0


for p in l:
    n = bisect.bisect_right(a, p[1]) - 1
    ans += n

print(ans)