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:
# -*- coding: utf-8 -*-

N = int(input())

res = 0


for i in range(2,10**12):
    if N==1:
        break

    if N%i==0:
        N = int(N/i)
        res += 1

print(res)

Submission status: Wrong Answer

Solution code:
N = int(input())
n = 0
for i in range(2, int(-(-N**0.5//1))+1):
  if N % i == 0:
    N = N / i
    n += 1

if N != 1 and n == 0:
  print(1)
else:
  print(n)

Submission status: Wrong Answer

Solution code:
import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect
from time import perf_counter
from fractions import Fraction
# sys.setrecursionlimit(int(pow(10, 2)))
#sys.stdin = open("input.txt", "r")
#sys.stdout = open("output.txt", "w")
mod = int(pow(10, 9) + 7)
mod2 = 998244353
def data(): return sys.stdin.readline().strip()
def out(*var, end="\n"): sys.stdout.write(' '.join(map(str, var))+end)
def l(): return list(sp())
def sl(): return list(ssp())
def sp(): return map(int, data().split())
def ssp(): return map(str, data().split())
def l1d(n, val=0): return [val for i in range(n)]
def l2d(n, m, val=0): return [l1d(n, val) for j in range(m)]





# @lru_cache(None)
is_prime=[1 for i in range(10**6+1)]
is_prime[0]=0
is_prime[1]=0
for i in range(2,10**6+1):
    if(is_prime[i]):
        for j in range(2*i,10**6+1,i):
            is_prime[j]=0
n=l()[0]
ans=0
x=n
for i in range(2,int(n**0.5)+1):
    if(x%i==0 and is_prime[i]):
        p=i
        while(x%p==0):
            # print(i,x)
            ans+=1
            x//=p
            p*=i
if(ans==0 and n>10**6):
    ans=1
if(x!=1 and x!=n):
    ans+=1
print(ans)

Submission status: Wrong Answer

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

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr


n = int(input())
cnt = 0
if n > 0:
    for fact in factorization(n):
        for j in range(fact[1]):
            z = fact[0] ** j
            if n % z == 0:
                if z != fact[0] and z != j and z != n:
                    n = n // z
                    cnt += 1
print(cnt)

Submission status: Wrong Answer

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

def solve(N):
    ans = 0
    arr_list = factorization(N)
    for arr in arr_list:
        prime = arr[0]
        times = arr[1]
        count = 1
        while True:
            times -= count
            if(times < 0):
                break
            ans += 1
            count += 1
    return ans

#print(solve(24))
#print(solve(1))
#print(solve(64))
#print(solve(1000000007))
#print(solve(997764507000))

def main():
    N = int(input())
    print(solve(N))

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    if n==1:
        print(0)
        return
    ans = 0
    for i in range(2,int(n**0.5)+2):
        if n%i==0:
            m = 1
            ans += 1
            n = n//i
            cnt = 0
            while n%i==0:
                n = n//i
                cnt += 1
                if cnt > m:
                    m = m+1
                    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())

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

hoges = factorization(N)

#print(hoges)

ans = 0

for hoge in hoges:
    n = hoge[1]

    i = 0
    tmp = 0
    while True:
        i += 1
        tmp += i

        if(tmp > n):
            break
    
        ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

def factorize(n):
    fct = []  
    b, e = 2, 0  
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append([b, e])
        b, e = b + 1, 0
    if n > 1:
        fct.append([n, 1])
    return fct

aoinsu = factorize(n)

kaijo = [1]
b = 1
for i in range(1,10):
    b = b+i
    kaijo.append(b)

#print(kaijo)    

#print(aoinsu)

ans = 0
for i in range(len(aoinsu)):
    a = aoinsu[i][1]
    for j in range(10):
        if a <= kaijo[j]:
            ans += j
            break


print(ans)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
import sys

# from operator import itemgetter
sysread = sys.stdin.readline
read = sys.stdin.read
#from heapq import heappop, heappush
#from collections import defaultdict

sys.setrecursionlimit(10 ** 7)
# import math
# from itertools import product, accumulate, combinations, product
# import bisect# lower_bound etc
#import numpy as np
# from copy import deepcopy
#from collections import deque
#import numba
import math

def run():
    N = int(input())

    primes = []
    p = [0] * 1000000

    for i in range(2, 1000000):
        done = False
        m = int(i ** (1/2))
        for k in primes:
            if k > m:break
            if i % k == 0:
                done = True
                break
        if not done:
            primes.append(i)
            p[i] = 1


    count = 0
    for i in primes:
        if p[2]:
            s = i
            while True:

                if not N % s:

                    N = N // s
                    count += 1
                    s *= i

                else:break

    if count == 0 and N != 1:
        print(1)
    else:
        print(count)



if __name__ == "__main__":
    run()

Submission status: Wrong Answer

Solution code:
N = int(input())

def factorization(n):
    a = []
    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
            a.append([i, cnt])

    if temp != 1:
        a.append([temp, 1])

    if a == []:
        a.append([n, 1])

    return a

result = factorization(N)

count = 0
for p,i in result:
    if p == 1:
        continue
    for k in range(1, i+1):
        if p ** k > N:
            break
        else:
            N /= p ** k
            count += 1
print(count)

Submission status: Wrong Answer

Solution code:
from collections import defaultdict

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

index = int(pow(N, 0.5) + 1)
ans = []
for i in range(2, index):
    while N % i == 0:
        N //= i
        ans.append(i)
if ans == []:
    print(1)
    exit()
d = defaultdict(int)
for i in ans:
    d[i] += 1

sosuLst = []
for v, c in d.items():
    cnt = 1
    while c > 0:
        c -= cnt
        cnt += 1
        if c != 0 and c < cnt:
            sosuLst.append(v ** cnt)
            break
        else:
            sosuLst.append(v ** (cnt - 1))
print(len(sosuLst))

Submission status: Wrong Answer

Solution code:
N = int(input())
a = [int(0.5*i*(i+1)) for i in range(10)]
import math
res = 0
top = int(math.sqrt(N))
for i in range(2,top):
    count = 0
    while N%i == 0:
        N = N//i
        count += 1
    for j in range(10):
        if count < a[j]:
            res += (j-1)
            break
print(max(1,res))

Submission status: Wrong Answer

Solution code:
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=1000):
    numbers = []
    for i in range(1, input_num):
        if isPrime(i):
            numbers.append(i)

    return numbers
n=int(input())
pr=callIsPrime(n)
e=1
cnt=1
while n!=1:
    for i in pr:
        z=i**e
        flag=0
        if n%z==0:
            cnt+=1
            n/=z
            flag+=1
    if flag==0:
        break
    else:
        e+=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 = factorization(N)
index = [ans[i][1] for i in range(len(ans))]
k = 0
for i in range(len(ans)):
  a = index[i]
  j = 1
  while a - j >=0:
    k += 1
    a -= j
    j += 1
print(k)

Submission status: Wrong Answer

Solution code:
n = int(input())

i = 2
cur_n = n
cnt = {}
while i * i <= n:
    while cur_n % i == 0:
        cnt.setdefault(i, 0)
        cnt[i] += 1
        cur_n //= i
    i += 1

if cur_n != 1:
    cnt[cur_n] = 1

'''
ans_table = [0]
for i in range(40):
    ans_table[i // 2] + 1

[0, 1, 2
'''


def get_ans(power):
    i = 1
    res = 0
    while res + i <= power:
        res += 1
        i += 1
    return res


ans = 0
for v in cnt.values():
    ans += get_ans(v)


print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
N=n
p=2
d={}
ans=0
while(1):
    while(n%p==0):
        n//=p
        if d.get(p)==None:
            d[p]=1
        else:
            d[p]+=1
    if p**2>N:
        break
    p+=1
for k,v in d.items():
    i=1
    while(1):
        v-=i
        if v>=0:
            ans+=1
            i+=1
        else:
            break
if (ans==0) and (N>1):
    print(1)
else:
    print(ans)

Submission status: Wrong Answer

Solution code:
def main():
    import sys
    from math import log
    input = sys.stdin.readline
    sys.setrecursionlimit(10**6)
    N = int(input())
    prime = [True for i in range(int(N**.5)+2)]
    max_ = int(N ** .5) + 1
    ans = 0
    if N == 1:
        print(0)
        exit()

    for p in range(2, max_):
        if not prime[p]:
            continue
        for q in range(p, max_, p):
            prime[q] = False
        if N % p != 0:
            continue
        # print('p = {}'.format(p))
        t = 1
        p_ = p
        while N % p_ == 0:
            t += 1
            p_ *= p
        t -= 1
        l, r = 0, 10 ** 6
        # print('t = {}'.format(t))
        while l + 1 < r:
            m = (l + r) // 2
            if m * (m + 1) // 2 <= t:
                l = m
            else:
                r = m
        # print('ans += {}'.format(l))
        N //= (p ** l)
        ans += l
    if ans == 0:
        ans = 1
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math
def isPrim(n):
  if n==1 :
    return False
  for i in range(2,int(math.sqrt(n))+1):
    if n % i == 0:
      return False
  return True

n = int(input())

if isPrim(n) :
  print(1)
  exit()

cnt = 0
for p in range(2 , int(math.sqrt(n))+1):
  for e in range(1, 10):
    z = p ** e 
    if n % z == 0:
      cnt += 1
      n = n / z
      if isPrim(n) :
        break
    e += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())

d = dict()


ans = 0

for i in range(2, int(n ** 0.5)):
    if n % i == 0:
        n /= i
        ans += 1
        d[i] = True
        

if n > 1 and (n not in d):
    ans += 1
    

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

a = set()
N = n
i = 2
while i * i <= N:
    if (N % i) != 0:
        i += 1
        continue
    now = i
    while N >= now:
        if N % now == 0:
            a.add(now)
            N //= now
        now = now ** i
    i += 1
if N != 1:
    a.add(N)
print(len(a))

Submission status: Wrong Answer

Solution code:
n=int(input())
from  collections import defaultdict

def prime_factorize(n):
    d=defaultdict(int) 
    while n % 2 == 0:
        d[2]+=1
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            d[f]+=1
            n //= f
        else:
            f += 2
    if n != 1:
        d[n]+=1
    return d

u=prime_factorize(n) 
cnt=0
for key,value in u.items():
    r=10**12
    l=0 
    while r-l>1:
        mid=(r+l)//2
        if mid*(mid+1)//2>=value:
            r=mid 
        else:
            l=mid
    cnt+=r
print(cnt)

Submission status: Wrong Answer

Solution code:
import math
def yakusu(n):
    results = []
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0:
            results.append(i)
            results.append(n // i)
    return results

def eratos(n):
    isprime = [True for i in range(n+1)]
    isprime[0] = False
    isprime[1] = False
    for i in range(2, int(math.sqrt(n))+1):
        if isprime[i]:
            j = i + i
        while j <= n:
            isprime[j] = False
            j = j + i
    return isprime

N = int(input())
setA = set(yakusu(N))
A = list(setA)
is_prime = eratos(10**6)
if len(A) == 1:
    print(0)
elif len(A) == 2:
    print(1)
else:
    tmp = []
    ans = 0
    for i, b in enumerate(is_prime):
        if b:
            x = i
            while N % x == 0:
                ans += 1
                N = N//x
                x *= i
                # print(N)

    print(ans)

Submission status: Wrong Answer

Solution code:
def SieveOfEratosthenes(n):
    sn = int(n ** 0.5)
    res = []
    check = [False] * (sn + 1)
    for i in range(2, sn+1):
        if check[i]:
            continue
        res.append(i)
        for j in range(2 * i, sn+1, i):
            check[j] = True
    return res

def trialDivision(n):
    res = dict()
    pn = SieveOfEratosthenes(n)
    for p in pn:
        while n % p == 0:
            res[p] = res.get(p, 0) + 1
            n //= p
    if n > 1:
        res[n] = 1
    return res

N = int(input())
fn = trialDivision(N)
ans = 0
for n in fn.values():
    res = 0
    i = 1
    while res + i <= n:
        res += 1
        i += 1
    ans += res
print(ans)

Submission status: Wrong Answer

Solution code:
def is_prime(n):
    for i in range(2, int(n ** 0.5)):
        if n % i == 0:
            return False
    return True


def primes(n):
    ps = {}
    for i in range(2, n):
        if n == 1:
            break
        if n % i == 0:
            cnt = 0
            while n % i == 0:
                n = n // i
                cnt += 1

            ps[i] = cnt

    return ps


def main():
    n = int(input())
    if is_prime(n):
        print(1)
        exit()

    ps = primes(n)

    ans = 0
    # print(ps)
    for k, v in ps.items():
        i = (-1 + (1 + 8 * v) ** 0.5) / 2
        ans += int(i)

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin
inf = 1 << 60
mod = 1000000007

sys.setrecursionlimit(10**7)

ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

n = ni()

def prime_factorization(n):
    i = 2
    res = []
    while i * i <= n:
        if n % i != 0:
            i += 1
            continue
        ex = 0
        while n % i == 0:
            ex += 1
            n //= i
        res.append((i, ex))
    if n != 1:
        res.append((n, 1))
    return res

ans = 0
fac = prime_factorization(n)
for a, ex in fac:
    i = 1
    while ex - i >= 0:
        ans += 1
        i += 1
        ex -= 1

print(ans)

Submission status: Wrong Answer

Solution code:

n=int(input())

def factorization(n):
    global a
    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

soinsu = factorization(n)
a = len(soinsu)
ans = 0

for i in range(a):
    x = soinsu[i][1]
    for j in range(1,10**18):
        if x >= j:
            x = x-j
            ans += 1
        else:
            break

if ans == 0 and n!= 1:
    ans = 1

print (ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
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])
c = 0
for i in range(len(arr)):
    k = arr[i][1]
    c += 1
    for j in range(1, arr[i][1]):
        k -= j
        if k > j:
            c += 1
print(c)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(1000000000)
import math
from math import gcd
def lcm(a, b): return a * b // gcd(a, b)
from itertools import count, permutations, chain
from functools import lru_cache
from collections import deque, defaultdict
from pprint import pprint
ii = lambda: int(input())
mis = lambda: map(int, input().split())
lmis = lambda: list(mis())
INF = float('inf')
N1097 = 10**9 + 7

def meg(f, ok, ng):
    while abs(ok-ng)>1:
        mid = (ok+ng)//2
        if f(mid):
            ok=mid
        else:
            ng=mid
    return ok

def get_inv(n, modp):
    return pow(n, modp-2, modp)

def factorials_list(n, modp):    # 10**6
    fs = [1]
    for i in range(1, n+1):
        fs.append(fs[-1] * i % modp)
    return fs

def invs_list(n, fs, modp):     # 10**6
    invs = [get_inv(fs[-1], modp)]
    for i in range(n, 1-1, -1):
        invs.append(invs[-1] * i % modp)
    invs.reverse()
    return invs

def comb(n, k, modp):
    num = 1
    for i in range(n, n-k, -1):
        num = num * i % modp
    den = 1
    for i in range(2, k+1):
        den = den * i % modp
    return num * get_inv(den, modp) % modp

def comb_from_list(n, k, modp, fs, invs):   
    return fs[n] * invs[n-k] * invs[k] % modp

#

class UnionFindEx:
    def __init__(self, size):
        #正なら根の番号、負ならグループサイズ
        self.roots = [-1] * size
    def getRootID(self, i):
        r = self.roots[i]
        if r < 0:   #負なら根
            return i
        else:
            r = self.getRootID(r)
            self.roots[i] = r
            return r
    def getGroupSize(self, i):
        return -self.roots[self.getRootID(i)]
    def connect(self, i, j):
        r1, r2 = self.getRootID(i), self.getRootID(j)
        if r1 == r2:
            return False
        if self.getGroupSize(r1) < self.getGroupSize(r2):
            r1, r2 = r2, r1
        self.roots[r1] += self.roots[r2]    #サイズ更新
        self.roots[r2] = r1
        return True

Yes = 'Yes'
No = 'No'


def main():
    N=ii()
    NN = N
    ans = 0
    for i in chain(range(2, int(N**0.5)+3)):
        c = i
        while N%c == 0:
            N //= c
            c += i
            ans += 1
    ans += (NN==N>1)
    print(ans)





main()

Submission status: Wrong Answer

Solution code:
import collections

N = int(input())

A = list()
if N == 1:
	A.append(1)
else:
	while N%2 == 0:
		A.append(2)
		N = N//2
	f = 3
	while f*f <= N:
		if N % f == 0:
			A.append(f)
			N = N//f
		else:
			f += 2
	if N != 1:
		A.append(N)

A = collections.Counter(A)
del A[1]
count = 0

for a in A.values():
	n = 1
	th = n*(n+1)/2
	while a > th:
		n += 1
		th = n*(n+1)/2
	count += n

print(count)

Submission status: Wrong Answer

Solution code:
import sys
n = int(input())


def is_prime(n):
    if n == 1:
        return False
    for i in range(2, int(n**0.5)+1):
        if n % i == 0:
            return False
    return True


def is_root(n):
    for i in range(2, 40):
        if n**(1 / i).is_integer():
            return True
    else:
        return False


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

if is_prime(n):
    print(1)
    sys.exit()

ans = 0
for i in range(2, 10**12):
    if is_prime(n):
        break
    if n == 1:
        break
    if is_prime(i) or is_root(i):
        if n % i == 0:
            n //= i
            ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
from collections import defaultdict

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

index = int(pow(N, 0.5) + 1)
ans = []
for i in range(2, index):
    while N % i == 0:
        N //= i
        ans.append(i)
if ans == []:
    print(1)
    exit()
d = defaultdict(int)
for i in ans:
    d[i] += 1

sosuLst = []
for v, c in d.items():
    cnt = 1
    while c > 0:
        c -= cnt
        cnt += 1
        if c != 0 and c < cnt:
            sosuLst.append(v ** cnt)
            break
        else:
            sosuLst.append(v ** (cnt - 1))

print(len(set(sosuLst)))

Submission status: Wrong Answer

Solution code:
N=int(input())
import math

# 素数判定関数
def isPrime(num):
    # 2未満の数字は素数ではない
    if num < 2: return False
    # 2は素数
    elif num == 2: return True
    # 偶数は素数ではない
    elif num % 2 == 0: return False

    # 3 ~ numまでループし、途中で割り切れる数があるか検索
    # 途中で割り切れる場合は素数ではない
    for i in range(3, math.floor(math.sqrt(num))+1, 2):
        if num % i == 0:
            return False

    # 素数
    return True

# 素数判定
def callIsPrime(input_num=1000):
    numbers = []
    # ループしながら素数を検索する
    for i in range(1, input_num):
        if isPrime(i):
            numbers.append(i)

    # 素数配列を返す
    return numbers

# 関数の呼び出し

P=callIsPrime(int(math.sqrt(N))+1)
#print(P)
ans=0
ans+=isPrime(N)
for i in P:
  count=1
  #print(i)
  while(N%(i**count)==0):
    ans+=1
    N=N//(i**count)
    #print(i**count)
    count+=1

#print(make_divisors(N))
#print(N)
print(ans)

Submission status: Wrong Answer

Solution code:
trs = [1, 3, 6, 10, 15, 21, 28, 36, 45, 55, 66, 78, 91, 105, 120, 136, 153, 171,
      190, 210, 231, 253, 276, 300, 325, 351, 378, 406, 435,
      465, 496, 528, 561, 595, 630, 666, 703, 741, 780]

n = int(input())
D = {}

i = 2
while i * i < n:
    # print(i, n)
    if n % i == 0:
        n = n // i
        if i in D:
            D[i] += 1
        else:
            D[i] = 1
    else:
        i += 1

if n in D:
    D[n] += 1
else:
    D[n] = 1


ans = 0
for one in D:
    for ntr, tr in enumerate(trs):
        if tr > D[one]:
            ans += ntr
            break

print(ans)

Submission status: Wrong Answer

Solution code:
import math
M = int(input())
N = M
sq = math.floor(math.sqrt(N+0.01))
sum = 0
count = 0
while(N%2 == 0):
    count += 1
    N /= 2
sum += (math.sqrt(8*count+1.00001)-1)//2
count = 0
while(N%3 == 0):
    count += 1
    N /= 3
sum += (math.sqrt(8*count+1.00001)-1)//2
for i in range(5, sq+1, 6):
    if(N%i != 0 and N%(i+2) != 0):
        continue
    count = 0
    while(N%i == 0):
        count += 1
        N /= i
    sum += (math.sqrt(8*count+1.0000001)-1)//2
    count = 0
    if(N%(i+2) != 0):
        continue
    while(N%(i+2) == 0):
        count += 1
        N /= (i+2)
    sum += (math.sqrt(8*count+1.0000001)-1)//2
    if(N == 1):
        print(int(sum))
        exit()
if(N == M):
    print("1")
    exit()
if(N != 1):
    print(int(sum) + 1)
else:
    print(int(sum))

Submission status: Wrong Answer

Solution code:
import math


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)
if a[0][0] == 1:
    print(0)
else:
    b = []
    c = [0,1, 3, 6, 10, 15, 21, 28, 36, 45]
    for i in range(len(a)):
        b.append(a[i][1])
    ans = 0
    for i in range(len(b)):
        for j in range(9):
            if b[i] == c[j]:
                ans +=j
                break
            elif b[i] < c[j]:
                ans += j-1
                break
                
    print(ans)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
if n == 1:
  print(0)
  exit(0)
  
pows = []
upto = int(math.sqrt(n))
for i in range(2, upto+1):
  if n % i == 0:
    cc = 0
    while n % i == 0:
      n //= i
      cc += 1
    pows.append(cc)

    
if len(pows) == 0:
  print(1)
  exit(0)
  
ans = 0
for pp in pows:
  start = 1
  cc = 0
  while pp - start >= 0:
    cc += 1
    pp -= start
    start += 1
    
  ans += cc

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
ans = 0
N = int(input())
f = factorization(N)
for pair in f:
  p = pair[0]
  e = pair[1]
  i = 1
  while(e-i>=0):
    e = e - i
    i = i  + 1
    ans = ans + 1
print(ans)

Submission status: Wrong Answer

Solution code:
#! /usr/bin/env python3

import sys
from collections import deque, Counter
int1 = lambda x: int(x) - 1
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(500000)

N = int(readline())

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


c = list(Counter(prime_factorize(N)).values())

ans = 0
used = {}

for i in range(len(c)):
    acc = 0
    cnt = 1
    while True:
        if c[i] >= acc + cnt:
            c[i] -= acc+cnt
            acc = acc+cnt
            ans += 1
        else:
            break
c = sorted(c)[::-1]

hoge = 1
for i in range(len(c)-1):
    if min(c[i], c[i+1]) >= 1:
        c[i]-=1
        c[i+1]-=1
        ans += 1
    
print(ans)

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)) + 2):
        x = i
        while 1:
            if n % x == 0 and d[x] != 1:
                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:
N = int(input())

def primef(n):
  i = 2
  p_nums = []
  while i * i <= n:
    if n % i == 0:
      n /= i
      p_nums.append(i)
    i += 1
  if n > 1:
    p_nums.append(int(n))
  return  len(set(p_nums))

print(primef(N))

Submission status: Wrong Answer

Solution code:
from sys import *
from collections import Counter
N = int(stdin.readline())
things = []
if N ==1:
    print(0)
    exit()
for i in range(2,N):
    if i*i > N:
        if len(things) == 0:
            print(1)
            exit()
        break
    while(N%i == 0):
        things.append(i)
        N = N/i

c = Counter(things)
vals = 0
for item in c:
    hue = 0
    for i in range(1,100000):
        if (hue + i) > c[item]:
            break
        else:
            hue += i
            vals += 1
print(vals)

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()
    count = 0
    orig_N = N
    for i in range(2, N):
        if i * i > orig_N:
            break
        if N % i == 0:
            N = N // i
            count += 1
    print(count)
    




if __name__ == '__main__':
    main()