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:
from functools import lru_cache
N = int(input())

@lru_cache(maxsize=None)
def isprime(x):
    i = 2
    while i * i <= x:
        if x % i == 0:
            return False
        i += 1
    return True

def divs(x):
    i = 1
    while i * i <= x:
        if x % i == 0:
            yield i
            ii = N // i
            if ii != i:
                yield ii
        i += 1

prime_cache = [2, 3]

def primeiter():
    global prime_cache
    for p in prime_cache:
        yield p
    x = prime_cache[-1] + 1
    while True:
        if isprime(x):
            prime_cache.append(x)
            yield x
        x += 1

done = set()
while True:
    for d in sorted(divs(N)):
        if d in done or d == 1:
            continue
        if isprime(d):
            N //= d
            done.add(d)
            break
        else:
            for p in primeiter():
                if d < p:
                    break
                while p < d:
                    p *= p
                if p == d:
                    N //= d
                    done.add(d)
                    break
    else:
        break
print(len(done))

Submission status: Wrong Answer

Solution code:
from functools import lru_cache
N = int(input())

@lru_cache(maxsize=None)
def isprime(x):
    i = 2
    while i * i <= x:
        if x % i == 0:
            return False
        i += 1
    return True

def divs(x):
    i = 1
    while i * i <= x:
        if x % i == 0:
            yield i
            ii = N // i
            if ii != i:
                yield ii
        i += 1

prime_cache = [2, 3]

def primeiter():
    global prime_cache
    for p in prime_cache:
        yield p
    x = prime_cache[-1] + 1
    while True:
        if isprime(x):
            prime_cache.append(x)
            yield x
        x += 1

done = set()
while True:
    for d in sorted(divs(N)):
        if d in done or d == 1:
            continue
        if isprime(d):
            N //= d
            done.add(d)
            break
        else:
            for p in primeiter():
                if d < p * p:
                    break
                while p < d:
                    p *= p
                if p == d:
                    N //= d
                    done.add(d)
                    break
    else:
        break
print(len(done))

Submission status: Wrong Answer

Solution code:
import math
 
N = int(input())
N1 = N
use_li = [0]*(math.ceil(math.sqrt(N))+1)
c = 0
while N!=1:
  for i in range(2,math.ceil(math.sqrt(N))+1):
    if(N%i==0 and use_li[i]==0):
      #print(i)
      use_li[i] = 1
      N //= i
      c += 1
      break
  #print(N,i,math.ceil(math.sqrt(N)))  
  if (i==math.ceil(math.sqrt(N))):
    if((len(use_li)<=N or use_li[N] == 0) and N==N1):
      c += 1
    break
  N1 = N
      
print(c)

Submission status: Wrong Answer

Solution code:
import math
 
N = int(input())
N1 = N
use_li = [0]*(math.ceil(math.sqrt(N))+1)
c = 0
while N!=1:
  for i in range(2,math.ceil(math.sqrt(N))+1):
    if(N%i==0 and use_li[i]==0):
      #print(i)
      use_li[i] = 1
      N //= i
      c += 1
      break
  #print(N,i,math.ceil(math.sqrt(N)))  
  if (i==math.ceil(math.sqrt(N))):
    if((len(use_li)<=N or use_li[N] == 0) and N==N1):
      c += 1
    break
      
print(c)

Submission status: Wrong Answer

Solution code:
from collections import Counter
import sys
import math
N = int(input())
M = N
Nso = []
Nruto = math.sqrt(N)
Nruto = math.ceil(Nruto)
for i in range(2, Nruto+1):
    while N % i == 0:
        N = N//i
        Nso.append(i)
    if N == 1:
        break
    Nruto = math.sqrt(N)
    Nruto = math.floor(Nruto)
if len(Nso) == 0:
    if M == 1:
        print(0)
    else:
        print(1)
    sys.exit()

ans = 0
Nso = Counter(Nso)
for i in Nso.values():
    x = 0
    for j in range(1, i+1):
        if x+j <= i:
            x += j
            ans += 1
        else:
            break
print(ans)

Submission status: Wrong Answer

Solution code:
from collections import Counter
import sys
import math
N = int(input())
M = N
Nso = []
Nruto = math.sqrt(N)
Nruto = math.floor(Nruto)
for i in range(2, Nruto+1):
    while N % i == 0:
        N = N//i
        Nso.append(i)
    if N == 1:
        break
    Nruto = math.sqrt(N)
    Nruto = math.floor(Nruto)
if len(Nso) == 0:
    if M == 1:
        print(0)
    else:
        print(1)
    sys.exit()

ans = 0
Nso = Counter(Nso)
for i in Nso.values():
    x = 0
    for j in range(1, i+1):
        if x+j <= i:
            x += j
            ans += 1
        else:
            break
print(ans)

Submission status: Wrong Answer

Solution code:
from collections import Counter
import sys
import math
N = int(input())
M = N
Nso = []
Nruto = math.sqrt(N)
Nruto = math.floor(Nruto)
for i in range(2, Nruto+1):
    while N % i == 0:
        N = N//i
        Nso.append(i)
    if N == 1:
        break
    Nruto = math.sqrt(N)
    Nruto = math.floor(Nruto)
if len(Nso) == 0:
    if M == 1:
        print(0)
    else:
        print(1)
    sys.exit()

ans = 0
Nso = Counter(Nso)
for i in Nso.values():
    x = math.sqrt(2*i)
    x = math.floor(x)
    for j in range(x, 0, -1):
        if j*j+j <= 2*i:
            ans += j
            break
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==[]: #1の場合はここ
        arr.append([n, 1])
 
    return arr

def count(X):
  cnt = 0
  now = 1
  while cnt+now <=X:
    cnt += now
    now += 1
  return now-1
#print(count(3))    

N = int(input())
A = factorization(N)
#print(A)
ans = 0
for i in range(len(A)):
  ans += count(A[i][1])
print(ans)

Submission status: Wrong Answer

Solution code:
import itertools

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

#factorization(24) 

## [[2, 3], [3, 1]] 
##  24 = 2^3 * 3^1


t=int(input())
if t==1:
  print(1)
  exit()
  
ans=0
x=factorization(t)


z=[i for i in range(51)]
z=list(itertools.accumulate(z))

for i in range(len(x)):
    cnt=x[i][1]
    for j in range(len(z)):
        if z[j]>cnt:
            ans+=j-1
            break

print(ans)

Submission status: Wrong Answer

Solution code:
import itertools

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

#factorization(24) 

## [[2, 3], [3, 1]] 
##  24 = 2^3 * 3^1


t=int(input())
ans=0
x=factorization(t)


z=[i for i in range(51)]
z=list(itertools.accumulate(z))

for i in range(len(x)):
    cnt=x[i][1]
    for j in range(len(z)):
        if z[j]>cnt:
            ans+=j-1
            break

print(ans)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
import bisect

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

N=int(input())

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

do=[0 for i in range(10**6+1)]

for i in range(2,int(N**0.5)+1):
    while N%i==0:
        N/=i
        do[i]+=1

ans=0
judge=True

for _,item in enumerate(do):
    index=(bisect.bisect_right(line,item))-1
    ans+=index
    if index!=0:
        judge=False

print(ans+1 if judge else ans)

Submission status: Wrong Answer

Solution code:
from math import sqrt


def eratosthenes(x):
    prime = []
    for i in range(2, int(sqrt(x)) + 1):
        if x % i == 0:
            prime.append(i)
            while x % i == 0:
                x //= i
    
    return prime


N = int(input())
prime = eratosthenes(N)
ans = 0
for x in prime:
    i = 1
    while N % x**i == 0:
        ans += 1
        N /= x**i
        i += 1

print(ans)

Submission status: Wrong Answer

Solution code:
from math import sqrt


def eratosthenes(x):
    prime = []
    for i in range(2, int(sqrt(x)) + 1):
        if x % i == 0:
            prime.append(i)
            while x % i == 0:
                x //= 2
    
    return prime


N = int(input())
prime = eratosthenes(N)
ans = 0
for x in prime:
    i = 1
    while N % x**i == 0:
        ans += 1
        N //= x**i
        i += 1

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

def factorize(n):
    result = []
    tmp = n

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

def nearest_sum(n):
    num_list = [1]
    
    if n == 1:
        return 1

    i = 2
    while True:
        num_list.append(num_list[-1]+i)
        i += 1
        if num_list[-1]+i > n:
            break
    
    return i-1

if N == 1:
    print(0)
else:
    ind_list = factorize(N)

    cnt = 0
    for ind in ind_list:
        cnt += nearest_sum(ind)

    print(cnt)

Submission status: Wrong Answer

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

def factorization(num):
    arr = []
    temp = num
    for i in range(2, int(num**0.5)+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([num, 1])

    return arr

x = factorization(n)
ans = 0
print(x)
for i in range(len(x)):
  x[i][1] -= 1
  ans += 1
  y = 2
  while x[i][1] > 0:
    x[i][1] -= y
    if x[i][1] >= 0:
      ans += 1
    y += 1
 
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
if n == 1:
    print(0)
    exit()
    
def factorization(num):
    arr = []
    temp = num
    for i in range(2, int(num**0.5)+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([num, 1])

    return arr

x = factorization(n)
ans = 0

for i in range(len(x)):
    if x[i][1]%2 == 0:
        ans += x[i][1]//2
    else:
        ans += x[i][1]//2 + 1        
print(ans)

Submission status: Wrong Answer

Solution code:
import math

N = int(input())

use_li = [0]*(math.ceil(math.sqrt(N))+1)
c = 0
while N!=1:
  for i in range(2,math.ceil(math.sqrt(N))+1):
    if(N%i==0 and use_li[i]==0):
      #print(i)
      use_li[i] = 1
      N //= i
      c += 1
      break
      
  if (i==math.ceil(math.sqrt(N))):
    if(len(use_li)<N or use_li[N] == 0):
      c += 1
    break
      
print(c)

Submission status: Wrong Answer

Solution code:
import math

N = int(input())

use_li = [0]*(math.ceil(math.sqrt(N))+1)
c = 0
while N!=1:
  for i in range(2,math.ceil(math.sqrt(N))+1):
    if(N%i==0 and use_li[i]==0):
      #print(i)
      use_li[i] = 1
      N //= i
      c += 1
      break
      
  if (i==math.ceil(math.sqrt(N))):
    if(len(use_li)<N or use_li[i] == 0):
      c += 1
    break
      
print(c)

Submission status: Wrong Answer

Solution code:
import math

N = int(input())

use_li = [0]*(math.ceil(math.sqrt(N))+1)
c = 0
while N!=1:
  for i in range(2,math.ceil(math.sqrt(N))+1):
    if(N%i==0 and use_li[i]==0):
      #print(i)
      use_li[i] = 1
      N //= i
      c += 1
      break
  if (i==math.ceil(math.sqrt(N))):
    if(len(use_li)<N or use_li[i] == 1):
      c += 1
    break
      
print(c)

Submission status: Wrong Answer

Solution code:
ini = lambda : int(input())
inm = lambda : map(int,input().split())
inl = lambda : list(map(int,input().split()))
gcd = lambda x,y : gcd(y,x%y) if x%y else y
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

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

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

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

    divisors.sort()
    return divisors

n = ini()
d = factorization(n)
ans = 0
for i in range(len(d)):
    j = 1
    while d[i][1] >= j:
        d[i][1] -= j
        j += 1
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
ini = lambda : int(input())
inm = lambda : map(int,input().split())
inl = lambda : list(map(int,input().split()))
gcd = lambda x,y : gcd(y,x%y) if x%y else y
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

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

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

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

    divisors.sort()
    return divisors

n = ini()
d = factorization(n)
print(d)
ans = 0
for i in range(len(d)):
    j = 1
    while d[i][1] >= j:
        d[i][1] -= j
        j += 1
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
ini = lambda : int(input())
inm = lambda : map(int,input().split())
inl = lambda : list(map(int,input().split()))
gcd = lambda x,y : gcd(y,x%y) if x%y else y

n = ini()
lim = n
cnt = 0

div = []
for i in range(1,int(n**0.5)+1):
        if n % i == 0:
                div.append(i)
                if i != n//i:
                        div.append(n//i)
div.sort()
div = div[1:]
for i in div:
        j = 1
        while n % (i**j) == 0:
                n = n//(i**j)
                j += 1
                cnt += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
ini = lambda : int(input())
inm = lambda : map(int,input().split())
inl = lambda : list(map(int,input().split()))
gcd = lambda x,y : gcd(y,x%y) if x%y else y

n = ini()
lim = n
i = 2
j = 1
cnt = 0
while lim >= i*i:
        if n%(i**j) != 0:
                i += 1
                j = 1
                continue
        n = n/(i**j)
        cnt += 1
        j += 1
print(cnt)

Submission status: Wrong Answer

Solution code:
ini = lambda : int(input())
inm = lambda : map(int,input().split())
inl = lambda : list(map(int,input().split()))
gcd = lambda x,y : gcd(y,x%y) if x%y else y

n = ini()
lim = n
i = 2
j = 1
cnt = 0
while lim >= i*i:
        if n%(i**j) != 0:
                i += 1
                j = 1
                continue
        n = n/(i**j)
        cnt += 1
        j += 1
if lim != 1 and cnt == 0:
        cnt += 1
print(cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())

fact={}
i = 2
while n != 1:
    if n % i == 0:
        n = n/i
        if i in fact:
            fact[i] += 1
        else:
            fact[i] = 1
    else:
        i += 1
    if i > (n**(1/2)+1):
        fact[n] =1
        break

#print(fact)
if fact == {}:
    print(0)
else:
    ans = 0
    for v in fact.values():
        #print(v)
        for i in range(1,v+1):
            if v - i >= 0:
                ans +=1
                v = v-i
    print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

fact={}
i = 2
while n != 1:
    if n % i == 0:
        n = n/i
        if i in fact:
            fact[i] += 1
        else:
            fact[i] = 1
    else:
        i += 1
    if i > (n**(1/2)+1):
        fact[n] =1
        break

print(fact)
if fact == {}:
    print(0)
else:
    ans = 0
    for v in fact.values():
        #print(v)
        for i in range(1,v+1):
            if v - i >= 0:
                ans +=1
                v = v-i
    print(ans)

Submission status: Wrong Answer

Solution code:
import math

# 篩を実装
def prime_list():
  x=10**6
  flags=[True for i in range(x//2)]
  flags[0] = False
  sqrt=int(math.sqrt(x))+1
  sqrt_xi = sqrt // 2
  for i in range(1,sqrt_xi):
    if (not flags[i]):
      continue
    p=2*i+1
    m = 2*i*(i+1)
    while m<len(flags):
      flags[m] = False
      m += p
  
  s=[2]
  for i in range(len(flags)):
    if flags[i]:
      s.append(i*2+1)
  return s

# Nが素数の場合、最低でも1回操作ができる。
def isPrime(num):
  if (num < 2) or (num % 2 == 0):
    return False
  elif num == 2:
    return True
  sqrt = int(math.sqrt(num))
  for i in range(3,sqrt+1,2):
    if (num % i == 0):
      return False
  return True

def main(n):
  import time
  
  primes=prime_list()
  check_list = [False for i in range(10**6+1)]
  for p in primes:
    pp=p
    while pp <= 10**6:
      check_list[pp]=True
      pp*=p
  
  cnt=0
  for i,v in enumerate(check_list):
    if v and n%i == 0:
      n//=i
      cnt+=1
  
  if cnt==0 and isPrime(n):
    cnt=1
  print(cnt)

n=int(input())
main(n)

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())
Insuu = factorization(N)
#print(Insuu)
count = 0
for div in Insuu:
    num = div[1]
    i = 1
    while num >= 0:
        if num - i >= 0:
            num = num - i
            count += 1
            i += 1
        else:
            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())
Insuu = factorization(N)
#print(Insuu)
count = 0
for div in Insuu:
    num = div[1]
    i = 1
    while num >= 0:
        if num - i >= 0:
            num = num - 1
            count += 1
            i += 1
        else:
            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())
Insuu = factorization(N)
#print(Insuu)
count = 0
for div in Insuu:
    num = div[1]
    i = 1
    while True:
        num = num - i
        if num < 0:
            count += (i-1)
            break
        if num == 0:
            count += i
            break
        i += 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())
Insuu = factorization(N)
#print(Insuu)
count = 0
for div in Insuu:
    num = div[1]
    i = 1
    while i < 10000000000:
        num = num - i
        if num < 0:
            count += (i-1)
            break
        if num == 0:
            count += i
            break
        i += 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())
Insuu = factorization(N)
#print(Insuu)
count = 0
for div in Insuu:
    num = div[1]
    i = 1
    while i < 10000:
        num = num - i
        if num < 0:
            count += (i-1)
            break
        if num == 0:
            count += i
            break
        i += 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())
Insuu = factorization(N)#
print(Insuu)
count = 0
for div in Insuu:
    num = div[1]
    i = 1
    while i < 10000:
        num = num - i
        if num < 0:
            count += (i-1)
            break
        if num == 0:
            count += i
            break
        i += 1
print(count)

Submission status: Wrong Answer

Solution code:
no= n = int(input())

c=0
for i in range(2,int(n**0.5+1)):
    if n<i :
        break
    for j in range(0,10000): 
        if n%(i)==0 :
            n=n//i
            #print(i**j)
        else:
            break
    for k in range(1,1000) :
        if j>=k :
            c+=1
            j-=k
        else:
            break


if c==0 and no!=1 :
    c = 1

print(c)

Submission status: Wrong Answer

Solution code:
no= n = int(input())

c=0
for i in range(2,int(n**0.5+1)):
    if n<i :
        break
    for j in range(1,10000): 
        if n%(i**j)==0 :
            c+=1
            n=n//(i**j)
            # print(i)
        else:
            break
if c==0 and no!=1 :
    c = 1

print(c)

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

candidates = factorization(N)
# print(candidates)
li = []

for item in candidates:

    for i in range(item[1]):
        li.append(item[0]**(i+1))

li.sort()
# print(li)

cnt = 0
for i in range(len(li)):
    if N % li[i] == 0:
        N /= li[i]
        cnt += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())


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

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

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

    return arr

candidates = factorization(N)
#print(candidates)
li = []

for item in candidates:

    for i in range(item[1]):
        li.append(item[0]**(i+1))

li.sort()
#print(li)

i = 0
while N > 1:

    N /= li[i]
    i += 1

print(i)

Submission status: Wrong Answer

Solution code:
a=int(input())
d=0
for i in range(2,int(a**0.5)+1):
    c=0
    while a%i==0:
        c+=1
        a//=i
    for i in range(1,60):
        if c>=i:
            c-=i
            d+=1
        else:
            break
    if a==1:
        break
print(d)

Submission status: Wrong Answer

Solution code:
ans=0
n=int(input())
for i in range(2,int(pow(n,0.5))+1):
  if n%i==0:
    ans+=1
    while n%i==0:
      n=n//i
if n!=1:
  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
def f(n):
  for i in range(50,-1,-1):
    if n>=(i*(i+1)//2):
      return i
      break
n=int(input())
cnt=0
alist=factorization(n)
for i in range(len(alist)):
  cnt+=f(alist[i][1])
print(cnt)

Submission status: Wrong Answer

Solution code:
import collections
import math
N=int(input())
if N==1:
    print(0)
    exit()
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 = collections.Counter(prime_factorize(N)) 
s=list(set(prime_factorize(N)))
ans=0
for i in s:
    x=c[i]
    ans+=math.ceil(x/2)
print(ans)

Submission status: Wrong Answer

Solution code:
import logging
logging.basicConfig(level=logging.DEBUG, format=' %(asctime)s - %(levelname)s - %(message)s')
#logging.debug("デバッグスタート")  #

n = int(input())
a = []
b = 1
while n % 2**b == 0:
    a.append(2**b)
    n /= 2**b
#    logging.debug("n = {},b = {}".format(n,2 ** b))  #
    b += 1

while n % 2 == 0:
    n /= 2

f = 3
b = 1
while f * f <= n:
    if n % f**b == 0:
        a.append(f**b)
        n /= f**b
        b += 1
    else:
        f += 2
        b = 1
#    logging.debug("n = {},f = {},f**b = {}".format(n, f, f**b))  #
if n != 1:
    a.append(n)

#print(a)
print(len(set(a)))
#logging.debug("デバッグ終了")#

Submission status: Wrong Answer

Solution code:
import logging
logging.basicConfig(level=logging.DEBUG, format=' %(asctime)s - %(levelname)s - %(message)s')
#logging.debug("デバッグスタート")  #

n = int(input())
a = []
b = 1
while n % 2**b == 0:
    a.append(2**b)
    n //= 2**b
#    logging.debug("n = {},b = {}".format(n,2 ** b))  #
    b += 1

while n % 2 == 0:
    n //= 2
    
f = 3
b = 1
while f**b * f**b <= n:
    if n % f**b == 0:
        a.append(f**b)
        n //= f**b
        b += 1
    else:
        f += 2
        b = 1
#    logging.debug("n = {},f = {},f**b = {}".format(n, f, f**b))  #
if n != 1:
    a.append(n)

#print(a)
print(len(set(a)))
#logging.debug("デバッグ終了")#

Submission status: Wrong Answer

Solution code:
import logging
logging.basicConfig(level=logging.DEBUG, format=' %(asctime)s - %(levelname)s - %(message)s')
#logging.debug("デバッグスタート")  #

n = int(input())
a = []
b = 1
while n % 2**b == 0:
    a.append(2**b)
    n //= 2**b
#    logging.debug("n = {},b = {}".format(n,2 ** b))  #
    b += 1

f = 3
b = 1
while f**b * f**b <= n:
    if n % f**b == 0:
        a.append(f**b)
        n //= f**b
        b += 1
    else:
        f += 2
        b = 1
#    logging.debug("n = {},f = {},f**b = {}".format(n, f, f**b))  #
if n != 1:
    a.append(n)

#print(a)
print(len(set(a)))
#logging.debug("デバッグ終了")#

Submission status: Wrong Answer

Solution code:
import math

N = int(input())

A_max = int(math.sqrt(N) + 1)
A = list(range(2, A_max + 1))

prime_check = [0] * (A_max + 1)


def func(x):
    i = 1
    result = 0
    N_buf = N
    while True:
        if N_buf % (x ** i) != 0:
            break
        result = i
        N_buf = N / (x ** i)
        i += 1
    return result


ans = 0

for a in A:
    if prime_check[a] == 0:
        ans += func(a)
        i = 2
        while a * i <= A_max:
            prime_check[a*i] = 1
            i += 1

if ans == 0:
    if N != 1:
        ans = 1

print(ans)

Submission status: Wrong Answer

Solution code:
import math

N = int(input())

A_max = int(math.sqrt(N) + 1)
A = list(range(2, A_max))

prime_check = [0] * (A_max + 1)


def func(x):
    i = 1
    result = 0
    N_buf = N
    while True:
        if N_buf % (x ** i) != 0:
            break
        result = i
        N_buf = N / (x ** i)
        i += 1
    return result


ans = 0

for a in A:
    if prime_check[a] == 0:
        ans += func(a)
        i = 2
        while a * i <= A_max:
            prime_check[a*i] = 1
            i += 1

if ans == 0:
    if N != 1:
        ans = 1

print(ans)

Submission status: Wrong Answer

Solution code:
import math

N = int(input())

A_max = int(math.sqrt(N) + 0.5)
A = list(range(2, A_max))

prime_check = [0] * (A_max + 1)


def func(x):
    i = 1
    result = 0
    N_buf = N
    while True:
        if N_buf % (x ** i) != 0:
            break
        result = i
        N_buf = N / (x ** i)
        i += 1
    return result


ans = 0

for a in A:
    if prime_check[a] == 0:
        ans += func(a)
        i = 2
        while a * i <= A_max:
            prime_check[a*i] = 1
            i += 1

if ans == 0:
    if N != 1:
        ans = 1

print(ans)

Submission status: Wrong Answer

Solution code:
# ABC169 D

import math


def factorization(n):
    """
    素因数分解した結果を[(要素, 数)]のリストで返す
    """
    arr = []
    temp = n
    for i in range(2, int(math.ceil(n ** 0.5))):
        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())

fact_li = factorization(n)

res = 0
for _, num in fact_li:
    temp_num = 1
    while temp_num <= num:
        res += 1
        num -= temp_num
        temp_num += 1

print(res)