qyliang/CodeNanoFix huggingface dataset:
Buggy 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 = factorization(n)
dic = []
for i in range(len(l)):
    tmp = l[i][0]
    dic.append(tmp)
    while n >= tmp:
        tmp *= l[i][0]
        if n < tmp:
            break
        dic.append(tmp)
dic.sort()
cnt = 0
while n != 1:
    flag = True
    for i in range(len(dic)):
        if n%dic[i] == 0:
            n //= dic[i]
            cnt += 1
            dic.pop(i)
            flag = False
            break
    if flag:
        break
print(cnt)

Fixed 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())
if n == 1:
    print(0)
else:
    l = factorization(n)
    dic = []
    for i in range(len(l)):
        tmp = l[i][0]
        dic.append(tmp)
        while n >= tmp:
            tmp *= l[i][0]
            if n < tmp:
                break
            dic.append(tmp)
    dic.sort()
    cnt = 0
    while n != 1:
        flag = True
        for i in range(len(dic)):
            if n%dic[i] == 0:
                n //= dic[i]
                cnt += 1
                dic.pop(i)
                flag = False
                break
        if flag:
            break
    print(cnt)
Buggy code:
import collections
N = int(input())

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

def main():
    c = prime_factorize(N)
    if c == []:
        print(0)
        return
    else:
        coll = collections.Counter(c).values()
        ans = 0
        for i in coll:
            tmp = 0
            while i > 0:
                ans += 1
                tmp += 1
                i -= tmp
        print(ans)
        return

if __name__ == "__main__":
    main()

Fixed code:
import collections
N = int(input())

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

def main():
    c = prime_factorize(N)
    if c == []:
        print(0)
        return
    else:
        coll = collections.Counter(c).values()
        ans = 0
        for i in coll:
            tmp = 0
            while i > 0:
                if(tmp < i):
                    ans += 1
                    tmp += 1
                    i -= tmp
                else:
                    break
        print(ans)
        return

if __name__ == "__main__":
    main()
Buggy 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())
List=factorization(n) 
#print(List)
number=len(List)
ans=0
for i in range(number):
    for k in range(1,number+1):
        if (k<=List[i][1]):
            ans+=1
            List[i][1]-=k
        else:
            break
print(ans)

Fixed 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])
    if (n==1):
        arr=[]
    return arr

n=int(input())
List=factorization(n) 
#print(List)
number=len(List)
ans=0
for i in range(number):
    k=1
    while (k<=List[i][1]):
        ans+=1
        List[i][1]-=k
        #print(List[i][1])
        k+=1
print(ans)
Buggy code:
# coding: utf-8
# Your code here!
import sys
readline = sys.stdin.readline
read = sys.stdin.read

n, = map(int,input().split())

x = [0,1,3,6,10,15,21,28,36,45,55,66]

from bisect import bisect_left
ans = 0
N = 10**6
for i in range(2,N):
    r = 0
    while n%i==0:
        n//=i
        r += 1
    
    if r>0:
        ans += bisect_left(x,r)        
        
    
print(ans)        







Fixed code:
# coding: utf-8
# Your code here!
import sys
readline = sys.stdin.readline
read = sys.stdin.read

n, = map(int,input().split())

x = [0,1,3,6,10,15,21,28,36,45,55,66]

from bisect import bisect_right
ans = 0
N = 10**6
for i in range(2,N):
    r = 0
    while n%i==0:
        n//=i
        r += 1
        
    if r>0:
        ans += bisect_right(x,r)-1        
        #print(i,r,ans)

if n!=1:
    #print(n)
    ans += 1    
    
print(ans)
Buggy code:
import math
n=int(input())
def fac(n):
    arr=[]
    temp=n
    for i in range(2,math.ceil(math.sqrt(n)+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
l=fac(n)
ans=0
for i in range(len(l)):
    count=l[i][1]
    p=0
    k=1
    while count>0:
        if count-k<0:
            break
        p+=1
        count-=k
        k+=1
    ans+=p
print(ans)
        

        

Fixed code:
import math
n=int(input())
def fac(n):
    arr=[]
    temp=n
    for i in range(2,math.ceil(math.sqrt(n)+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
l=fac(n)
if n==1:
    print(0)
else:
    ans=0
    for i in range(len(l)):
        count=l[i][1]
        p=0
        k=1
        while count>0:
            if count-k<0:
                break
            p+=1
            count-=k
            k+=1
        ans+=p
    print(ans)
Buggy 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[i] = cnt

    if temp!=1:
        arr[temp]=1

    if arr==[]:
        arr[n] = 1

    return arr
count = 0
N = int(input())
arr = factorization(N) 
tmp = 0
for k,v in arr.items():
  while(v>1):

    v = v-tmp
    tmp += 1
    count += 1
  


print(count)



Fixed 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[i] = cnt

    if temp!=1:
        arr[temp]=1

    if arr==[]:
        arr[n] = 1

    return arr



N = int(input())
fac_dic = factorization(N) 
count = 0


for k,v in fac_dic.items():
  tmp = 1
  while(v >= tmp):
    v = v - tmp
    tmp += 1
    count += 1
  


print(count)
Buggy code:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
   
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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
    
a=factorization(n)
le=len(a)
cnt=0
b=0
for i in range(le):
	b=1
	while a[i][1]>=b: 
		a[i][1]-=b
		b+=1
		cnt+=1

print(cnt)

Fixed code:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
   
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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
    
a=factorization(n)
le=len(a)
cnt=0
b=0
for i in range(le):
	b=1
	while a[i][1]>=b: 
		a[i][1]-=b
		b+=1
		cnt+=1

if n==1:
	print(0)
else:
	print(cnt)
Buggy code:
def isPrime(x):
    if x==1:
        return False
    for i in range(2, int(x**0.5)+1):
        if x%i==0:
            return False
    return True

def primeFactorization2(x):
    ps = []
    es = []
    i=2
    upper = int(x**0.5)+1
    while i<upper:
        if x%i==0 and isPrime(i):
            ps.append(i)
            e=0
            while x%i==0:
                x = x//i
                e+=1
            es.append(e)
        i+=1
    return [ps, es]


n=int(input())
nums = primeFactorization2(n)[1]

ans=0
for i in nums:
    ans += int((-1+(1+8*i)**0.5)/2)
print(ans)
    
            
        
    
    
    


Fixed code:
def isPrime(x):
    if x==1:
        return False
    for i in range(2, int(x**0.5)+1):
        if x%i==0:
            return False
    return True

def primeFactorization2(x):
    ps = []
    es = []
    i=2
    k=x
    while i<=k**0.5:
        if k%i==0 and isPrime(i):
            ps.append(i)
            e=0
            while k%i==0:
                k = k//i
                e+=1
            es.append(e)
        i+=1
    if x==1:
        return [[],[]]
    elif isPrime(x):
        return [[x],[1]]
    else:
        return [ps + primeFactorization2(k)[0], es + primeFactorization2(k)[1]]


n=int(input())

if isPrime(n):
    print(1)
else:
    nums = primeFactorization2(n)[1]

    ans=0
    for i in nums:
        ans += int(((1+8*i)**0.5-1)/2)

    print(ans)
Buggy 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())
N = factorization(N)
count = 0
for i in range(0,len(N)):
    print(i)
    t = 0
    for j in range(1,N[i][1]+1):
        t += j
        if N[i][1] == t:
            count += j
            break
        elif N[i][1] < t:
            count += j-1
            break
        else:
            pass
print(count)

Fixed 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())
N = factorization(N)
count = 0

if N[0][0] == 1:
    print(0)
else:
    for i in range(0,len(N)):
        t = 0
        for j in range(1,N[i][1]+1):
            t += j
            if N[i][1] == t:
                count += j
                break
            elif N[i][1] < t:
                count += j-1
                break
            else:
                pass
    print(count)
Buggy code:
import sys
N = int(input())
C = {}
for i in range(2, max(3, int(N**(0.5))+1)):
    while(N % i == 0):
        N = N//i
        if i not in C:
            C[i] = 1
        else:
            C[i] += 1

if len(C) == 0:
    print(1)
    sys.exit()

ans = 0
for i in C.values():
    s = 1
    while(True):
        i -= s
        if i < 0:
            break
        ans += 1
        s += 1
print(ans)

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

C = {}
for i in range(2, max(10, int(N**(0.5))+1)):
    while(N % i == 0):
        N = N//i
        if i not in C:
            C[i] = 1
        else:
            C[i] += 1

if len(C) == 0:
    print(1)
    sys.exit()

ans = 0
for i in C.values():
    s = 1
    while(True):
        i -= s
        if i < 0:
            break
        ans += 1
        s += 1
if N == 1:
    print(ans)
else:
    print(ans+1)
Buggy code:
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

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

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

    return arr

n = int(input())

a = factorization(n)
#print(a)

ans = 0
for i in range(len(a)):
    check = 1
    while a[i][1] >= check:
        a[i][1] = a[i][1] - check
        ans = ans + 1
        check = check + 1

print(ans)

Fixed 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())
if n == 1:
    print(0)
    exit()

a = factorization(n)
#print(a)

ans = 0
for i in range(len(a)):
    check = 1
    while a[i][1] >= check:
        a[i][1] = a[i][1] - check
        ans = ans + 1
        check = check + 1

print(ans)
Buggy code:
from bisect import bisect_right

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 = factorization(N)
A = [i for i in range(1,101)]
for i in range(99):
    A[i+1] += A[i]

ans = 0
for _, l in L:
    ans += bisect_right(A,l)
print(ans)

Fixed code:
import sys
from bisect import bisect_right

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())

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

L = factorization(N)
A = [i for i in range(1,101)]
for i in range(99):
    A[i+1] += A[i]

ans = 0
for _, l in L:
    ans += bisect_right(A,l)
print(ans)
Buggy 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())
ans = factorization(N)
count = 0
for i in ans:
  for j in range(40):
    if i[1] < j*(j+1)/2:
      count += j-1
      break
print(count)

Fixed 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())
ans = factorization(N)
count = 0
for i in ans:
  if i[0] == 1:
    break
  for j in range(2,40):
    if i[1] < j*(j+1)/2:
      count += j-1
      break
print(count)
Buggy code:
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

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

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

    return arr

n = int(input())
a = factorization(n)
ans = 0
for i in a:
    t = i[1]
    b = 1
    while (b*(b+1))//2  <= t:
        b += 1
    ans += b-1
print(ans)

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

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

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

    return arr

n = int(input())
a = factorization(n)
ans = 0
for i in a:
    t = i[1]
    b = 1
    while (b*(b+1))//2  <= t:
        b += 1
    ans += b-1
if n==1:
    print(0)
    exit()
print(ans)
Buggy code:
from collections import Counter
n = int(input())
nmax = 10**6+10
eratos = [0 for i in range(nmax+1)]
prime = []
cnt = 2
while True:
  while cnt <= nmax and eratos[cnt]:
    cnt += 1
  if cnt > nmax:
    break
  eratos[cnt] = 1
  prime.append(cnt)
  for i in range(cnt**2,nmax+1,cnt):
    eratos[i] = 1
pr = []
while n > 1:
  for i in prime:
    while n%i == 0:
      n //= i
      pr.append(i)
c = Counter(pr)
ans = 0
for i in c.values():
  for j in range(10):
    if i < j*(j+1)//2:
      ans += j-1
      break
print(ans)

Fixed code:
from collections import Counter
n = int(input())
nmax = 10**6+10
eratos = [0 for i in range(nmax+1)]
prime = []
cnt = 2
while True:
  while cnt <= nmax and eratos[cnt]:
    cnt += 1
  if cnt > nmax:
    break
  eratos[cnt] = 1
  prime.append(cnt)
  for i in range(cnt**2,nmax+1,cnt):
    eratos[i] = 1
pr = []
for i in prime:
  while n%i == 0:
    n //= i
    pr.append(i)
if n > 1:
  pr.append(n)
c = Counter(pr)
ans = 0
for i in c.values():
  for j in range(10):
    if i < j*(j+1)//2:
      ans += j-1
      break
print(ans)
Buggy code:
def prime(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):
    print(0)
s=0

t=0
lista=prime(n)
aa=len(lista)
c=lista[0]
for i in lista:
    if (c==i):
        t+=1
    else:
        k=1
        while(t>=k):
            t-=k
            s+=1
            k+=1
        t=1
        c=i

if(t!=1):
    k=1
    while(t>=k):
        t-=k
        s+=1
        k+=1
    


        
    
    
    
    
    

print(s)
    
        
            
            
    
    


Fixed code:
def prime(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(""))
s=0
if(n!=1):
    

    

    t=0
    lista=prime(n)
    #print(lista)
    
    c=lista[0]
    for i in lista:
        if (c==i):
            t+=1
        else:
            k=1
            while(t>=k):
                t-=k
                s+=1
                k+=1
            t=1
            c=i


    k=1
    while(t>=k):
        t-=k
        s+=1
        k+=1
        


            
        
        
    
    


print(s)
Buggy code:
N = int(input())
ans = 0
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

for i, j in factorization(N):
    n= 1
    while 2*j >= n*(n+1):
        n += 1
        ans += 1
    
print(ans)

Fixed code:
import sys
N = int(input())
ans = 0
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

for i, j in factorization(N):
    if i == 1:
        print("0")
        sys.exit()
    n= 1
    while 2*j >= n*(n+1):
        n += 1
        ans += 1
    
print(ans)
Buggy code:
from math import floor,sqrt
N=int(input())

p = [1]*floor(sqrt(10**6))
p[0]=p[1]=0
prime=[]
for i in range(2,len(p)):
    if p[i]==0:
        continue
    prime.append(i)
    for j in range(i*2,len(p),i):
        p[j]=0

ans=0
for x in prime:
    cnt=0
    while N%x==0:
        cnt+=1
        N/=x
    ans+=floor((-1+sqrt(1+8*cnt))/2)
print(ans+int(N!=0))


Fixed code:
from math import floor,sqrt
N=int(input())

p = [1]*floor((10**6))
p[0]=p[1]=0
prime=[]
for i in range(2,len(p)):
    if p[i]==0:
        continue
    prime.append(i)
    for j in range(i*2,len(p),i):
        p[j]=0

ans=0
for x in prime:
    if N%x!=0:
        continue
    cnt=0
    while N%x==0:
        cnt+=1
        N//=x
    ans+=floor((-1+sqrt(1+8*cnt))/2)
print(ans+int(N!=1))
Buggy 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())
arr = factorization(N) 
cnt = 0

for key in arr:
    tmp = 1
    val = key[1]
    while val > 0:
        if val - tmp > tmp:
            val -= tmp
            tmp += 1
            cnt += 1
        else:
            val = 0
            cnt += 1
        
print(cnt)

Fixed 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())
if N == 1:
    print(0)
else:
    arr = factorization(N) 
    cnt = 0
    for key in arr:
        tmp = 1
        val = key[1]
        while val > 0:
            if val - tmp > tmp:
                val -= tmp
                tmp += 1
                cnt += 1
            else:
                val = 0
                cnt += 1
            
    print(cnt)
Buggy code:
N = int(input())

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


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

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

Fixed code:
N = int(input())

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


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

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