Problem:


Score : 400 points

Problem Statement

Given is a positive integer N. Consider repeatedly applying the operation below on N:

First, choose a positive integer z satisfying all of the conditions below:

z can be represented as z=p^e, where p is a prime number and e is a positive integer;

z divides N;

z is different from all integers chosen in previous operations.

Then, replace N with N/z.

Find the maximum number of times the operation can be applied.

Constraints

All values in input are integers.

1 \leq N \leq 10^{12}

Input

Input is given from Standard Input in the following format:

N

Output

Print the maximum number of times the operation can be applied.

Sample Input 1

24

Sample Output 1

3

We can apply the operation three times by, for example, making the following choices:

Choose z=2 (=2^1). (Now we have N=12.)

Choose z=3 (=3^1). (Now we have N=4.)

Choose z=4 (=2^2). (Now we have N=1.)

Sample Input 2

1

Sample Output 2

0

We cannot apply the operation at all.

Sample Input 3

64

Sample Output 3

3

We can apply the operation three times by, for example, making the following choices:

Choose z=2 (=2^1). (Now we have N=32.)

Choose z=4 (=2^2). (Now we have N=8.)

Choose z=8 (=2^3). (Now we have N=1.)

Sample Input 4

1000000007

Sample Output 4

1

We can apply the operation once by, for example, making the following choice:

z=1000000007 (=1000000007^1). (Now we have N=1.)

Sample Input 5

997764507000

Sample Output 5

7



Sample input:
24


Sample output:
3

Submission status: Wrong Answer

Solution code:
import math

n = int(input())
nroot = int(math.sqrt(n)) +1

result = {}

for i in range(2,nroot+1):
    while n%i==0:
        if i in result:
            result[i] +=1
        else:
            result[i] = 1
        
        n = n//i

ans = 0
for _, i in result.items():
    r = 1
    while  i >= r:
        i -=  r
        r +=1
    
        
    ans += r -1
if ans > 0:
    print(ans)
else:
    if n > 1:
        print(1)
    else:
        print(0)

Submission status: Wrong Answer

Solution code:
import math

n = int(input())
nroot = int(math.sqrt(n)) +1

result = {}

for i in range(2,nroot+1):
    while n%i==0:
        if i in result:
            result[i] +=1
        else:
            result[i] = 1
        
        n = n//i

ans = 0
for _, i in result.items():
    r = 0
    while  i >= 2 **r:
        i -= 2 ** r
        r +=1
    
        
    ans += r
if ans > 0:
    print(ans)
else:
    if n > 1:
        print(1)
    else:
        print(0)

Submission status: Wrong Answer

Solution code:
import math

n = int(input())
nroot = int(math.sqrt(n)) +1

result = {}

for i in range(2,nroot+1):
    while n%i==0:
        if i in result:
            result[i] +=1
        else:
            result[i] = 1
        
        n = n//i

ans = 0
for _, i in result.items():
    add = 0
    while 0.5*add*(add+1)<=i:
        add +=1
        
    ans += add -1
if ans > 0:
    print(ans)
else:
    if n > 1:
        print(1)
    else:
        print(0)

Submission status: Wrong Answer

Solution code:
def fc(n):
    wk =0
    h=0
    for i in range(2,int(n**0.5)):
        j=i
        while n%j ==0:
            wk+=1
            n//=j 
            j*=i
            h=i
            if n<j:
                break
    if n!=1 and h!=n:
        wk+=1
    #print(i,h,n)
    return wk

n =int(input())
print(fc(n))

Submission status: Wrong Answer

Solution code:
n = int(input())

p = []
n2 = n
for i in range(2,int(n2**0.5//1 + 1)):
  index = 0
  while n2%i == 0:
    index+=1
    n2 = n2//i
  if index != 0:
    p.append(index)
  else:
    continue

count = 0
t = 1

if n == 1:
  print(0)
elif not p:
  print(1)
else:
  for i in range(len(p)):
    while p[i] - t >= 0:
      p[i]-=t
      count+=1
      t+=1
    t = 1
  print(count)

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.buffer.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.buffer.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.buffer.readline().split()))

n = ri()
ans = 0
d = 2
while d**2 <= n:
    if n % d != 0:
        d += 1
        continue

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

    while n % dd == 0:
        n //= dd

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

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.buffer.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.buffer.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.buffer.readline().split()))

n = ri()
ans = 0
d = 2
while d**2 <= n:
    if n % d != 0:
        d += 1
        continue

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

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

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.buffer.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.buffer.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.buffer.readline().split()))

n = ri()
ans = 0
d = 2
while d**2 <= n:
    if n % d != 0:
        d += 1
        continue
    dd = d
    while n % d == 0:
        n //= d
        d *= d
        ans += 1
    while n % dd == 0:
        n //= dd
    d = dd + 1
    
if n != 1:
    ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.buffer.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.buffer.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.buffer.readline().split()))

n = ri()
ans = 0
d = 2
while d**2 <= n:
    dd = d
    while n % d == 0:
        n //= d
        d *= d
        ans += 1
    while n % dd == 0:
        n //= dd
    d = dd + 1
if n != 1:
    ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.buffer.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.buffer.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.buffer.readline().split()))

n = ri()
ans = 0
d = 2
while d**2 <= n:
    dd = d
    while n % d == 0:
        n //= d
        print(n, d, ans)
        d *= d
        ans += 1
    while n % dd == 0:
        n //= dd
    d = dd + 1
if n != 1:
    ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.buffer.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.buffer.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.buffer.readline().split()))

n = ri()
ans = 0
d = 2
while d**2 <= n:
    dd = d
    while n % d == 0:
        n //= d
        print(n, d, ans)
        d **= 2
        ans += 1
    while n % dd == 0:
        n //= dd
    d = dd + 1
if n != 1:
    ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.buffer.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.buffer.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.buffer.readline().split()))

n = ri()
ans = 0
d = 2
for d in range(2, int(n**0.5) + 1):
    e = d
    while n%d == 0:
        n //= d
        print(n, d)
        d *= d
        ans += 1
    while n%e == 0:
        n = n//e

if n:
    ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.buffer.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.buffer.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.buffer.readline().split()))

n = ri()
ans = 0
d = 2
for d in range(2, int(n**0.5) + 1):
    e = d
    while n%d == 0:
        n //= d
        d *= d
        ans += 1
    while n%e == 0:
        n = n//e

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

Submission status: Wrong Answer

Solution code:
from collections import Counter

def get_prime_factors(x):
    out = []
    if x < 1:
        return out
    while not x%2:
        out.append(2)
        x //= 2
    i = 3
    while i*i <= x:
        if not x%i:
            out.append(i)
            x //= i
        else:
            i += 2
    if x != 1:
        out.append(x)
    return out

def main():
    n = int(input())
    primes = Counter(get_prime_factors(n))
    ans = 0
    for k, v in primes.items():
        num = 1
        while v > 0:
            ans += 1
            v -= num
            num += 1
    print(ans)
    

if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.buffer.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.buffer.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.buffer.readline().split()))

n = ri()
ans = 0
d = 2
for d in range(2, int(n**0.5) + 1):
    while n%d == 0:
        n //= d
        d *= d
        ans += 1
if n >= d:
    ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.buffer.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.buffer.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.buffer.readline().split()))

n = ri()
ans = 0
d = 2
for d in range(2, int(n**0.5)):
    while n%d == 0:
        n //= d
        d *= d
        ans += 1
if n > d:
    ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
def resolve():
	answer = 0
	N = int(input())
	if N==1:
		print(answer)
	else:
		# 素因数pを見つける。範囲は2から√Nまででよい。
		for p in range(2, int(N**0.5)+2):
			e = 0
			while (N % p == 0):
				N /= p
				e += 1
			# z=p**eが見つかった
			if e>0:
				# eを1, 2, 3, 4...に分けられる回数カウント
				for i in range(1, e+1):
					if e >= i:
						e -= i
						answer += 1
		# もし素因数が見つからなかった場合、N自身を素数ととらえて1回カウント
		if answer==0:
			answer = 1
		print(answer)
        
resolve()

Submission status: Wrong Answer

Solution code:

import glob
import math


# 問題ごとのディレクトリのトップからの相対パス
REL_PATH = 'ABC\\169\\D'

# テスト用ファイル置き場のトップ
TOP_PATH = 'C:\\AtCoder'

class Common:

    problem = []
    index = 0

    def __init__(self, rel_path):
        self.rel_path = rel_path

    def initialize(self, path):
        file = open(path)
        self.problem = file.readlines()
        self.index = 0
        return

    def input_data(self):
        try:
            IS_TEST
            self.index += 1
            return self.problem[self.index-1]

        except NameError:
            return input()

    def resolve(self):
        pass

    def exec_resolve(self):
        try:
            IS_TEST
            for path in glob.glob(TOP_PATH + '\\' + self.rel_path + '/*.txt'):
                print("Test: " + path)
                self.initialize(path)
                self.resolve()
                print("\n\n")
        except NameError:
            self.resolve()


class Solver(Common):

    alph = []

    def rec(self, result, now, max, N):

        if now == N:
            res = ""
            for i in result:
                res += self.alph[i]
            print(res)
            return

        if now == 0:
            result[0] = 0
            self.rec(result, now+1, 0, N)
            return

        for i in range(0, max+2):
            if i == N:
                return
            result[now] = i
            if i > max:
                self.rec(result, now+1, i, N)
            else:
                self.rec(result, now+1, max, N)

    def resolve(self):

        count = 0

        N = int(self.input_data())
        # 現実的に割れるかの確認をすれば十分な最大値
        n = int(math.sqrt(N))

        result = 0
        now = 2
        while now <= N:
            count = 0
            while True:
                if N % now == 0:
                    N = int(N / now)
                    count += 1
                else:
                    break
            for i in range(1,10000):
                if i <= count:
                    result += 1
                    count -= i
                else:
                    break

            now += 1

            if now > n:
                result = 1
                break



        print(str(result))

solver = Solver(REL_PATH)
solver.exec_resolve()

Submission status: Wrong Answer

Solution code:
import math

def factrization_prime(number):
    factor = {}
    div = 2
    s = math.sqrt(number)
    while div < s:
        div_cnt = 0
        while number % div == 0:
            div_cnt += 1
            number //= div
        if div_cnt != 0:
            factor[div] = div_cnt
        div += 1
    if number > 1:
        factor[number] = 1
    return factor

number = int(input())
factor = factrization_prime(number)
ans = 0
for i in factor.values():
  n = 0
  while n*(n+1)//2 < i:
    n +=  1
  ans += n
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

number = 2

p_box = []
p = 0
while n !=1:
  if n%number == 0:
    while n%number == 0:
      n = n/number
      p+=1
    p_box.append(p)
    p = 0
    number+=1
  else:
    number+=1
count = 0
t = 1
for i in range(len(p_box)):
  while p_box[i] >0:
    p_box[i]-=t
    t+=1
    count+=1
print(count)

Submission status: Wrong Answer

Solution code:
def D():
	answer = 0
	N = int(input())
	if N==1:
		print(answer)
	else:
		# 素因数pを見つける。範囲は2から√Nまででよい。
		for p in range(2, int(N**0.5)+2):
			e = 0
			while (N % p == 0):
				N /= p
				e += 1
			# z=p**eが見つかった
			if e>0:
				# eを1, 2, 3, 4...に分けられる回数カウント
				for i in range(1, e+1):
					if e >= 1:
						e -= i
						answer += 1
		# もし素因数が見つからなかった場合、N自身を素数ととらえて1回カウント
		if answer==0:
			answer = 1
		print(answer)

D()

Submission status: Wrong Answer

Solution code:
def resolve():
	answer = 0
	N = int(input())
	if N==1:
		print(answer)
	else:
		# 素因数pを見つける。範囲は2から√Nまででよい。
		for p in range(2, int(N**0.5)+1):
			e = 0
			while (N % p == 0):
				N /= p
				e += 1
			# z=p**eが見つかった
			if e>0:
				# eを1, 2, 3, 4...に分けられる回数カウント
				for i in range(1, e+1):
					if e >= i:
						e -= i
						answer += 1
		# もし素因数が見つからなかった場合、N自身を素数ととらえて1回カウント
		if answer==0:
			answer = 1
		print(answer)
        
resolve()

Submission status: Wrong Answer

Solution code:
def resolve():
	answer = 0

	N = int(input())
	if N==1:
		print(0)
	else:
		# 素因数pを見つける。範囲は2から√Nまででよい。
		for p in range(2, int(N**0.5)):
			e = 0
			while (N % p == 0):
				N /= p
				e += 1
			# z=p**eが見つかった
			if e>0:
				# eを1, 2, 3, 4...に分けられる回数文カウント
				for i in range(1, e+1):
					if e >= i:
						e -= i
						answer += 1
		# もし素因数が見つからなかった場合、N自身を素数ととらえて1回カウント
		if answer==0:
			answer = 1
		print(answer)
        
resolve()

Submission status: Wrong Answer

Solution code:

N = int(input())
 
count = 0
for z in range(2,N+1):
    if N % z == 0:
        N = N / z
        count += 1
    elif N == 1:
        break
print(count)

Submission status: Wrong Answer

Solution code:
def fc(n):
    wk =0
    h=0
    for i in range(2,int(n**0.5)):
        j=i
        while n%j ==0:
            wk+=1
            n//=j 
            j*=i
            h=i
            if n==0:
                break
    if n!=1 and h!=n:
        wk+=1
    #print(i,h,n)
    return wk

n =int(input())
print(fc(n))

Submission status: Wrong Answer

Solution code:
def fc(n):
    wk =0
    h=0
    for i in range(2,int(n**0.5)+1):
        j=i
        while n%j ==0:
            wk+=1
            n//=j 
            j*=i
            h=i
            if n==0:
                break
    if n!=1 and h!=n:
        wk+=1
    #print(i,h,n)
    return wk

n =int(input())
print(fc(n))

Submission status: Wrong Answer

Solution code:
import numpy as np
import sys

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

d = int(N ** .5)

def eratosthenes(N):
	is_prime = [True] * (N + 1)
	is_prime[0], is_prime[1] = False, False
	for i in range(2, int(N**(1/2)) + 1):
		if is_prime[i]:
			for j in range(i * 2, N + 1, i):
				is_prime[j] = False
	return [i for i in range(N+1) if is_prime[i]]

p_num = eratosthenes(d+1)
MAX_p = p_num[-1]
ans = 0

for p in p_num:
    t_p = p
    while N % p == 0:
        N //= p
        ans += 1
        p *= t_p

if N > MAX_p:
    dd = int(N ** .5)
    cond = 1
    for i in range(2, dd+1):
        if N % i == 0:
            cond = 0
            break
    if cond:
        ans += 1
    
print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np
import sys

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

d = int(N ** .5)

def eratosthenes(N):
	is_prime = [True] * (N + 1)
	is_prime[0], is_prime[1] = False, False
	for i in range(2, int(N**(1/2)) + 1):
		if is_prime[i]:
			for j in range(i * 2, N + 1, i):
				is_prime[j] = False
	return [i for i in range(N+1) if is_prime[i]]

p_num = eratosthenes(d+1)
ans = 0

for p in p_num:
    t_p = p
    while N % p == 0:
        N //= p
        ans += 1
        p *= t_p
    
if ans == 0:
    print(1)
else:
    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 a,b in A:
    if b < 3:
        ans += 1
    elif b < 6:
        ans += 2
    elif b < 10:
        ans += 3
    elif b < 15:
        ans += 4
    elif b < 21:
        ans += 5
    elif b < 28:
        ans += 6
    elif b < 36:
        ans += 7
    elif b < 45:
        ans += 8
    else:
        ans += 9
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)

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

    return arr

ans = 0    
X = int(input())
Y = factorization(X)
Y.sort()
for i in range(len(Y)):
  if X % Y[i] == 0:
    ans += 1
    X /= Y[i]
    
if X == 1:
  print(0)
else:
  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)

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

    return arr

ans = 0    
X = int(input())
Y = factorization(X)
Y.sort()
for i in range(len(Y)):
  if X % Y[i] == 0:
    ans += 1
    X /= Y[i]

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

#素因数分解
def soinsu_bunkai(m):
    pf={}

    for i in range(2,int(m**0.5)+1):
        while m%i==0:
            pf[i]=pf.get(i,0)+1
            m//=i
    if m>1:
        pf[m]=1
    return pf

#初期入力
N = int(input())
div =make_divisors(N) #Nの約数
div.sort()
div_1_except=div[1:]
count =0
for i in div_1_except:
    q,mod= divmod(N,i)
    if mod ==0:
        N =q    
        ii =soinsu_bunkai(i) #Nの約数を素因数分解
        if len(ii) ==1 :
            count +=1
    #if N <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())
A = factorization(N)
ans = 0
if N == 1:
  print(0)
  exit()
for a,b in A:
    if b < 3:
        ans += 1
    elif b < 6:
        ans += 2
    elif b < 10:
        ans += 3
    elif b < 15:
        ans += 4
    elif b < 21:
        ans += 4
    elif b < 28:
        ans += 5
    elif b < 36:
        ans += 6
    elif b < 45:
        ans += 7
    else:
        ans += 8
print(ans)

Submission status: Wrong Answer

Solution code:
import math

N = int(input())

x = N
n = math.floor(math.sqrt(N))
p = {}
i = 2

while i <= n:
    while x % i == 0:
        p.setdefault(i, 0)
        p[i] += 1
        x //= i
    i += 1

if x != 1 and x == N:
    p.setdefault(N, 1)

ans = 0

for v in p.values():
    i = 1
    while v - i >= 0:
        v -= i
        ans += 1
        i += 1

print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np
import sys

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

d = int(N ** .5)

def eratosthenes(N):
	is_prime = [True] * (N + 1)
	is_prime[0], is_prime[1] = False, False
	for i in range(2, int(N**(1/2)) + 1):
		if is_prime[i]:
			for j in range(i * 2, N + 1, i):
				is_prime[j] = False
	return [i for i in range(N+1) if is_prime[i]]

p_num = eratosthenes(d+100)
power = []
for p in p_num:
    tmp = N
    cnt = 0
    while True:
        if tmp % p == 0:
            cnt += 1
            tmp //= p
        else:
            break
    if cnt > 0:
        power.append(cnt)

if not power:
    print(1)
    sys.exit()

counter = [0,1]
for i in range(2,100):
    counter.append(counter[-1] + i)

counter = np.array(counter)
power = np.array(power)

ind = np.searchsorted(counter, power, side = 'right')
ind -= 1

print(sum(ind))

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 a,b in A:
    if b < 3:
        ans += 1
    elif b < 6:
        ans += 2
    elif b < 10:
        ans += 3
    elif b < 15:
        ans += 4
    elif b < 21:
        ans += 4
    elif b < 28:
        ans += 5
    elif b < 36:
        ans += 6
    elif b < 45:
        ans += 7
    else:
        ans += 8
print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np
import sys

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

d = int(N ** .5)

def eratosthenes(N):
	is_prime = [True] * (N + 1)
	is_prime[0], is_prime[1] = False, False
	for i in range(2, int(N**(1/2)) + 1):
		if is_prime[i]:
			for j in range(i * 2, N + 1, i):
				is_prime[j] = False
	return [i for i in range(N+1) if is_prime[i]]

p_num = eratosthenes(d)
power = []
for p in p_num:
    tmp = N
    cnt = 0
    while True:
        if tmp % p == 0:
            cnt += 1
            tmp //= p
        else:
            break
    if cnt > 0:
        power.append(cnt)

if not power:
    print(1)
    sys.exit()

counter = [0,1]
for i in range(2,100):
    counter.append(counter[-1] + i)

counter = np.array(counter)
power = np.array(power)

ind = np.searchsorted(counter, power, side = 'right')
ind -= 1

print(sum(ind))

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 a,b in A:
    if b < 3:
        ans += 1
    elif b < 6:
        ans += 2
    elif b < 10:
        ans += 3
    elif b < 15:
        ans += 4
    elif b < 21:
        ans += 4
    elif b < 28:
        ans += 5
    else:
        ans += 6
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

#素因数分解
def soinsu_bunkai(m):
    pf={}

    for i in range(2,int(m**0.5)+1):
        while m%i==0:
            pf[i]=pf.get(i,0)+1
            m//=i
    if m>1:
        pf[m]=1
    return pf

#初期入力
N = int(input())
div =make_divisors(N) #Nの約数
div.sort()
div_1_except=div[1:]
count =0
for i in div_1_except:
    N //= i
    if N <1:
        break
    ii =soinsu_bunkai(i) #Nの約数を素因数分解
    if len(ii) ==1 :
        count +=1
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())
a = factorization(n)

ans = 0
for i in a:
    ans += 1
    k = 2
    l = i[1] - 1
    while l >= k:
        ans += 1
        l -= k
        k += 1
print(ans)

Submission status: Wrong Answer

Solution code:
def resolve():
	import math
	N = int(input())
	if N==1:
		print(0)
	else:
		# count e of each P
		lst_e = []
		for p in range(2, math.ceil(math.sqrt(N))):
			e = 0
			while (N % p == 0):
				N /= p
				e += 1
			if e>0:
				lst_e.append(e)
		# lst_e.append(1)
		# count answer
		answer = 0
		for e in lst_e:
			i = 1
			while e >= i:
				e -= i
				i += 1
				answer += 1
		if answer == 0:
			answer = 1
		print(answer)
        
resolve()

Submission status: Wrong Answer

Solution code:
n = int(input())
limit = n**0.5
q = 2

if n == 1:
    print(0)
else:
    ans = 0
    while q < limit:
        cnt = 0
        while n % q == 0:
            cnt += 1
            n /= q
        if cnt > 0:
            ans += int((2*cnt + 0.25)**0.5 + 1.5 - 10**(-10))
            limit = n**0.5
        q += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
limit = n**0.5
q = 2

if n == 1:
    print(0)
else:
    ans = 0
    while q < limit:
        cnt = 0
        while n % q == 0:
            cnt += 1
            n /= q
        if cnt > 0:
            ans += int((2*cnt + 0.25)**0.5 + 1.5 - 10**(-100))
            limit = n**0.5
        q += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
def resolve():
	import math
	N = int(input())
	if N==1:
		print(0)
	else:
		# count e of each P
		lst_e = []
		for p in range(2, int(math.sqrt(N))):
			e = 0
			while (N % p == 0):
				N /= p
				e += 1
			if e>0:
				lst_e.append(e)
		# lst_e.append(1)
		# count answer
		answer = 0
		for e in lst_e:
			i = 1
			while e >= i:
				e -= i
				i += 1
				answer += 1
		if answer == 0:
			answer = 1
		print(answer)
        
resolve()

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
  if ansDict == {}:
    ansDict[N] = 1
  return ansDict 

if N <= 1:
  print(0)
  exit()
  
ansDict = prime_factorization(N)
ansCount = 0
for p,v in ansDict.items():
  e = 1
  while e <= v:
    ansCount += 1
    v -= e 
    e += 1  

print(ansCount)

Submission status: Wrong Answer

Solution code:
N = int(input())

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


import collections
c = collections.Counter(prime_factorize(N))

tmp = []
for i in range(1,40):
    tmp.append((1+i)*i//2)
import bisect
ans = 0
for i in list(c.values()):
    ans += bisect.bisect_right(tmp,i)
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

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


import collections
c = collections.Counter(prime_factorize(N))

tmp = []
for i in range(1,40):
    tmp.append((1+i)*i//2)
import bisect
ans = 0
for i in list(c.values()):
    ans += bisect.bisect_right(tmp,i)
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
import collections
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
ans=0
a = collections.Counter( prime_factorize(n))
for v in a.values():
    ans+=(v+1)//2

print(ans)

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
 
for p,v in ansDict.items():
  e = 1
  while e <= v:
    ansCount += 1
    v -= e 
    e += 1    
print(ansCount)