qyliang/CodeNanoFix huggingface dataset:
Buggy code:
# Import
from collections import deque

# I/O
def read(): return input()
def read_int(): return int(input())
def read_array(type=int): return list(map(type, input().split()))
def read_tupple(type=None):
    tmp = input().split()
    if type is None: return map(int, tmp)
    assert len(tmp) == len(type)
    return [type[i](tmp[i]) for i in range(len(tmp))]

# Implementation
class PrimeNumber:
    def __init__(self, N):
        self.N = N
        self.compute()

    def compute(self):
        isP, P = [True] * N+1, []
        for i in range(2,N+1):
            if isP[i]:
                P.append(i)
                for j in range(2*i,N+1,i):
                    isP[j] = False
        self.isP, self.P = isP, P

N = read_int()

pn = PrimeNumber(1000006)
ans = 0
for p in pn.P:
    cnt = 0
    while N % p == 0:
        N /= p
        cnt += 1
    dec = 1
    while cnt >= dec:
        cnt -= dec
        dec += 1
        ans += 1
if N > 1:
    ans += 1
print(ans)

Fixed code:
# Import
from collections import deque

# I/O
def read(): return input()
def read_int(): return int(input())
def read_array(type=int): return list(map(type, input().split()))
def read_tupple(type=None):
    tmp = input().split()
    if type is None: return map(int, tmp)
    assert len(tmp) == len(type)
    return [type[i](tmp[i]) for i in range(len(tmp))]

# Implementation
class PrimeNumber:
    def __init__(self, N):
        self.N = N
        self.compute()

    def compute(self):
        self.isP, self.P = [True] * (self.N + 1), []
        for i in range(2, self.N+1):
            if self.isP[i]:
                self.P.append(i)
                for j in range(2*i, self.N+1, i):
                    self.isP[j] = False

N = read_int()

pn = PrimeNumber(1000006)
ans = 0
for p in pn.P:
    cnt = 0
    while N % p == 0:
        N /= p
        cnt += 1
    dec = 1
    while cnt >= dec:
        cnt -= dec
        dec += 1
        ans += 1
if N > 1:
    ans += 1
print(ans)
Buggy code:
# import sys
# readline = sys.stdin.readline
# generator = (readline().strip() for _ in range(N))

# N, M = map(int, input().split())
# As = list(map(int, input().split()))
# queries = (input() for _ in range(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


def solve():
    N = int(input())
    factors = factorization(N)

    total = 0
    for factor in factors:
        f, z = factor

        t = 0
        for i in range(0, 1000):
            m = i * (i+1) / 2
            if m > z:
                t = i - 1
                break

        total += t

    return total


def main():
    print(solve())


if __name__ == "__main__":
    main()


Fixed code:
# import sys
# readline = sys.stdin.readline
# generator = (readline().strip() for _ in range(N))

# N, M = map(int, input().split())
# As = list(map(int, input().split()))
# queries = (input() for _ in range(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


def solve():
    N = int(input())
    factors = factorization(N)

    # print(factors)

    total = 0
    for factor in factors:
        f, z = factor
        if f == 1:
            continue

        t = 0
        for i in range(0, 1000):
            m = i * (i+1) / 2
            if m > z:
                t = i - 1
                break

        total += t
        # print(f, z, t)

    return total


def main():
    print(solve())


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

A  = factorization(N) 

count = 0
for i in A:
  judge = 1
  temp = i[1]
  while temp >= judge:
    count += 1
    temp -=judge
    judge += 1

if N == 1:
  count = 0

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())
A  = factorization(N) 

count = 0
for i in A:
  judge = 1
  temp = i[1]
  while temp >= judge:
    count += 1
    temp -=judge
    judge += 1

if N == 1:
  count = 0

print(count)
Buggy code:
import bisect

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)

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


for p in l:
    n = bisect.bisect_right(a, p[1]) - 1
    ans += n

print(ans)


Fixed code:
import bisect

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

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)

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


for p in l:
    n = bisect.bisect_right(a, p[1]) - 1
    ans += n

print(ans)
Buggy code:
import math
n = int(input())

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

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

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

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

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

a = factorization(int(input()))
b = [1, 3, 6, 10, 15, 21, 28, 36, 43]

ans = 0

if len(a) == 1 and a[0][0] == 1:
  print(0)
  exit()
  
for i in a:
  for j in range(len(b)):
    if i[1] < b[j]:
      ans+=j
      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

a = factorization(int(input()))
b = [1, 3, 6, 10, 15, 21, 28, 36, 43]

ans = 0

if len(a) == 1 and a[0][0] == 1:
  print(0)
  exit()
  
for i in a:
  for j in range(len(b)):
    if i[1] < b[j]:
      ans+=j
      break
    
print(ans)
Buggy code:
import numpy as np
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

y=factorization(n)
def judge(y):
  i=1
  while np.arange(i+2).sum()<=y:
    i+=1
  return i
ans=0
for i in range(len(y)):
  ans+=judge(y[i][1])
print(ans)

Fixed code:
import numpy as np
n=int(input())
if n==1:
  print(0)
else:
  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

  y=factorization(n)
  def judge(y):
    i=1
    while np.arange(i+2).sum()<=y:
      i+=1
    return i
  ans=0
  for i in range(len(y)):
    ans+=judge(y[i][1])
  print(ans)
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

a=factorization(N) 
A=[]
d=0
for i in range(1,50):
  d+=i
  A.append(d)
import bisect
cnt=0
for x,y in a:
  e=bisect.bisect_right(A,y)
  cnt+=e
print(cnt)

Fixed code:
N=int(input())
if N==1:
  print(0)
  exit()
  
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) 
A=[]
d=0
for i in range(1,50):
  d+=i
  A.append(d)
import bisect
cnt=0
for x,y in a:
  e=bisect.bisect_right(A,y)
  cnt+=e
print(cnt)
Buggy code:
N = int(input())

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

Primes = Prime_Factorize(N)
print(Primes,N)
cnt = 0
for p in Primes:
    e = 1
    z = p
    while (N%z == 0) and (N >= z):
        print('N,z,p,e',N,z,p,e)
        N //= z
        e += 1 
        z = p**e
        cnt += 1
    while N%p == 0:
        N //= p
print(cnt)

Fixed code:
N = int(input())

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

Primes = Prime_Factorize(N)
cnt = 0
for p in Primes:
    e = 1
    z = p
    while (N%z == 0) and (N >= z):
        N //= z
        e += 1 
        z = p**e
        cnt += 1
    while N%p == 0:
        N //= p
print(cnt)
Buggy code:
def factorization(n):
    if n==1:
        return [[1,1]]
    temp=n
    ans=[]
    for i in range(2, int(n**0.5+1.01)):
        if temp % i ==0:
            ct=0
            while temp % i == 0:
                temp //= i
                ct += 1
            ans.append([i, ct])
    if temp != 1:
        ans.append([temp, 1])
    return ans

N=int(input())
L=factorization(N)
ans=0
for l in L:
    ct=0
    fac=1
    while fac<=l[1]:
        ct+=1
        fac+=ct+1
    ans+=ct
print(ans)

Fixed code:
def factorization(n):
    if n==1:
        return [[1,1]]
    temp=n
    ans=[]
    for i in range(2, int(n**0.5+1.01)):
        if temp % i ==0:
            ct=0
            while temp % i == 0:
                temp //= i
                ct += 1
            ans.append([i, ct])
    if temp != 1:
        ans.append([temp, 1])
    return ans

N=int(input())
L=factorization(N)
if N==1:
    print(0)
    exit()
ans=0
for l in L:
    ct=0
    fac=1
    while fac<=l[1]:
        ct+=1
        fac+=ct+1
    ans+=ct
print(ans)
Buggy code:
import itertools
import decimal
import math
import collections

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 iskaijo(n):
    i=1
    while True:
        if(n==1):
            break
        if(n%i==0):
            n=n/i
            i=i+1
        else:
            i=-1
            break
    return i

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


ng=False
ans=0
List =factorization(N)
#c=collections.Counter(List)
for i in range(len(List)):
    test = List[i][1]
    i=1
    while True:
        test=test-i
        i=i+1
        ans=ans+1
        if(test == 0):
            break
        # elif(test < 0 ):
        #     ng = True
        #     break

if N!=1:
    print(ans)
else:
    print(0)

Fixed code:
import itertools
import decimal
import math
import collections

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 iskaijo(n):
    i=1
    while True:
        if(n==1):
            break
        if(n%i==0):
            n=n/i
            i=i+1
        else:
            i=-1
            break
    return i

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


ng=False
ans=0
List =factorization(N)
#c=collections.Counter(List)
for i in range(len(List)):
    test = List[i][1]
    i=1
    while True:
        test=test-i
        i=i+1
        ans=ans+1
        if(test == 0):
            break
        elif(test < 0 ):
             ans=ans-1
             break
#print(List)
if N!=1:
    print(ans)
else:
    print(0)
Buggy code:
import math
import numpy as np
n = int(input())

s = math.sqrt(n)
i = 2
f = {}
while i <= s:
    while n % i == 0:
        f[i] = f.get(i,0)+1
        n = n // i
    i += 1

ans = 0
for x in f.values():
    e = 0
    cumsum = 0
    while True:
        e += 1
        cumsum += e
        if e + 1 + cumsum > x:
            break
    ans += e
print(ans)

Fixed code:
import math
import numpy as np
n = int(input())

s = math.sqrt(n)
i = 2
f = {}
while i <= s:
    while n % i == 0:
        f[i] = f.get(i,0)+1
        n = n // i
    i += 1

ans = 0
for x in f.values():
    e = 0
    cumsum = 0
    while e + cumsum + 1 <= x:
        e += 1
        cumsum += e
    ans += e
print(ans+(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())


r = 0
if n != 1:
    f = factorization(n) 
    num = []
    for a, b in f:
        for i in range(b):
            num.append(a ** (i + 1))
    num.sort()
    for c in num:
        if n < c:
            break
        else:
            n /= c
            r += 1

print(r)

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


r = 0
if n != 1:
    f = factorization(n) 
    num = []
    for a, b in f:
        for i in range(b):
            num.append(a ** (i + 1))
    num.sort()
    for c in num:
        if n < c:
            break
        else:
            if n % c == 0:
                n /= c
                r += 1

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

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

def main():
    N = int(input())
    fac = defaultdict(int)

    for i in range(2, int(math.sqrt(N))+1):
        while N % i == 0:
            is_p = False
            fac[i] += 1
            N = N // i

        if i == int(math.sqrt(N)) and N != 1:
            fac[N] += 1

    ans = 0
    for k, v in fac.items():
        print(k, v)
        e = 1
        for i in range(10000000):       
            if e <= v:
                ans += 1
                v -= e
                e += 1
            else:
                break
    print(ans)

if __name__ == "__main__":
    main()

Fixed code:
import math
from collections import defaultdict

def main():
    N = int(input())
    fac = defaultdict(int)

    for i in range(2, int(math.sqrt(N))+1):
        while N % i == 0:
            is_p = False
            fac[i] += 1
            N = N // i

    if N != 1:
        fac[N] += 1

    ans = 0
    for k, v in fac.items():
        e = 1
        for i in range(10000000):       
            if e <= v:
                ans += 1
                v -= e
                e += 1
            else:
                break
    print(ans)

if __name__ == "__main__":
    main()
Buggy code:
N=int(input())
nn=N
import math
sq=round(math.sqrt(N))+1

i=2
ans=0
count1=0
count2=1
while sq>=i:
    if nn%i==0:
        nn//=i
        count1+=1
        if count1==count2:
            ans+=1
            count2+=1
            count1=0
            sq=N//i
    else:
        i+=1
        count1=0
        count2=1

if ans==0 and N>=2:
    ans+=1

print(ans)

Fixed code:
N=int(input())
nn=N
import math
sq=round(math.sqrt(N))+1

i=2
ans=0
count1=0
count2=1
while sq>=i:
    if nn%i==0:
        nn//=i
        count1+=1
        if count1==count2:
            ans+=1
            count2+=1
            count1=0
    else:
        i+=1
        count1=0
        count2=1

if nn>sq:
    ans+=1

print(ans)
Buggy code:
import collections
N = int(input())
counter = 0
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 cc(n):
    ans = 0
    i = 1
    while True:
        n = n - i
        ans += 1
        i += 1
        if n < i:
            break
    return ans

s_list = prime_factorize(N)
c = collections.Counter(s_list)
values,counts = zip(*c.most_common())
j = 0
for i in range(len(counts)):
    counter += cc(counts[i])
print(counter)

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

def cc(n):
    ans = 0
    i = 1
    while True:
        n = n - i
        ans += 1
        i += 1
        if n < i:
            break
    return ans

s_list = prime_factorize(N)
c = collections.Counter(s_list)
values,counts = zip(*c.most_common())
j = 0
for i in range(len(counts)):
    counter += cc(counts[i])
print(counter)
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

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


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

num = int(input())
maxnum = num
l = prime_factorize(num)
if(num == 1):
    print(0)
elif(len(l)==0):
    print(1)
else:
    cnt = 0
    list=list(dict.fromkeys(l))
    for i in list:
        for n in range(maxnum):
            if(num%(i**(n+1))==0):
                num = num/(i**(n+1))
                cnt += 1
            else:
                break
    print(cnt)
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

a = int(input())
b = factorization(a)
countation = 0
for i in range(len(b)):
    t = b[i][1]
    k = 1
    n = 1
    while t >= n:
        countation += 1
        k = k + 1
        n = k*(k+1)/2
print(countation)
        

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

a = int(input())
b = factorization(a)
countation = 0
for i in range(len(b)):
    t = b[i][1]
    k = 1
    n = 1
    while t >= n:
        countation += 1
        k = k + 1
        n = k*(k+1)/2
if a != 1:
    print(countation)
else:
    print(0)