Problem:


Score : 400 points

Problem Statement

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

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

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

z divides N;

z is different from all integers chosen in previous operations.

Then, replace N with N/z.

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

Constraints

All values in input are integers.

1 \leq N \leq 10^{12}

Input

Input is given from Standard Input in the following format:

N

Output

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

Sample Input 1

24

Sample Output 1

3

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

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

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

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

Sample Input 2

1

Sample Output 2

0

We cannot apply the operation at all.

Sample Input 3

64

Sample Output 3

3

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

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

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

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

Sample Input 4

1000000007

Sample Output 4

1

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

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

Sample Input 5

997764507000

Sample Output 5

7



Sample input:
24


Sample output:
3

Submission status: Wrong Answer

Solution code:
n=int(input())
d={2:0}
if n==1: print(0);exit()
nc=n
while n%2==0:
    d[2]+=1
    n=n//2
for i in range(3,int(nc**0.5)+1,2):
    if n==1: break
    if n%i!=0:continue
    d[i]=0
    while n%i==0:
        d[i]+=1
        n=n//i
if n!=1: d[n]=1 
sm=0
for x in d:
    y=1
    ywork=3
    while ywork<=d[x]:
        y+=1
        ywork+=y+1
    sm+=y
print(sm) if sm else print(1)

Submission status: Wrong Answer

Solution code:
N=int(input())

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]
ans=make_divisors(N)
count=0
K=1
if len(ans)==1:
    print(0)
elif len(ans)==2:
    print(1)
else:
    for i in range(1,len(ans)):
        K*=ans[i]
        if K>=N:
            break
        else:
            count+=1
    print(count)

Submission status: Wrong Answer

Solution code:
def prime_factorize(n):
    result = []
    if n % 2 == 0:
        t = 0
        while n % 2 == 0:
            n //= 2
            t += 1
        result.append((2, t))
    for i in range(3, int(n ** 0.5) + 1, 2):
        if n % i != 0:
            continue
        t = 0
        while n % i == 0:
            n //= i
            t += 1
        result.append((i, t))
        if n == 1:
            break
    if n != 1:
        result.append((n, 1))
    return result


def count_answer(result):
    ans = 0
    for _, count in result:
        i = 1
        while count >= i:
            ans += 1
            count -= 1
            i += 1
    return ans


if __name__ == "__main__":
    prime_factors = prime_factorize(int(input()))
    print(count_answer(prime_factors))

Submission status: Wrong Answer

Solution code:
N=int(input())

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]
ans=make_divisors(N)
count=0
K=1
if len(ans)==1:
    print(0)
elif len(ans)==2:
    print(1)
else:
    for i in range(1,len(ans)):
        K*=ans[i]
        count+=1
        if K>=N:
            break
    print(count)

Submission status: Wrong Answer

Solution code:
N=int(input())

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]
ans=make_divisors(N)
count=0
K=1
if len(ans)==1:
    print(0)
elif len(ans)==2:
    print(1)
else:
    for i in range(1,len(ans)):
        K*=ans[i]
        count+=1
        if K>=N:
            break
        print(count)

Submission status: Wrong Answer

Solution code:
from typing import List
from collections import Counter


def prime_factorize(n):
    result = []
    if n % 2 == 0:
        t = 0
        while n % 2 == 0:
            n //= 2
            t += 1
        result.append((2, t))
    for i in range(3, int(n ** 0.5) + 1, 2):
        if n % i != 0:
            continue
        t = 0
        while n % i == 0:
            n //= i
            t += 1
        result.append((i, t))
        if n == 1:
            break
    if n != 1:
        result.append((n, 1))
    return result


def count_answer(result):
    ans = 0
    for _, count in result:
        i = 1
        while count >= i:
            ans += 1
            count -= 1
            i += 1
    return ans


if __name__ == "__main__":
    prime_factors = Counter(prime_factorize(int(input())))
    print(count_answer(prime_factors))

Submission status: Wrong Answer

Solution code:
from typing import List
from collections import Counter


def prime_factorize(n: int) -> List[int]:
    factor_list = []
    while n % 2 == 0:
        factor_list.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            factor_list.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        factor_list.append(n)
    return factor_list


def count_answer(counter):
    ans = 0
    for count in counter.values():
        i = 1
        while count >= i:
            ans += 1
            count -= 1
            i += 1
    return ans


prime_factors = Counter(prime_factorize(int(input())))
print(count_answer(prime_factors))

Submission status: Wrong Answer

Solution code:
n=int(input())
d={2:0}
if n==1: print(0);exit()
nc=n
while n%2==0:
    d[2]+=1
    n=n//2
for i in range(3,int(nc**0.5)+1,2):
    if n==1: break
    if n%i!=0:continue
    d[i]=0
    while n%i==0:
        d[i]+=1
        n=n//i
sm=0
for x in d:
    if d[x]==0:continue
    y=1
    ywork=3
    while ywork<=d[x]:
        y+=1
        ywork+=y+1
    sm+=y
print(sm) if sm else print(1)

Submission status: Wrong Answer

Solution code:
n = int(input())
c = 0
for p in range(2, int(n**0.5)+1): #nが合成数
  e = 0
  while n%p == 0:
    n //= p
    e += 1
  i = 1
  while e >= i:
    e -= 1
    c += 1
    i += 1
if n != 1: #nが素数
  c += 1
print(c)

Submission status: Wrong Answer

Solution code:
n = int(input())
c = 0
i = 0
for p in range(2, int(n**0.5)+1): #nが合成数
  if n%p == 0:
    c += 1
    n //= p
    i += 1
    if n == p:
      c -= 1
for q in range(2, n+1): #nが合成数
  if n%q == 0:
    c += 1
    n /= q
    i += 1
if n != 1 and i == 0: #nが素数
  c += 1
print(c)

Submission status: Wrong Answer

Solution code:
from typing import List
from collections import Counter


def prime_factorize(n: int) -> List[int]:
    factor_list = []
    while n % 2 == 0:
        factor_list.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            factor_list.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        factor_list.append(n)
    return factor_list


def count_answer(counter):
    ans = 0
    for count in counter.values():
        i = 1
        while count >= i:
            ans += 1
            count -= 1
            i += 1
    return ans


if __name__ == "__main__":
    prime_factors = Counter(prime_factorize(int(input())))
    print(count_answer(prime_factors))

Submission status: Wrong Answer

Solution code:
N=int(input())
a=1
count=0
if N==1:
    print(0)
while N>1:
    for i in range(a+1,N+1):
        if N%i==0:
            a=i
            N=N//i
            count+=1
            break

print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
c = 0
i = 0
for p in range(2, int(n**0.5)+1): #nが合成数
  if n%p == 0:
    c += 1
    n //= p
    i += 1
    if n == p:
      continue
      for q in range(2, n+1): #nが合成数
        if n%q == 0:
          c += 1
          n /= q
          i += 1
if n != 1 and i == 0: #nが素数
  c += 1
print(c)

Submission status: Wrong Answer

Solution code:
n=int(input())
d={2:0}
nc=n
while n%2==0:
    d[2]+=1
    n=n//2
for i in range(3,int(nc**0.5)+1,2):
    if n==1: break
    for key in d:
        if i%key==0:
            break
    else:
        d[i]=0
        while n%i==0:
            d[i]+=1
            n=n//i
sm=0
for x in d:
    if d[x]==0:continue
    y=1
    ywork=3
    while ywork<=d[x]:
        y+=1
        ywork+=y+1
    sm+=y
print(sm) if sm else print(1)

Submission status: Wrong Answer

Solution code:
n = int(input())
c = 0
i = 0
for p in range(2, int(n**0.5)+1): #nが合成数
  if n%p == 0:
    c += 1
    n /= p
    i += 1
if n != 1 and i == 0: #nが素数
  c += 1
print(c)

Submission status: Wrong Answer

Solution code:
from typing import List
from collections import Counter


def prime_factorize(n: int) -> List[int]:
    factor_list = []
    while n % 2 == 0:
        factor_list.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            factor_list.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        factor_list.append(n)
    return factor_list


def count_answer(counter: int) -> int:
    ans = 0
    addition = 0
    for count in counter.values():
        sub = 1
        while True:
            count -= sub
            sub += 1
            ans += 1
            if count == 1:
                addition += 1
                break
            elif count <= 0:
                break
    sub = 1
    while True:
        if addition <= 1:
            break
        addition -= sub
        sub += 1
        ans += 1
    return ans


if __name__ == "__main__":
    prime_factors = Counter(prime_factorize(int(input())))
    print(count_answer(prime_factors))

Submission status: Wrong Answer

Solution code:
from typing import List
from collections import Counter


def prime_factorize(n: int) -> List[int]:
    factor_list = []
    while n % 2 == 0:
        factor_list.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            factor_list.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        factor_list.append(n)
    return factor_list


def count_answer(counter: int) -> int:
    ans = 0
    addition = 0
    for count in counter.values():
        sub = 1
        while True:
            count -= sub
            sub += 1
            ans += 1
            if count == 1:
                addition += 1
                break
            elif count == 0:
                break
    sub = 1
    while True:
        if addition <= 1:
            break
        addition -= sub
        sub += 1
        ans += 1
    return ans


if __name__ == "__main__":
    prime_factors = Counter(prime_factorize(int(input())))
    print(count_answer(prime_factors))

Submission status: Wrong Answer

Solution code:
from typing import List
from collections import Counter


def prime_factorize(n: int) -> List[int]:
    factor_list = []
    while n % 2 == 0:
        factor_list.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            factor_list.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        factor_list.append(n)
    return factor_list


def count_answer(counter):
    ans = 0
    for count in counter.values():
        sub = 1
        while True:
            count -= sub
            sub += 1
            ans += 1
            if count <= 1:
                break
    return ans


if __name__ == "__main__":
    prime_factors = Counter(prime_factorize(int(input())))
    print(count_answer(prime_factors))

Submission status: Wrong Answer

Solution code:
n = int(input())
r = 0
for p in range(2, int(n**0.5)+1):
    e = 0
    while n%p == 0:
       e += 1
       n /= p
    i = 1
    while e >= i:
        e -= i
        r += 1
        i += 1
if n!=1 and r==0:
    r = 1
print(r)

Submission status: Wrong Answer

Solution code:
import math
from collections import defaultdict
N = int(input())
result = 0
for i in range(2, int(math.sqrt(N)+2)):
    cnt = 0
    while N % i == 0:
        cnt += 1
        N /= i
    tmp = 1
    while cnt - tmp >= 0:
        cnt -= tmp
        result += 1
        tmp += 1
if result == 0 and N > 2:
    result += 1
print(result)

Submission status: Wrong Answer

Solution code:
n = int(input())
r = 0
for p in range(2, int(n**0.5)+1):
    e = 0
    while n%p == 0:
       e += 1
       n /= p
    i = 1
    while e >= i:
        e -= i
        r += 1
        i += 1
print(r)

Submission status: Wrong Answer

Solution code:
N=int(input())
ans=0
for i in range(2,10**6+1):
  anssub=0
  t=0
  while N%i==0:
    N=N//i
    anssub+=1
  while t*(t+1)//2<=anssub:
    t+=1  
  ans+=t-1
if N!=1:
  ans=1
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
N2=N
p=int(N**(1/2))
ans=0
for i in range(2,p+5):
  anssub=0
  t=0
  while N2%i==0:
    N2=N2//i
    anssub+=1
  while t*(t+1)//2<=anssub:
    t+=1  
  ans+=t-1
if N2!=1:
  ans=1
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
N2=N
p=int(N**(1/2))
ans=0
for i in range(2,p+3):
  anssub=0
  t=0
  while N2%i==0:
    N2=N2//i
    anssub+=1
  while t*(t+1)//2<=anssub:
    t+=1  
  ans+=t-1
if N2!=1:
  ans=1
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
p=int(N**(1/2))
ans=0
for i in range(2,p+3):
  anssub=0
  t=0
  while N%i==0:
    N=N//i
    anssub+=1
  while t*(t+1)//2<=anssub:
    t+=1  
  ans+=t-1
if N!=1:
  ans=1
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
p=int(N**(1/2))
ans=0
for i in range(2,p+2):
  anssub=0
  t=0
  while N%i==0:
    N=N//i
    anssub+=1
  while t*(t+1)//2<=anssub:
    t+=1  
  ans+=t-1
if N!=1:
  ans=1
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
p=int(N**(1/2))
ans=0
for i in range(2,p+1):
  anssub=0
  t=0
  while N%i==0:
    N=N//i
    anssub+=1
  while t*(t+1)//2<=anssub:
    t+=1  
  ans+=t-1
if N!=1:
  ans=1
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
p=int(N**(1/2))
ans=0
for i in range(2,p+1):
  anssub=0
  t=0
  while N%i==0:
    N=N//i
    anssub+=1
  while t*(t+1)//2<=anssub:
    t+=1  
  ans+=t-1
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())

import math

def factorization(n): #nを素因数分解する
    arr = []
    temp = n
    for i in range(2, int(math.sqrt(n))+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([n, 1])  #n=1でarr=[1,1]としたいとき

    return arr

z=factorization(n)

ans=0
for i in range(len(z)):
    for j in range(1,z[i]):
        if (z[i]-j)>=0:
            z[i]-=j
            ans+=1
        else:
            break
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())

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]

nn=n
zz=[]
ans=0
while(n>1):
    z=make_divisors(n)
    for i in range(1,len(z)):
        if (z[i] in zz) == False:
            n=int(n/z[i])
            zz.append(z[i])
            break
    if(nn!=n):
        nn=n
        ans += 1
    else:
        break
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
import math
n = int(math.sqrt(N)) + 1
p = []
for i in range(2,n):
  if N % i == 0:
    a = 1
    while N % i == 0:
      N //= i
      a += 1
    p.append([i,a])
ans = 0
l = len(p)
for i in range(l):
  a = p[i][1]
  j = 1
  while a-j > 0:
    a -= j
    j += 1
    ans += 1
if N != 1 and ans == 0:
  ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:

count=1

a=int(input())

p=int(a**(1/2))

answer=0

while a!=1:
    count+=1
    if count<p:
        if a%count==0:
            time=1
            while a%(count**time)==0:
                time+=1
            time=time-1
            a=a/(count**time)
            time=time*2
            time=int(time**(1/2))
            answer=answer+time
            
    else:
        break
if a>1:
    answer+=1
print (answer)

Submission status: Wrong Answer

Solution code:
import math

def prime_factorize(n):
    num_list = []
    m = n
    for i in range(2,n):
        if m % i == 0 and i not in num_list:
            num_list.append(i)
            m //= i
            if m == 1:break
    return (num_list)

N = int(input())
print(len(prime_factorize(N)))

Submission status: Wrong Answer

Solution code:
import math

def prime_factorize(n):
    num_list = []
    m = n
    for i in range(2,int(math.sqrt(n)) + 1):
        if m % i == 0 and i not in num_list:
            num_list.append(i)
            m //= i
    return (num_list)

N = int(input())
print(len(prime_factorize(N)))

Submission status: Wrong Answer

Solution code:
import math

def prime_factorize(n):
    num_list = []
    for i in range(2,int(math.sqrt(n)) + 1):
        if n % i == 0 and i not in num_list:
            num_list.append(i)
            n //= i
    return (num_list)

N = int(input())
print(len(prime_factorize(N)))

Submission status: Wrong Answer

Solution code:
n = int(input())


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


fac = prime_factorize(n)

from collections import Counter

ctr = Counter(fac)

ans = 0
for val in ctr.values():
    cnt = 1
    while val > 0:
        ans += 1
        val -= cnt
        cnt += 1


print(ans)

Submission status: Wrong Answer

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

def get_prime(n):
    if n <= 1: return []
    prime = [2]
    limit = int(n**0.5)
    data = [i+1 for i in range(2,n,2)]
    while limit >= data[0]:
        prime.append(data[0])
        data = [j for j in data if j%data[0] != 0]
    return prime + data

P = get_prime(int(n**0.5))
cnt = 0
if n in P: print(1)
else:
    for p in P:
        if n%p != 0: continue
        e = 1
        while n%(p**e)==0:
            n //= p**e
            e += 1
            cnt += 1
    print(cnt)

Submission status: Wrong Answer

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

num = int(input())
maxnum = num
l = prime_factorize(num)
if(len(l)==0):
    print(1)
else:
    cnt = 0
    list=list(dict.fromkeys(l))
    for i in list:
        for n in range(maxnum):
            if(num%(i**(n+1))==0):
                num = num/(i**(n+1))
                cnt += 1
            else:
                break
    print(cnt)

Submission status: Wrong Answer

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

num = int(input())
maxnum = num
l = prime_factorize(num)
if(len(l)==0):
    print(1)
else:
    cnt = 0
    list=list(dict.fromkeys(l))
    for i in list:
        for n in range(maxnum):
            if(num%(i**(n+1))==0):
                num = int(num/(i**(n+1)))
                cnt += 1
            else:
                break
    print(cnt)

Submission status: Wrong Answer

Solution code:
#わかったこと　2~N**0.5まで素数関係なく調べればいい
n=int(input())
bunkai=[]

def different_value(e):
    cnt=0
    i=1
    while e-i>=0:
        e-=i
        i+=1
        cnt+=1
    return cnt

def soinsuu(x):
    for i in range(2,int((n+1)**0.5)+1):
        cnt=0
        while x%i==0:
            x//=i
            cnt+=1
        if cnt==0:
            continue
        bunkai.append([i,cnt])
    if bunkai==[]:
        bunkai.append([n,1])
soinsuu(n)

ans=0
for num,e in bunkai:
    ans+=different_value(e)
if n==1:
    ans=0
print(ans)

Submission status: Wrong Answer

Solution code:
#わかったこと　2~N**0.5まで素数関係なく調べればいい
n=int(input())
bunkai=[]

def different_value(e):
    cnt=0
    i=1
    while e-i>=0:
        e-=i
        i+=1
        cnt+=1
    return cnt

def soinsuu(x):
    for i in range(2,int((n+1)**0.5)+1):
        cnt=0
        while x%i==0:
            x//=i
            cnt+=1
        if cnt==0:
            continue
        bunkai.append([i,cnt])
    if bunkai==[]:
        bunkai.append([n,1])
soinsuu(n)

ans=0
for num,e in bunkai:
    ans+=different_value(e)
if n==1:
    ans=0
print(ans)
print(bunkai)

Submission status: Wrong Answer

Solution code:
#わかったこと　2~N**0.5まで素数関係なく調べればいい
n=int(input())
bunkai=[]

def different_value(e):
    cnt=0
    i=1
    while e-i>=0:
        e-=i
        i+=1
        cnt+=1
    return cnt

def soinsuu(x):
    for i in range(2,int((n)**0.5)+1):
        cnt=0
        while x%i==0:
            x//=i
            cnt+=1
        if cnt==0:
            continue
        bunkai.append([i,cnt])
    if bunkai==[]:
        bunkai.append([n,1])
soinsuu(n)

ans=0
for num,e in bunkai:
    ans+=different_value(e)
if n==1:
    ans=0
print(ans)

Submission status: Wrong Answer

Solution code:
#わかったこと　2~N**0.5まで素数関係なく調べればいい
n=int(input())
bunkai=[]

def different_value(e):
    cnt=0
    i=1
    while e-i>=0:
        e-=i
        i+=1
        cnt+=1
    return cnt

def soinsuu(x):
    for i in range(2,int((n)**0.5)+1):
        cnt=0
        while x%i==0:
            x//=i
            cnt+=1
        if cnt==0:
            continue
        bunkai.append([i,cnt])
    if bunkai==[]:
        bunkai.append([n,1])
soinsuu(n)

ans=0
for num,e in bunkai:
    ans+=different_value(e)
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

pn_list = [2]
count = 0

e = 1
while N%(2**e) == 0:
  N //= (2**e)
  count += 1
  e += 1
loop_stop = N

for n in range(3, N+1):
  pn_check = True
  for pn in pn_list:
    if n%pn == 0:
      pn_check = False
      break
      
  e = 1
  if pn_check:
    pn_list.append(n)
    while N%(n**e) == 0:
      N //= (n**e)
      count += 1
      e += 1
      loop_stop //= (n**e)
  if n >= loop_stop:
    print(count)
    exit()
    
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())

pn_list = [2]
count = 0

e = 1
while N%(2**e) == 0:
  N //= (2**e)
  count += 1
  e += 1
loop_stop = N

for n in range(3, N+1):
  pn_check = True
  for pn in pn_list:
    if n%pn == 0:
      pn_check = False
      break
      
  e = 1
  if pn_check:
    while N%(n**e) == 0:
      N //= (n**e)
      count += 1
      e += 1
      loop_stop //= (n**e)
  if n >= loop_stop:
    print(count)
    exit()
    
print(count)

Submission status: Wrong Answer

Solution code:
import math

n = int(input())

num, flag = 0, 0

for i in range(2, int(math.sqrt(n)//1+1)):
  for j in range(2, int(math.sqrt(i)//1+1)):
    if not i%j:
      flag = 1
      break
  if flag:
    flag = 0
    continue
  
  lnum = 0
  
  while not n%i:
  #if not n%i:
    num += 1
    lnum += 1
    k = i**lnum
    n /= k
    
print(num)

Submission status: Wrong Answer

Solution code:
import math

n = int(input())

num, flag = 0, 0

for i in range(2, int(math.sqrt(n)//1+1)):
  for j in range(2, int(math.sqrt(i)//1+1)):
    if not i%j:
      flag = 1
      break
  if flag:
    flag = 0
    continue
  
  lnum = 0
  
  while not n%i:
  #if not n%i:
    num += 1
    lnum += 1
    k = i**lnum
    n /= k
    print(k)
    
    
print(num)

Submission status: Wrong Answer

Solution code:
N = int(input())

pn_list = [2]
count = 0

e = 1
while N%(2**e) == 0:
  N //= (2**e)
  count += 1
  e += 1
loop_stop = N

for n in range(3, N+1):
  pn_check = True
  for pn in pn_list:
    if n%pn == 0:
      pn_check = False
      break
      
  e = 1
  if pn_check:
    while N%(pn**e) == 0:
      N //= (pn**e)
      count += 1
      e += 1
      loop_stop //= (pn**e)
  if n >= loop_stop:
    print(count)
    exit()
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

res = 0
if n <= 1:
	print(res)
else:
	max_num = math.ceil(math.sqrt(n + 1))
	org_n = n
	target_list = []
	for z in range(2, max_num + 1):
		if n % z == 0:
			z_p = 1
			z_count = 0
			while n % z == 0:
				z_p *= z
				n = n // z
				if z_p not in target_list:
					target_list.append(z_p)
					z_p = 1
		if n == z:
			break
	res = len(target_list)
	if n > max_num and n not in target_list:
		res += 1

	if org_n == n:
		res += 1
	print(res)

Submission status: Wrong Answer

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

res = 0
if n <= 1:
	print(res)
else:
	max_num = math.ceil(math.sqrt(n + 1))
	org_n = n
	for z in range(2, max_num + 1):
		if n % z == 0:
			z_p = 1
			z_count = 0
			z_list = []
			while n % z == 0:
				z_p *= z
				n = n // z
				if z_p not in z_list:
					z_list.append(z_p)
					z_p = 1
			res += len(z_list)
		if n == z:
			break
	if org_n == n:
		res += 1
	print(res)

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())
l=[]
for i in range(0,len(factorization(N))):
    l.append(factorization(N)[i][1])
l.sort(reverse=True)
s=0
t=1
while l[0]>0:
    for i in range(0,len(l)):
        if l[i]>=t:
            s += 1
        l[i]-=t
    t+=1
print(s)

Submission status: Wrong Answer

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

res = 0
if n <= 1:
	print(res)
else:
	max_num = math.ceil(math.sqrt(n + 1))
	org_n = n
	for z in range(2, max_num + 1):
		if n % z == 0:
			z_p = 1
			while n % z == 0:
				if n % z ** z_p == 0:
					res += 1
				n = n // z
				z_p += 1
		if n == z:
			break
	if org_n == n:
		res += 1
	print(res)

Submission status: Wrong Answer

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

res = 0
if n <= 1:
	print(res)
else:
	max_num = math.ceil(math.sqrt(n + 1))
	org_n = n
	for z in range(2, max_num + 1):
		if n == 1 or z >= math.ceil(math.sqrt(n)):
			res += 1
			break
		if n % z == 0:
			res += 1
			n = n // z
			if n == z:
				break
	print(res)

Submission status: Wrong Answer

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

res = 0
if n <= 1:
	print(res)
else:
	max_num = math.ceil(math.sqrt(n + 1))
	org_n = n
	for z in range(2, max_num + 1):
		if n == 1 or z > math.ceil(math.sqrt(n + 1)):
			res += 1
			break
		if n % z == 0:
			res += 1
			n = n // z
			if n == z:
				break
	if n == org_n:
		res += 1
	print(res)

Submission status: Wrong Answer

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

res = 0
if n <= 1:
	print(res)
else:
	max_num = int(math.sqrt(n + 1) + 1)
	org_n = n
	for z in range(2, max_num + 1):
		if n == 1 or z > math.sqrt(n):
			res += 1
			break
		if n % z == 0:
			res += 1
			n = n // z
			if n == z:
				break
	if n == org_n:
		res += 1
	print(res)

Submission status: Wrong Answer

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

res = 0
if n <= 1:
	print(res)
else:
	max_num = int(math.sqrt(n + 1))
	org_n = n
	for z in range(2, max_num + 1):
		if n == 1 or z > math.sqrt(n):
			res += 1
			break
		if n % z == 0:
			res += 1
			n = n // z
			if n == z:
				break
	if n == org_n:
		res += 1
	print(res)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
 
res = 0
if n <= 1:
	print(res)
else:
	max_num = int(math.sqrt(n + 1))
	org_n = n
	used_num_list = []
	for z in range(2, max_num + 1):
		# print(z, math.sqrt(n))
		if n == 1 or z >= math.sqrt(n):
			res += 1
			break
		if n % z == 0:
			# print(z, n, n//z)
			res += 1
			n = n // z
			if n == z:
				break
	if n == org_n:
		res += 1
	print(res)

Submission status: Wrong Answer

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

res = 0
if n <= 1:
	print(res)
else:
	max_num = math.ceil(math.sqrt(n + 1))
	org_n = n
	used_num_list = []
	for z in range(2, max_num + 1):
		if n == 1 or z > math.sqrt(n):
			res += 1
			break
		if n % z == 0:
			res += 1
			n = n // z
			if n == z:
				break
	if n == org_n:
		res += 1
	print(res)

Submission status: Wrong Answer

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

res = 0
if n <= 1:
	print(res)
else:
	max_num = math.ceil(math.sqrt(n))
	org_n = n
	used_num_list = []
	for z in range(2, max_num + 1):
		if n == 1 or z > math.sqrt(n):
			res += 1
			break
		if n % z == 0:
			res += 1
			n = n // z
			if n == z:
				break
	if n == org_n:
		res += 1
	print(res)

Submission status: Wrong Answer

Solution code:
import math

# 素数リスト生成　eratosthenes
def makePrime(m):
    p = [i for i in range(m + 1)]
    for i in p[3:]:
        if p[i] % 2 == 0: p[i] = 0

    root_m = m ** 0.5
    for i in range(3,m):
        if i > root_m: break
        if p[i] != 0:
            for j in range(i, m + 1, 2):
                if i * j >= m + 1: break
                p[i * j] = 0
    #return p
    return sorted(list(set(p)))[2:]


# 素数かどうか判定
def isPrime(x):
    if x <= 1:
        return False
    
    for i in range(2,math.floor(math.sqrt(x))+1):
        if (x % i) == 0:
            return False
    return True

# zの値を作成
def z_make(n,p):
    for prime in p:
        for i in range(1,100000000000):
            z = prime ** i
            
            if z >= n:
                break
            
            if not z in memo:
                memo.append(z)

def divGame2(n):
    for z in memo:
        global ans
        if n % z == 0:
            rem = n / z
            memo.remove(z)
            ans += 1
            #print("n=",n," z=",z,"rem=",rem," ans=",ans)
            return divGame2(rem)
        if n < z:
            break

memo = []  # memory
ans = 0    # answer
p = []     # Prime
p = makePrime(64000) #32000 87000でも、1898 msとぎりぎりのためこのコードはダメっぽい

n = int(input())

if isPrime(n): # 素数だったら１が答え
    print(1)
else:

    z_make(n,p)  # zの値を生成。memoができる
    memo.sort()  # 念のため並び替え

    divGame2(n)  # メイン実行
    print(ans)   # 答えの出力

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
l = int(math.sqrt(n))
ans = 0
  
insu = []
sisu = []
i = 2
while i <= l:
  if n % i == 0:
    if i in insu:
      sisu[insu.index(i)] += 1
    else:
      insu.append(i)
      sisu.append(1)
    n //= i
  else:
    i += 1
if n != 1:
  insu.append(n)
  sisu.append(1)
  
if not insu:
  if n == 1:
    print(0)
  else:
    print(1)
  exit()

for s in sisu:
  cnt = 1
  while cnt * (cnt + 1) / 2 <= s:
    ans += 1
    cnt += 1

print(insu)
print(sisu)
print(ans)