qyliang/CodeNanoFix huggingface dataset:
Buggy 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

l=factorization(n)
cnt=0

for num,i in l:
    p=1
    while i>0:
        cnt+=1
        i-=p
        p+=1
        if i<p:
            break
print(cnt)


Fixed 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

l=factorization(n)
cnt=0

if n==1:
    print(0)
else:
    for num,i in l:
        p=1
        while i>0:
            cnt+=1
            i-=p
            p+=1
            if i<p:
                break
    print(cnt)
Buggy code:
def get_prime_fact(n):
    primes = []
    append = primes.append
    while n % 2 == 0:
        append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        append(n)
    return primes


def get_knu(a):
    n = 2
    while True:
        knum = (n * (n + 1)) // 2
        if a >= knum:
            n += 1
        else:
            return n - 1


D = int(input())
p = get_prime_fact(D)

if len(p) != len(set(p)):
    res = 0
    for n in set(p):
        count = p.count(n)
        if count == 1:
            res += 1
        else:
            add = get_knu(count)
            res += add

            print(n, add)

    print(res)
else:
    print(len(p))

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


def get_knu(a):
    before = 1
    n = 2
    while True:
        knum = (n * (n + 1)) // 2
        if a == knum:
            return n
        elif knum > a > before:
            return n - 1
        else:
            n += 1
            before = knum


D = int(input())
p = get_prime_fact(D)

if len(p) != len(set(p)):
    res = 0
    for n in set(p):
        count = p.count(n)
        if count == 1:
            res += 1
        else:
            add = get_knu(count)
            res += add

    print(res)
else:
    print(len(p))
Buggy code:
n=int(input())
from  collections import defaultdict

def prime_factorize(n):
    d=defaultdict(int) 
    while n % 2 == 0:
        d[2]+=1
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            d[f]+=1
            n //= f
        else:
            f += 2
    if n != 1:
        d[n]+=1
    return d

u=prime_factorize(n) 
cnt=0
for key,value in u.items():
    r=10**12
    l=0 
    while r-l>1:
        mid=(r+l)//2
        if mid*(mid+1)//2>=value:
            r=mid 
        else:
            l=mid
    cnt+=r
print(cnt)

Fixed code:
from  collections import defaultdict

n=int(input())

def prime_factorize(n):
    d=defaultdict(int) 
    while n % 2 == 0:
        d[2]+=1
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            d[f]+=1
            n //= f
        else:
            f += 2
    if n != 1:
        d[n]+=1
    return d

u=prime_factorize(n) 
cnt=0
for key,value in u.items():
    r=10**12
    l=0 
    while r-l>1:
        mid=(r+l)//2
        if mid*(mid+1)//2<=value:
            l=mid 
        else:
            r=mid
    cnt+=l
print(cnt)
Buggy 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


def q4():
    N = int(input())
    arr = prime_factorize(N)

    ans_count = 0
    count = 1
    min_val = min(arr)
    while arr:
        if arr.count(min_val) < count:
            arr = list(filter(lambda a: a != min_val, arr))
            count = 1
            if not arr:
                break
            min_val = min(arr)
            continue
        arr = arr[count:]
        ans_count += 1
        count += 1
    print(ans_count)


q4()

Fixed 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


def q4():
    N = int(input())
    arr = prime_factorize(N)
    if not arr:
        print(0)
        return

    ans_count = 0
    count = 1

    min_val = min(arr)
    while arr:
        if arr.count(min_val) < count:
            arr = list(filter(lambda a: a != min_val, arr))
            count = 1
            if not arr:
                break
            min_val = min(arr)
            continue
        arr = arr[count:]
        ans_count += 1
        count += 1
    print(ans_count)


q4()
Buggy code:
import numpy as np
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(cnt)

    if temp!=1:
        arr.append(1)

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

    return arr

b = factorization(int(input()))
count = 0
for i in b:
    j = 1
    while(1):
        i -= j
        if i<0:
            break
        else:
            count += 1
            j += 1
print(count)

Fixed code:
import numpy as np
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(cnt)

    if temp!=1:
        arr.append(1)

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

    return arr
N = int(input())
if N == 1:
    print(0)
else:
    b = factorization(N)
    count = 0
    for i in b:
        j = 1
        while(1):
            i -= j
            if i<0:
                break
            else:
                count += 1
                j += 1
    print(count)
Buggy code:
n=int(input())

ans =0
for i in range(2,int(n**0.5)+5):
    cnt = 0
    while n%i==0:
        n//=i
        cnt += 1
        s=0
    while cnt:
        s +=1
        cnt -= s
        ans += 1
if n!=1:ans+=1
print(ans)

Fixed code:
n=int(input())

ans =0
for i in range(2,int(n**0.5)+5):
    cnt = 0
    while n%i==0:
        n//=i
        cnt += 1
    s=1
    while cnt-s>=0:
        cnt -= s
        s +=1
        ans += 1
if n!=1:ans+=1
print(ans)
Buggy code:
n = int(input())
a = []
b = []
if True:
    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)
kosuu = 1
mae = a[0]
for i in range(1,len(a)):
    if mae == a[i]:
        kosuu += 1
    else:
        mae = a[i]
        b.append(kosuu)
        kosuu = 1
b.append(kosuu)
ans = 0
for i in range(len(b)):
    for j in range(2,100):
        if b[i] < j*(j+1)//2:
            ans += j-1
            break
print(ans)

Fixed code:
n = int(input())
a = []
b = []
if n == 1:
    print(0)
    exit()
if True:
    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)
kosuu = 1
mae = a[0]
for i in range(1,len(a)):
    if mae == a[i]:
        kosuu += 1
    else:
        mae = a[i]
        b.append(kosuu)
        kosuu = 1
b.append(kosuu)
ans = 0
for i in range(len(b)):
    for j in range(2,100):
        if b[i] < j*(j+1)//2:
            ans += j-1
            break
print(ans)
Buggy code:
import bisect as bi
def fact(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=[i*(i+1)//2 for i in range(1,100)]
c=0
for t in fact(n):
  c+=bi.bisect_right(l,t[1])
print(c)

Fixed code:
import bisect as bi
def fact(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()
l=[i*(i+1)//2 for i in range(1,100)]
c=0
for t in fact(n):
  c+=bi.bisect_right(l,t[1])
print(c)
Buggy code:
n = int(input())
if n == 1:
  print(0)
  exit()

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

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

x = make_divisors(n)[1:]
if len(x)==1:
  print(n)
  exit()

cnt = 0
numbers = []
for a in x:
  if a == "": continue
  if a in numbers:
    if n%a==0: 
      n //= a
      cnt += 1
  if is_prime(a):
    n //= a
    b = 2
    cnt += 1
    while n%(a**b)==0:
      numbers.append(a**b)
      b += 1
print(cnt)

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

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

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

x = make_divisors(n)[1:]
if len(x) == 1:
    print(1)
    exit()

cnt = 0
numbers = []
for a in x:
    if is_prime(a):
        n //= a
        e = 2
        cnt += 1
        while n%(a**e)==0:
            numbers.append(a**e)
            e += 1
    if a in numbers:
        if n%a == 0:
            n //= a
            cnt += 1
print(cnt)
Buggy code:
import math

N = int(input())

fact = set()
counter = 0

for i in range(2, int(math.sqrt(N))+1):
    if N % i != 0:
        continue
    powt = 0
    while N % i == 0:
        powt += 1
        N /= i
    fact.add((i, powt))

if N != 1:
    fact.add((N, 1))

for base, e in fact:
    for t in range(1, e+1):
        if t <= e:
            e -= t
            counter += 1
print(fact)
print(counter)


Fixed code:
import math

N = int(input())

fact = set()
counter = 0

for i in range(2, int(math.sqrt(N))+1):
    if N % i != 0:
        continue
    powt = 0
    while N % i == 0:
        powt += 1
        N /= i
    fact.add((i, powt))

if N != 1:
    fact.add((N, 1))

for base, e in fact:
    for t in range(1, e+1):
        if t <= e:
            e -= t
            counter += 1
print(counter)
Buggy code:
n = int(input())
if n == 1:
  print(0)
  exit()

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

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

x = make_divisors(n)[1:]
if len(x)==1:
  print(n)
  exit()

cnt = 0
for a in x:
  if a == "": continue
  if is_prime(a):
    b = 1
    while n%(a**b)==0:
      n //= a**b
      x[x.index(a**b)] = ""
      cnt += 1
      b += 1
print(cnt)

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

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

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

x = make_divisors(n)[1:]
if len(x)==1:
  print(1)
  exit()

cnt = 0
numbers = []
for a in x:
  if is_prime(a):
    n //= a
    b = 2
    cnt += 1
    while n%(a**b)==0:
      numbers.append(a**b)
      b += 1
  if a in numbers:
    if n%a==0: 
      n //= a
      cnt += 1
print(cnt)
Buggy code:
n = int(input())

def prime(n_):
    if n_ == 1:
        return []
    num = int(pow(n_, 0.5)) + 1
    pr = [True] * (num + 1)
    pr[0], pr[1] = False, False
    for i in range(2, int(pow(num, 0.5) + 1)):
        if not pr[i]:
            continue
        for j in range(i * 2, num + 1, i):
            pr[j] = False
    return [i for i in range(num + 1) if pr[i]]

def factorization(num):
    pr = prime(num)
    data = []
    temp = num
    for i in pr:
        if temp % i == 0:
            count = 0
            while temp % i == 0:
                count += 1
                temp //= i
            data.append([i, count])
    if temp != 1:
        data.append([temp, 1])
    if data == []:
        data.append([n, 1])
    return data

def main():
    ans = 0
    pr = factorization(n)
    for i, j in pr:
        count = 1
        sub = j
        while sub >= count:
            ans += 1
            sub -= count
            count += 1
    print(ans)


if __name__ == "__main__":
    main()

Fixed code:
n = int(input())

def prime(n_):
    if n_ == 1:
        return []
    num = int(pow(n_, 0.5)) + 1
    pr = [True] * (num + 1)
    pr[0], pr[1] = False, False
    for i in range(2, int(pow(num, 0.5) + 1)):
        if not pr[i]:
            continue
        for j in range(i * 2, num + 1, i):
            pr[j] = False
    return [i for i in range(num + 1) if pr[i]]

def factorization(num):
    pr = prime(num)
    data = []
    temp = num
    for i in pr:
        if temp % i == 0:
            count = 0
            while temp % i == 0:
                count += 1
                temp //= i
            data.append([i, count])
    if temp != 1:
        data.append([temp, 1])
    if data == []:
        data.append([n, 1])
    return data

def main():
    ans = 0
    pr = factorization(n)
    for i, j in pr:
        count = 1
        sub = j
        while sub >= count:
            ans += 1
            sub -= count
            count += 1
    if n == 1:
        ans = 0
    print(ans)


if __name__ == "__main__":
    main()
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())
a = prime(N)
a.sort()
import copy
b = copy.copy(a)
b = list(set(b))
b.sort()

ret = 0
for i in b:
    cnt = 0
    idx=1
    while True:
        if a.count(i) > cnt:
            cnt = cnt + idx
            idx += 1
            ret += 1
        else:
            break

print(ret)

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())
a = prime(N)
a.sort()
import copy
b = copy.copy(a)
b = list(set(b))
b.sort()

ret = 0
for i in b:
    cnt = 0
    idx=0
    while True:
        idx += 1
        cnt = cnt + idx
        if a.count(i) >= cnt:
            ret += 1
        else:
            break

print(ret)
Buggy code:
n=int(input())
a={}
temp=n
for i in range(2,int(n**0.5)+1):
    if temp % i ==0:
        count=0
        while temp % (i**(count+1)) ==0:
            count+=1
        temp= temp/(i**count)
        a[i]=count

sum=0
for i in a:
    jisu= a[i]
    temp=1
    while temp*(temp+1)/2<= jisu:
            temp+=1
    sum+= temp-1

print(sum)

Fixed code:
n=int(input())
a={}
temp=n
for i in range(2,int(n**0.5)+1):
    if temp % i ==0:
        count=0
        while temp % (i**(count+1)) ==0:
            count+=1
        temp= temp/(i**count)
        a[i]=count
if temp !=1:
    a[temp]=1

sum=0
for i in a:
  jisu= a[i]
  temp=1
  while temp*(temp+1)/2<= jisu:
          temp+=1
  sum+= temp-1
print(sum)
Buggy 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



fac = factorization(n)
ans = 0
if n == 1:
    print(0)
else:
    for i in fac:
        tem = 1
        while tem*(tem+1)/2 < i[1]:
            tem += 1
        ans += tem

    print(ans)

Fixed 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



fac = factorization(n)
ans = 0
if n == 1:
    print(0)
else:
    for i in fac:
        tem = 1
        while tem*(tem+1)//2 < i[1]:
            if i[1] >= (tem+1)*(tem+2)//2:
                tem += 1
            else:
                break
        ans += tem

    print(ans)
Buggy code:
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

n = ni()

res = []
x = n
y = 2
while y*y <= x:
    while x % y == 0:
        res.append(y)
        x //= y
    y += 1
if x > 1:
    res.append(x)

from collections import Counter
import bisect

c = Counter(res)

tt = []
i = 1
for _ in range(40):
    i *= 2
    tt.append(i-1)

ans = 0
for v in c.values():
    ans += bisect.bisect_right(tt,v)

print(ans)

Fixed code:
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

n = ni()

res = []
x = n
y = 2
while y*y <= x:
    while x % y == 0:
        res.append(y)
        x //= y
    y += 1
if x > 1:
    res.append(x)

from collections import Counter
import bisect

c = Counter(res)

tt = [i for i in range(1,60)]
for j in range(1,len(tt)):
    tt[j] += tt[j-1]

ans = 0
for v in c.values():
    ans += bisect.bisect_right(tt,v)

print(ans)
Buggy code:
import heapq
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


f = factorization(n)
l = []
for i in f:
    for j in range(1, i[1]+1):
        l.append(i[0]**j)

heapq.heapify(l)

cnt = 0
while l:
    tmp = heapq.heappop(l)
    if n % tmp == 0:
        n = n // tmp
        cnt += 1
print(cnt)

Fixed code:
import heapq
n = int(input())
copy = n


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


f = factorization(n)
l = []
for i in f:
    for j in range(1, i[1]+1):
        l.append(i[0]**j)

heapq.heapify(l)

cnt = 0
while l:
    tmp = heapq.heappop(l)
    if n % tmp == 0:
        n = n // tmp
        cnt += 1
print(cnt if copy != 1 else 0)
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 range(len(A)):
    for j in range(1,A[i][1]+1):
        if N % A[i][0]**j == 0:
            ans += 1
            N //= A[i][0]**j
        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])

    return arr

import sys
N = int(input())
if N == 1:
    print(0)
    sys.exit()
A = factorization(N)
ans = 0
for i in range(len(A)):
    for j in range(1,A[i][1]+1):
        if N % A[i][0]**j == 0:
            ans += 1
            N //= A[i][0]**j
        else:
            break

print(ans)
Buggy 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)

Fixed 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
    while N % x == 0:
        N //= x

if N > 1:
    ans += 1
print(ans)
Buggy 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)

Fixed 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)
if d[0][0] == 1:
    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)