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 heapq
import math
n = int(input())

element = int(math.sqrt(n))
prime = [True]*(element+1)
for k in range(2, element+1):
    if prime[k]:
        prime[k*k:element+1:k] = [False]*(len(prime[k*k:element+1:k]))


ans = 0
option = [[k, k, 1] for k in range(2, element+1) if prime[k] and n%k == 0]
if not option:
    print(int(n>1))
else:
    heapq.heapify(option)
    while n>1 and option:
        val, p, time = heapq.heappop(option)
        #print(n, ans, val, option)
        if val*p <= n:
            heapq.heappush(option, [val*p, p, time+1])
        if n % val == 0:
            ans += 1
            n //= val
    print(ans)

Submission status: Wrong Answer

Solution code:
import math
def check(n):
    count = 0
    end = int(math.sqrt(n)+1)
    for i in range(2,end):
        if n%i==0:
            count += 1
            n/=i
        if n%i==0:
            l = 2
            count2 = 0
            while n%i==0:
                n/=i
                count2+=1
                if count2==l:
                    count+=1
                    count2=0
                    l+=1
    if n==1:
        return 0
    if count==0:
        return 1
    else:
        return count   
n = int(input())
ans = check(n)
print(ans)

Submission status: Wrong Answer

Solution code:
import sys 
input = sys.stdin.readline
n = int(input())
m = int(n**0.5)

# def factorization(n):
#     temp = n
#     total = 0
#     p = 2
#     flag = False
#     while p <= m:
#         if temp % p == 0:
#             z = p
#             flag = True
#             while temp % z == 0:
#                 temp //= z
#                 #print(z, temp, total)
#                 z *= p
#                 total += 1     
#         p += 1
#         if p == m and flag:
#             if temp > 1:
#                 total -= 1
#     if temp != 1:
#         total += 1
#     return total
def prime_factorize(n):
    temp = n
    f = 2
    z = f
    total = 0
    while n % z == 0:
        #a.append(f)
        n //= z
        total += 1
        z *= f
    f = 3
    while f * f <= n:
        z = f
        while n % z == 0:
            #a.append(z)
            n //= z
            total += 1
            z *= f
        
        f += 2
    if n > temp ** 0.5:
        #a.append(n)
        total += 1
    return total

def main():
    if n == 1:
        ans = 0
    else:
        ans = prime_factorize(n)
    print(ans)
    
main()

Submission status: Wrong Answer

Solution code:
import math
def check(n):
    count = 0
    end = int(math.sqrt(n)+1)
    for i in range(2,end):
        if n%i==0:
            count += 1
            n/=i
        if n%i==0:
            l = 2
            count2 = 0
            while n%i==0:
                n/=i
                count2+=1
                if count2==l:
                    count+=1
                    count2=0
                    l+=1
        if n==1:
            return count
    if n==1:
        return 0
    if count==0:
        return 1
    else:
        return count   
n = int(input())
ans = check(n)
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
C=[]
n=[i for i in range(50)]
n[0]=1
for i in range(49):
    n[i+1]+=(n[i]+1)
for i in range(2,int(N**0.5)+1):
    if N%i==0:
        while N%i==0:
            C.append(i)
            N//=i
D=set(C)
E=[]
for d in D:
    E.append(C.count(d))
res=0
for e in E:
    for i in range(50):
            if n[i]<=e<n[i+1]:
                res+=i+1
                break
print(1 if N>1 else res)

Submission status: Wrong Answer

Solution code:
n = int(input())
t = []
for i in range(2,int(-(-n**0.5//1))+1):
    if(n%i == 0):
        cmp = 0
        while(n%i == 0):
            cmp += 1
            n //= i
        t.append([i,cmp])
    if(n == 1):
        break
if(n != 1):
    z = 1
z = -len(t)
for i in range(len(t)):
    j = 1
    while(t[i][1] >= 0):
        t[i][1] -= j
        j += 1
        z += 1
print(z)

Submission status: Wrong Answer

Solution code:
def check(n):
    count = 0
    end = int(n**0.5+1)
    for i in range(2,end):
        if n%i==0:
            count += 1
            n/=i
        if n%i==0:
            l = 2
            count2 = 0
            while n%i==0:
                n/=i
                count2+=1
                if count2==l:
                    count+=1
                    count2=0
                    l+=1
        if n==1:
            return count
    if n==1:
        return 0
    if count==0:
        return 1
    else:
        return count   
n = int(input())
ans = check(n)
print(ans)

Submission status: Wrong Answer

Solution code:
def check(n):
    count = 0
    end = int(n**0.5+1)
    for i in range(2,end):
        if n%i==0:
            count += 1
            n/=i
        if n%i==0:
            l = 2
            count2 = 0
            while n%i==0:
                n/=i
                count2+=1
                if count2==l:
                    count+=1
                    count2=0
                    l+=1
        if n==1:
            return count
    if count==0:
        return 1
    else:
        return count   
n = int(input())
ans = check(n)
print(ans)

Submission status: Wrong Answer

Solution code:
import collections
import math

n = int(input())
B = [1,3,6,10,15,21,28,36,45,55,66,78,91,105]
ans = 0

def is_prime(n):
    if n == 1: return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False
    return True
if is_prime(n) == True:
  print(1)
  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))  
print(c)
for v in c.values():
  for j in range(len(B)):
    if v < B[j]:
      ans += j
      break
    print(ans)

print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
C=[]
n=[i for i in range(50)]
n[0]=1
for i in range(49):
    n[i+1]+=(n[i]+1)
for i in range(2,int(N**0.5)+1):
    if N%i==0:
        while N%i==0:
            C.append(i)
            N//=i
D=set(C)
E=[]
for d in D:
    E.append(C.count(d))
res=0
for e in E:
    for i in range(50):
            if e<n[i]:
                res+=i
                break
print(1 if N>1 else res)

Submission status: Wrong Answer

Solution code:
from collections import Counter
n = int(input())
tmp = n
d = []
for i in range(2, int(n ** 0.5) + 1):
    if tmp % i == 0:
        while tmp % i == 0:
            d.append(i)
            tmp //= i

if len(d) == 0:
    if n != 1:
        d.append(n)

dv = Counter(d)

cnt = 0
for p in dv.keys():
    for e in range(1, dv[p]+1):
        z = p ** e
        if n % z == 0:
            cnt += 1
            n //= z

print(cnt)

Submission status: Wrong Answer

Solution code:
N=int(input())
C=[]
n=[i for i in range(50)]
n[0]=1
for i in range(40):
    n[i+1]+=(n[i]+1)
for i in range(2,int(N**0.5)+1):
    if N%i==0:
        while N%i==0:
            C.append(i)
            N//=i
D=set(C)
E=[]
for d in D:
    E.append(C.count(d))
res=0
for e in E:
    for i in range(50):
            if e<n[i]:
                res+=i
                break
print(1 if N>1 else res)

Submission status: Wrong Answer

Solution code:
import sys 
input = sys.stdin.readline
n = int(input())
m = int(n**0.5)

def factorization(n):
    temp = n
    total = 0
    p = 2
    flag = False
    while p <= m:
        if temp % p == 0:
            z = p
            flag = True
            while temp % z == 0:
                temp //= z
                #print(z, temp, total)
                z *= p
                total += 1     
        p += 1
        if p == m and flag:
            if temp > 1:
                total -= 1
    if temp != 1:
        total += 1
    return total


def main():
    if n == 1:
        ans = 0
    else:
        ans = factorization(n)
    print(ans)
    
main()

Submission status: Wrong Answer

Solution code:
from math import sqrt


def factorization(n):
    factors = []
    temp = n
    for i in range(2, int(sqrt(n))+1):
        if temp % i == 0:
            count = 0
            while temp % i == 0:
                count += 1
                temp //= i
            factors.append((i, count))
    if not factors:
        factors.append((n, 1))

    return factors


N = int(input())
factors = factorization(N)
count = 0
for a, b in factors:
    c = 0
    while 2*c+1 <= b:
        c += c + 1
        count += 1

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

Submission status: Wrong Answer

Solution code:
import collections
import math

n = int(input())
B = [1,3,6,10,15,21,28,36,45,55,67,80]
ans = 0

def is_prime(n):
    if n == 1: return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False
    return True
if is_prime(n) == True:
  print(1)
  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))  

for v in c.values():
  for j in range(len(B)):
    if v < B[j]:
      ans += j+1
      break

print(ans)

Submission status: Wrong Answer

Solution code:
from collections import Counter


def bunkai(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


import math


def trial_division(n):
    factor = []
    tmp = int(math.sqrt(n)) + 1
    for num in range(2,tmp):
        while n % num == 0:
            n //= num
            factor.append(num)
    if not factor:
        return [n]
    else:
        factor.append(n)
        return factor


n = int(input())
if n == 1:
    print(0)
    exit()
#res = bunkai(n)
res = trial_division(n)
if len(res) == 1:
    print(1)
    exit()
c = Counter(res)
values, counts = zip(*c.most_common())
values = list(values)
ans = 0
for v in values:
    k = c[v]
    for i in range(1, 1000):
        if k == 0:
            break
        if k - i == i:
            k -= 2 * i
        else:
            k -= i
        ans += 1
print(ans - 1)

Submission status: Wrong Answer

Solution code:
import sys 
input = sys.stdin.readline
n = int(input())
m = int(n**0.5)

def factorization(n):
    temp = n
    total = 0
    p = 2
    flag = False
    while p <= m:
        if temp % p == 0:
            flag = True
            z = p
            while temp % z == 0:
                temp //= z
                z *= p
                total += 1        
        p += 1
    return total

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

def main():
    if n >= 2 and is_prime(n):
        ans = 1
    elif n == 1:
        ans = 0
    else:
        ans = factorization(n)
    print(ans)
    
main()

Submission status: Wrong Answer

Solution code:
import collections
import math

n = int(input())
B = [1,3,6,10,15,21,28,36,45,55,67,80]
ans = 0

def is_prime(n):
    if n == 1: return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False
    return True
if is_prime(n) == True:
  print(1)
  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))  
print(c)
for v in c.values():
  for j in range(len(B)):
    if v < B[j]:
      ans += j+1
      break

print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
NN = N
i = 2
ans = 0
while i*i <= NN:
  if N%i==0:
    j = 0
    while N%i==0:
      N /= i
      j+=1
    k = 1
    while j>0:
      if j - k < 0: break
      ans += 1
#      print(i,ans,j,k)
      j -= k
      k += 1
  i += 1
if NN == N and N != 1:
  ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
C=[0]*(10**6+1)
n=[i for i in range(50)]
n[0]=1
for i in range(40):
    n[i+1]+=(n[i]+1)
for i in range(2,int(N**0.5)+1):
    if N%i==0:
        while N%i==0:
            C[i]+=1
            N//=i
res=0
for c in C:
    if c>0:
        for i in range(50):
            if c<n[i]:
                res+=i
                break
print(1 if N>1 else res)

Submission status: Wrong Answer

Solution code:
import collections
import math

n = int(input())
B = [1,3,6,10,15,21,28,36,45,55,67,80]
ans = 0

def is_prime(n):
    if n == 1: return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False
    return True
if is_prime(n) == True:
  print(1)
  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))  
print(c)
for v in c.values():
  for j in range(len(B)):
    if v < B[j]:
      ans += j
      break

print(ans)

Submission status: Wrong Answer

Solution code:
import collections
import math

n = int(input())
B = [1,3,6,10,15,21,28,36,45,55,67,80]
ans = 0

def is_prime(n):
    if n == 1: return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False
    return True
if is_prime(n) == True:
  print(1)
  exit()

Submission status: Wrong Answer

Solution code:
n = int(input())
d = 2
ans = 0

while d ** 2 <= n:
    if n % d != 0:
        d += 1
        continue
    z = d
    while n % z == 0:
        n //= z
        z *= d
        ans += 1

if n != 1:
    ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
C=[0]*10**6
n=[i for i in range(41)]
n[0]=1
for i in range(40):
    n[i+1]+=(n[i]+1)
for i in range(2,int(N**0.5)+1):
    if N%i==0:
        while N%i==0:
            C[i]+=1
            N//=i
res=0
for c in C:
    if c>0:
        for i in range(41):
            if c<n[i]:
                res+=i
                break
print(1 if N>1 else res)

Submission status: Wrong Answer

Solution code:
import collections
import math

n = int(input())
B = [1,2,6,10,15,21,28,36,45,55,67,80]
ans = 0

def is_prime(n):
    if n == 1: return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False
    return True
if is_prime(n) == True:
  print(1)
  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))  

for v in c.values():
  for j in range(len(B)):
    if v < B[j]:
      ans += j+1
      break

print(ans)

Submission status: Wrong Answer

Solution code:
import collections
import math

n = int(input())
B = [1,2,6,10,15,21,28,36,45,55,67,80]
ans = 0

def is_prime(n):
    if n == 1: return False

    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return False
    return True
if is_prime(n) == True:
  print(1)
  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))  

for v in c.values():
  for j in range(len(B)):
    if v <=B[j]:
      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==[]:
        arr.append([n, 1])

    return arr


n = int(input())
cnt = 0
z_list = []
f = factorization(n)
if n == 1:
    print(0)
    exit()
elif n > 0:
    for fact in f:
        for j in range(1, fact[1]+1):
            z = fact[0] ** j
            if str(z) not in z_list:
                if n % z == 0:
                    n = n // z
                    cnt += 1
                    z_list += str(z)
print(cnt)

Submission status: Wrong Answer

Solution code:
from collections import Counter
 
def factorize(n):
    a = 2
    fct = []
    while a <= n:
        print('-------')
        while n % a == 0:
            n = n // a
            fct.append(a)
        a += 1
    if n > 1:
        fct.append(n)
    return fct
 
 
n = int(input())
c = Counter(factorize(n))
# print(factorize(n))
# print(c.values())


ans = 0
for v in c.values():
    t = 1
    while v >= t:
        v -= t
        t += 1
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())

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

z=factorization(N)
cnt=0
for i in range(len(z)):
    for j in range(1,z[i][1]):
        if N!=1:
            N=N//z[i][0]**j
            cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
prime_list = []

for i in range(2, int(math.sqrt(n)) + 1):
    if n % i == 0:
        prime_list.append(i)
        n /= i
        index = 2
        counter = 0
        while 1:
            if n % i == 0:
                counter += 1
                n /= i
                if(counter == index):
                    prime_list.append(i ** index)
                    index += 1
                    counter = 0
            else:
                break
if len(prime_list) > 0:
    print(len(prime_list))
elif n == 1:
    print(0)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
#d
import math
from collections import deque


n = int(input())
a = []
ans = 0
d = 2
for i in range(2,int(math.sqrt(n)+1)):
    
    if n%i==0:
        a.append(i)
        n/=i
ans = len(a)
if ans == 0 and n >1:
    ans = 1
print(ans)

Submission status: Wrong Answer

Solution code:
import copy
def calc(max, numbers):
    n = max
    ns = {n: False for n in numbers}
    count = 0
    ns_copy = copy.deepcopy(ns)
    for p in ns_copy:
        # print(p)
        if n % p == 0:
            n = n//p
            # print("n", n, "z", p)
            count += 1
            if n == 1:
                return count

            # base_number = p
            ruijo = 2

            loop = 2
            num =  p * loop
            while num < max:
                if num == p ** ruijo:
                    ruijo += 1
                    ns
                elif num in ns:
                    if not ns[num]:
                        ns.pop(num)
                loop += 1
                num =  p * loop
            # print(ns)
                

n = int(input())
if n == 1:
    print(0)
else:
    numbers = [n for n in range(2, n+1)]
    result = calc(n, numbers)

    print(result)

Submission status: Wrong Answer

Solution code:
n = int(input())
c = set()


def getsmallestValue(n):
    if n == 1:
        return -1
    lim = int(n ** 0.5)
    f = False
    for i in range(2, lim+1):
        if n % i == 0:
            if i not in c:
                c.add(i)
                f = True
                break
    return i if f else n if n not in c else -1


ans = 0
while True:
    z = getsmallestValue(n)
    if z == -1:
        break
    ans += 1
    n //= z


print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

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

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

    return arr

fact_N = factorization(N)
#fact_N = np.array(fact_N)
#num_sosuu = fact_N[:,1]

num_sosuu = []
for row in fact_N:
    num_sosuu.append(row[1])

#num_sosuu_max = num_sosuu.max()
num_sosuu_max = max(num_sosuu)

ans = 0
for i in range(len(num_sosuu)):
    num_i = num_sosuu[i]
#    for j in range(np.uint64(np.sqrt(2*num_sosuu_max))):
#    for j in range(int((2*num_sosuu_max)**0.5)):
    j = 0
    judge = True
    while judge:
        if num_i >= j+1:
            ans += 1
            num_i -= j+1
            j+=1
        else:
#            break
            judge = False

print(str(ans))

Submission status: Wrong Answer

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

A_list = []
End_Point = math.sqrt(N) + 1
i = 2
ans = 0
while True:
    if N % i == 0:
        N /= i
        ans += 1
        End_Point = math.sqrt(N) + 1
        A_list.append(i)
    # print(N)
    # print(End_Point)
    if i > End_Point:
        if N != 1:
            CHECK = "OK"
            for j in A_list:
                if N == j:
                    CHECK = "NG"
            if CHECK == "OK":
                ans += 1
        break
    i += 1
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

fact_N = factorization(N)
#fact_N = np.array(fact_N)
#num_sosuu = fact_N[:,1]

num_sosuu = []
for row in fact_N:
    num_sosuu.append(row[1])

#num_sosuu_max = num_sosuu.max()
num_sosuu_max = max(num_sosuu)

ans = 0
for i in range(len(num_sosuu)):
    num_i = num_sosuu[i]
#    for j in range(np.uint64(np.sqrt(2*num_sosuu_max))):
#    for j in range(int((2*num_sosuu_max)**0.5)):
    j = 0
    judge = True
    while judge:
        if num_i >= j+1:
            ans += 1
            num_i -= j+1
            j+=1
        else:
#            break
            judge = False

print(str(ans))

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
prime_list = []

def is_not_prime(n):
    if n == 1: return 1
    for k in range(2, int(math.sqrt(n)) + 1):
        if n % k == 0:
            return 1
    return 0

for i in range(2, int(math.sqrt(n)) + 1):
    if is_not_prime(i):
        continue
    if n % i == 0:
        prime_list.append(i)
        n /= i
        index = 2
        counter = 0
        while 1:
            if n % i == 0:
                counter += 1
                if(counter == index):
                    prime_list.append(i ** index)
                    n /= (i ** index)
                    index += 1
                    counter = 0
            else:
                break
if len(prime_list) > 0:
    print(len(prime_list))
elif n == 1:
    print(0)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
import math
from sys import exit

n=int(input())
primes = {}
i = 2
ans = 0
square = math.floor(math.sqrt(n))

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

while True:
    if i > square:
        break
    if n % i == 0:
        if i not in primes.keys():
            primes[i] = 1
        else:
            primes[i] += 1
        n = n // i
    else:
        if i == 2:
            i += 1
        else:
            i += 2
        continue

# 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

# primes = factorization(n)
if len(primes) == 0:
    print(1)
    exit()

for k,v in primes.items():
    base = v * 2
    root = math.floor(math.sqrt(base))
    if root * (root + 1) > base:
        root -= 1
    ans += root

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

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

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

    return arr

st = factorization(n)


count = 0
temp = 1

for a,b in st:

    while 1/2*(temp)*(temp +1) <= b:
        temp += 1
    count += temp-1
    temp = 1

print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
import math
import numpy as np
t = []
b = n

for i in range(int(math.sqrt(n))):
    if b >= i+2:
        if b % (i + 2) == 0:
            t.append(0)
            while b % (i + 2) == 0:
                t[-1] += 1
                b /= (i+2)
    # print('a')
ans = 0
# print(t)
# exit()

tt = t

for i in range(len(t)):
    count = 1
    while t[i] >= count:
        ans += 1
        t[i] = t[i] - count
        count += 1

# for i in range(len(t)):
#     count = 1
#     while t[i]

if n != 1 and ans == 0:
    print('1')
    exit()
# print(t)
print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import collections
# factrize
def factorize(target_number):
    factor = 2
    factor_list = []
    while factor * factor <= target_number:
        while target_number % factor == 0:
            target_number //= factor
            factor_list.append(factor)
        factor = factor + 2
    if target_number > 1:
        factor_list.append(target_number)
    return factor_list

N = int(input())

fact_list = factorize(N)

fact_counter_dict = collections.Counter(fact_list)
ans = 0
for fact, freq in fact_counter_dict.items():
    freq_copy = freq
    for i in range(1, freq + 1):
        freq_copy -= i
        if freq_copy < 0:
            break
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
import math
from sys import exit

n=int(input())
primes = {}
i = 2
ans = 0
square = math.floor(math.sqrt(n))

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

# while True:
#     if n == 1 or i > square:
#         break
#     if n % i == 0:
#         if i not in primes.keys():
#             primes[i] = 1
#         else:
#             primes[i] += 1
#         n = n // i
#     else:
#         if i == 2:
#             i += 1
#         else:
#             i += 2
#         continue

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

primes = factorization(n)
if len(primes) == 0:
    print(1)
    exit()

for k,v in primes:
    base = v * 2
    root = math.floor(math.sqrt(base))
    if root * (root + 1) > base:
        root -= 1
    ans += root

print(primes)
print(ans)

Submission status: Wrong Answer

Solution code:
import math
n = int(input())
prime_list = []

for i in range(2, int(math.sqrt(n)) + 1):
    if n % i == 0:
        prime_list.append(i)
        n /= i
        index = 2
        counter = 0
        while 1:
            if n % i == 0:
                counter += 1
                if(counter == index):
                    prime_list.append(i ** index)
                    n /= (i ** index)
                    index += 1
                    counter = 0
            else:
                break
if len(prime_list) > 0:
    print(len(prime_list))
elif n == 1:
    print(0)
else:
    print(1)

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
n=int(input())
if n==1:
    ans=0
else:
    a=prime_factorize(n)
    if a==[]:
        ans=1
    else:
        ans=0
        xzen=a[0]
        count=1
        ans+=1
        for x in range(1,len(a)):
            if xzen==a[x]:
                count+=1
                if count==3 or count==6 or count==10 or count==15 or count==21 or count==28 or count==35:
                    ans+=1
            else:
                xzen=a[x]
                count=1
                ans+=1
print(ans)