qyliang/CodeNanoFix huggingface dataset:
Buggy code:
import sys
input = sys.stdin.readline

a,b = input().strip().split()
a = int(a)
b = b.replace('.','')
ans = (a*b)//100
print(ans)


Fixed code:
import sys
input = sys.stdin.readline

a,b = input().strip().split()
a = int(a)
b = b.replace('.','')
ans = (a*int(b))//100
print(ans)
Buggy code:
from decimal import Decimal
in_ = list(input().split())
A = int(in_[0])
B = int(float(in_[1]) * 100)
ans = Decimal(A * B)
print(ans)

Fixed code:
from decimal import Decimal
in_ = list(input().split())
A = int(in_[0])
B = Decimal(in_[1])
ans = Decimal(A * B)
print(int(ans))
Buggy code:
AB=input().split()
A=int(AB[0])
B=int(AB[1].replace(".",""))
C=A*B
C=str(C)
C=C[:-2]
print(C)

Fixed code:
AB=input().split()
A=int(AB[0])
B=int(AB[1].replace(".",""))
C=A*B
C=str(C)
C=C[:-2]
if len(C)==0:
  C="0"
print(C)
Buggy code:
from floor import math

a, b = input().split()
a = int(a)
b = round(float(b) * 100)
print(a * b // 100)

Fixed code:
from math import floor

a, b = input().split()
a = int(a)
b = round(float(b) * 100)
print(a * b // 100)
Buggy code:
#import math
#N=int(input())
A,B = map(float,input().split())
#N=int(input())
#A = list(map(int,input().split()))
#S=str(input())
A=int(A)
B=B*100
c=A*B
c=c//100
print(c)


Fixed code:
#import math
#N=int(input())
A,B = map(float,input().split())
#N=int(input())
#A = list(map(int,input().split()))
#S=str(input())
A=int(A)
B=round(B*100)
c=A*B
c=str(c//100)
print(c)
Buggy code:
a = input().split()
p = int(a[0])
q = float(a[1])*100
print(p*q//100)

Fixed code:
a = input().split()
p = int(a[0])
q = round(float(a[1])*100)
print(p*q//100)
Buggy code:
temp = input().split()

A = int(temp[0])
B = str(temp[1][0] + temp[1][2] + temp[1][3])

B = int(B)

print(A * B / 100)



Fixed code:
temp = input().split()
A = int(temp[0])
B = str(temp[1][0] + temp[1][2] + temp[1][3])
B = int(B)
print(A * B // 100)
Buggy code:
ab = input().split()
a = int(ab[0])
b = ab[1]
import math
s = a*int(b[0])
ad = None
if len(b) > 2:
  tmp = str(a*int(b[2]))
  if len(str(tmp)) > 1:
    s+=int(str(a*int(b[2]))[:-1])
  ad = int(str(a*int(b[2]))[-1])
if len(b) > 3:
  tmp = str(a*int(b[3]))
  if len(str(tmp)) > 2:
    s+=int(str(a*int(b[3]))[:-2])
  if len(str(a*int(b[3]))) > 1:
    ad += int(str(a*int(b[3]))[-2])
    if ad > 9:
      s += int(str(ad)[:-1])

Fixed code:
ab = input().split()
a = int(ab[0])
b = ab[1]
import math
s = a*int(b[0])
ad = None
if len(b) > 2:
  tmp = str(a*int(b[2]))
  if len(str(tmp)) > 1:
    s+=int(str(a*int(b[2]))[:-1])
  ad = int(str(a*int(b[2]))[-1])
if len(b) > 3:
  tmp = str(a*int(b[3]))
  if len(str(tmp)) > 2:
    s+=int(str(a*int(b[3]))[:-2])
  if len(str(a*int(b[3]))) > 1 and ad:
    ad += int(str(a*int(b[3]))[-2])
    if ad > 9:
      s += int(str(ad)[:-1])
  

print(s)
Buggy code:
from math import floor

a, b = input().split()
a = int(a)
b = int(float(b)*100+0.0001)

print(b)
print(a*b//100)

Fixed code:
from math import floor

a, b = input().split()
a = int(a)
b = int(float(b)*100+0.0001)

print(a*b//100)
Buggy code:
a,b=map(input().split())
b.replace('.','')
ans=int(a)*int(b)//100
print(ans)

Fixed code:
a,b=map(str,input().split())
b=b.replace('.','')
ans=int(a)*int(b)//100
print(ans)
Buggy code:
import decimal
A, B = map(decimal.Decimal, input().split())
print(A*B)

Fixed code:
import decimal
A, B = map(decimal.Decimal, input().split())
print(int(A*B))
Buggy code:
from decimal import Decimal
a,b = map(str,input().split())
#print(a,b)
b = Decimal(b)
a = int(a)
ans = a*b


print(round(ans))


Fixed code:
from decimal import Decimal
a,b = map(str,input().split())
#print(a,b)
b = Decimal(b)
a = int(a)
ans = a*b


print(int(ans))
Buggy code:
a,b = input().split()
b.replace('.','')
print((int(a)*int(b))/100)

Fixed code:
a, b = input().split()
a = int(a)
b = int(b.replace('.', ''))

print(a * b // 100)
Buggy code:
from decimal import *
a, b = map(Decimal, input().split())
print(a*b)

Fixed code:
from decimal import Decimal

a, b = map(Decimal, input().split())
print(int(a*b))
Buggy code:
a, b = input().split()
a = int(a)
# b = int(float(b) * 100 +0.1)
b = int(b.replace(".". ""))
print(int(a*b) // 100)


Fixed code:
a, b = input().split()
a = int(a)
# b = int(float(b) * 100 +0.1)
b = int(b.replace(".", ""))
print(int(a*b) // 100)
Buggy code:
import math
from fractions inport Fraction

A, B = input().split()
A = int(A)
B = Fraction(B)
print(math.floor(A*B))

Fixed code:
from math import floor 
from fractions import Fraction

A, B = input().split()
A = int(A)
B = Fraction(B)
print(floor(A*B))
Buggy code:
a, b = input().strip().split()
a, b = [int(a), float(b)]
b = b*100 + 0.000000001
print(b)
print(a*int(b)//100)

Fixed code:
a, b = input().strip().split()
a, b = [int(a), float(b)]
b = b*100 + 0.000000001

print(a*int(b)//100)
Buggy code:
a,b=input().split()
a=int(a)
b=str(b)
b.replace(".","")
b=int(b)
print(a*b//100)

Fixed code:
a,b=input().split()
a=int(a)
b=str(b)
b=b.replace('.','')

b=int(b)
print(a*b//100)
Buggy code:
import math
import bisect
#[int(x) for x in input().split()]
#map(int,input().split())
#for _ in range(int(input())):
a,b=input().split()
a=int(a)
b=b.split('.')
b=int(b)

print(int(((a*b)/100)))

Fixed code:
import math
import bisect
#[int(x) for x in input().split()]
#map(int,input().split())
#for _ in range(int(input())):
a,b=input().split()
a=int(a)
b=list(b.split("."))
b=''.join(b)
b=int(b)

print(a*b//100)
Buggy code:
a, b = input().split()
b = float(b)*100
a = int(a)
print(b)
print((a*b)//100)


Fixed code:
a,b=input().split()
a=int(a)
b=round(float(b)*100)
print(a*b//100)
Buggy code:
from decimal import Decimal
a,b=input().split()
print(int(a)*Decimal(b))

Fixed code:
from decimal import Decimal
s = input()
a, b = s.split()
a = int(a)
b = Decimal(b)

print(int(a * b))
Buggy code:
from decimal import Decimal
a,b=map(Decimal,input().split())

print(str(a))
print(str(a*b))
print(str(int(a*b)))

Fixed code:
from decimal import Decimal
a,b=map(Decimal,input().split())

print(str(int(a*b)))
Buggy code:
A, B = input().split()
A = int(A)
B = "".join(B.split("."))
B = int(B)
result = str(A * B)

print(result[:-2])

Fixed code:
A, B = input().split()
A = int(A)
B = "".join(B.split("."))
B = int(B)
result = str(A * B)
result = result[:-2]
if result == "":
    result = 0

print(result)
Buggy code:
#-*-coding:utf-8-*-

import sys
from decimal import Decimal

def main2():
    a,b=input().split()
    a = Decimal(a)
    b = Decimal(b)
    ans = a*b
    print(ans)

def main():
    a,b = map(float(),input().split())
    ans = a * b
    ans = str(ans)
    idx = ans.index(".")
    print(ans[:idx])

if __name__ == "__main__":
    main2()

Fixed code:
#-*-coding:utf-8-*-

import sys
from decimal import Decimal

def main():
    a,b=input().split()
    a = Decimal(a)
    b = Decimal(b)
    ans = a * b
    ans = str(ans)
    idx = ans.index(".")
    print(ans[:idx])

if __name__ == "__main__":
    main()
Buggy code:
a,b = map(float,input().split())
print(int(a*b//100))

Fixed code:
a,b=map(float,input().split())
a=int(a)
print((round(b*100)*a)//100)
Buggy code:
a,b=input().split()
a=int(a)
b.replace('.','')
b=int(b)
print((a*b)//100)


Fixed code:
a,b=input().split()
a=int(a)
b=b.replace('.','')
b=int(b)
print((a*b)//100)
Buggy code:
a, b = map(float,input().split())
b = b * 1000
b = int(b)
c = int(a)*b//1000
print(int(a),b)
print(c)


Fixed code:
a,b = map(float,input().split())
a = int(a)
b = int(b*1000)
print(a*b//1000)
Buggy code:
import sys
import math
from collections import deque
from collections import defaultdict

def main():
    a,b = list(map(float,sys.stdin.readline().split()))
    b100 = round(b * 100)
    
    ans = (a * b100) // 100
    print(str(ans))

if __name__ == "__main__":
    main()

Fixed code:
import sys
import math
from collections import deque
from collections import defaultdict

def main():
    a,b = list(map(float,sys.stdin.readline().split()))
    a = int(a)
    b100 = round(b * 100)
    
    ans = (a * b100) // 100
    print(str(ans))

if __name__ == "__main__":
    main()
Buggy code:
a, b = map(float , input().split())
print((a*b*100 // 100))

Fixed code:
a, b = map(float, input().split())
print(round(a) * round(b*100) // 100)
Buggy code:
s = input().split()
A = int(s[0])
B = float(s[1])
B100 = int(B * 128)
print(A * B100 // 128)

Fixed code:
s = input().split()
A = int(s[0])
B = float(s[1])
B100 = int(B * 1000)
print(A * B100 // 1000)
Buggy code:
from decimal import Decimal

numbers = input().split()
a = float(numbers[0])
b = Decimal(numbers[1])

c = a * b

print(int(c))


Fixed code:
from decimal import Decimal

numbers = input().split()
a = Decimal(numbers[0])
b = Decimal(numbers[1])

c = a * b

print(int(c))
Buggy code:
a, b = map(float, input().split());
 
c = int(100*b);
d = int(a);
print(c,d);
e = int(a * c // 100);
print(e);

Fixed code:
a, b = map(float, input().split());
c = int(1000*b);
d = int(a);
e = int(c * d // 1000 );
print(e);
Buggy code:
import decimal
a,b=map(str,input().split())
c=decimal.Decimal(a)*decimal.Decimal(b)
print(decimal.Decimal(str(c)).quantize(decimal.Decimal('0'),rounding=ROUND_FLOOR))

Fixed code:
from decimal import Decimal,ROUND_FLOOR
a,b=map(str,input().split())
c=Decimal(a)*Decimal(b)
print(Decimal(str(c)).quantize(Decimal('0'),rounding=ROUND_FLOOR))
Buggy code:
A,B = map(float,input().split())
print(int(((A)*(round(B)*100))/100))


Fixed code:
A, B = map(float, input().split())
B = round(B * 100)
print(int(A) * B // 100)
Buggy code:
from decimal import *

a, b = map(Decimal, input().split())

print(a*b)

Fixed code:
from decimal import *

a, b = map(Decimal, input().split())

print(int(a*b))
Buggy code:
import math
import decimal
A,B=input().split()
print(Decimal(A)*Decimal(B)//1)

Fixed code:
import math
import decimal
A,B=input().split()
print(decimal.Decimal(A)*decimal.Decimal(B)//1)
Buggy code:
import sys
import math
input = sys.stdin.readline
ins = lambda: input().rstrip()
ini = lambda: int(input().rstrip())
inm = lambda: map(float, input().split())
inl = lambda: list(map(int, input().split()))
out = lambda x: print('\n'.join(map(str, x)))

a, b = inm()
print(int((a * (b*100 + 0.1)) // 100))

Fixed code:
import sys
import math
input = sys.stdin.readline
ins = lambda: input().rstrip()
ini = lambda: int(input().rstrip())
inm = lambda: map(float, input().split())
inl = lambda: list(map(int, input().split()))
out = lambda x: print('\n'.join(map(str, x)))

a, b = inm()
a = int(a)
b = int(b * 100 + 0.1)
print(a*b // 100)
Buggy code:
a,b = input().split()
a = int(a)
b = int(b.replace('.','')
print(a*b//100)

Fixed code:
a, b = input().split()
print(int(a) * int(b.replace(".","")) // 100)
Buggy code:
import math
A,B=input().split()
A=int(A)
B=int(float(B)*1000)
ans=A*B
ans=str(ans)
if len(ans) < 3:
    print(0)
else:
    print(ans[:-2])

Fixed code:
import math
A,B=input().split()
A=int(A)
B=int(float(B)*1000)
ans=A*B
ans=str(ans)
if len(ans) < 4:
    print(0)
else:
    print(ans[:-3])
Buggy code:
import math
import decimal

a, b = input().split()
a = decimal.Decimal(a)
b = decimal.Decimal(b)

print(a, b)
print(math.floor(a*b))



Fixed code:
import math
import decimal

a, b = input().split()
a = decimal.Decimal(a)
b = decimal.Decimal(b)

print(math.floor(a*b))
Buggy code:
#! /usr/bin/env python3
a, b = input().split()
c = d = 0
if float(a) > 0 and '.' in a : c = a[::-1].find('.')
if float(b) > 0 and '.' in b : d = b[::-1].find('.')
t = int(a.replace('.', '')) * int(b.replace('.', ''))
if t == 0:
    print(t)
else:
    print(str(t)[:-(c+d)])

Fixed code:
#! /usr/bin/env python3
a, b = input().split()
c = d = 0
if float(a) > 0 and '.' in a : c = a[::-1].find('.')
if float(b) > 0 and '.' in b : d = b[::-1].find('.')
t = int(a.replace('.', '')) * int(b.replace('.', ''))
if t == 0 or len(str(t)) < c+d:
    print(0)
elif c+d < 1:
    print(t)
else:
    print(str(t)[:-(c+d)])
Buggy code:
a,b = input().split()
a1 = int(a)
bs = list(b)
b1 = int(bs[0])
b2 = 0
if len(b)==3:
    b2 = int(bs[2])*10
else:
    b2 = int(bs[2]+bs[3])
b1 = b1*100+b2
ans = list(str(a1*b1))
del ans[-1]
del ans[-1]
print(''.join(ans))

Fixed code:
a,b = input().split()
a1 = int(a)
bs = list(b)
b1 = int(bs[0])
b2 = 0
if len(b)==3:
    b2 = int(bs[2])*10
else:
    b2 = int(bs[2]+bs[3])
b1 = b1*100+b2
ans = list(str(a1*b1))
del ans[-1]
if ans:
    del ans[-1]
if ans:
    print(''.join(ans))
else:
    print(0)
Buggy code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
a, b = input().split()
a = int(a)
b = int(float(b) * 100)
print(a * b)
s = str(a * b)
if len(s) < 3:
    print(0)
else:
    print(int(s[:len(s) - 2]))




Fixed code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-
a, b = input().split()
a = int(a)
b = int(b[0] + b[2:])
s = str(a * b)
if len(s) < 3:
    print(0)
else:
    print(int(s[:len(s) - 2]))
Buggy code:
a, b = input().split(" ")
A, B = int(a), float(b)
B100 = int(round(B * 100))
C = int(round(A * B100 / 100))
print(C)

Fixed code:
a, b = input().split(" ")
A, B = int(a), float(b)
B100 = round(B * 100)
C = A * B100
ans = C // 100
print(ans)
Buggy code:
from decimal import Decimal

A,B = input().split()
#print(A*B)
ans = math.floor(Decimal(A)*Decimal(B))
print(ans)

Fixed code:
from decimal import Decimal
import math

A,B = input().split()
#print(A*B)
ans = math.floor(Decimal(A)*Decimal(B))
print(ans)
Buggy code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from decimal import Decimal


def main():
    A, B = map(Decimal, input().split())
    print(float(A * B))


if __name__ == "__main__":
    main()


Fixed code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from decimal import Decimal


def main():
    A, B = map(Decimal, input().split())
    print(int(A * B))


if __name__ == "__main__":
    main()
Buggy code:
from decimal import Decimal


def main():
    A, B = map(Decimalt,input().split())

    print(int(A*B))
    return

if __name__ == '__main__':
    main()


Fixed code:
from decimal import Decimal


def main():
    A, B = map(Decimal, input().split())

    print(int(A*B))


if __name__ == "__main__":
    main()
Buggy code:
A,B=input().split()
B=list(B)
N=B[1]+B[2]+B[3]
N=int(N)
C=int(A*N/100)
print(C)

Fixed code:
A,B=input().split()
A=int(A)
B=list(B)
N=B[0]+B[2]+B[3]
N=int(N)
C=int(A*N//100)
print(C)
Buggy code:
from decimal import Decimal
from math import floor

a_in, b_in= input().split()
a = int(a)
b = Decimal(b_in)

print(floor(a * b))

Fixed code:
from decimal import Decimal
from math import floor

a_in, b_in= input().split()
a = int(a_in)
b = Decimal(b_in)

print(floor(a * b))
Buggy code:
a, b = input().split()
b = b.replace('.','')
b = int(b[0])*100 + int(b[1])*10 + int(b[0])
a = int(a)
result = (a * b)//100
print(result)


Fixed code:
a, b = input().split()
a, b = int(a), b.replace('.','')
b = int(b[0])*100 + int(b[1])*10 + int(b[2])*1
print(a*b//100)
Buggy code:
from decimal import Decimal
A,B = map(str, input().split())
A = int(A)
B = Decimal(B)
print(A * B)

Fixed code:
from decimal import Decimal
A,B = map(str, input().split())
A = int(A)
B = Decimal(B)
print(int(A * B))
Buggy code:
re = input().split())
a = int(re[0])
b = float(re[1]])
for i in range(10):
    if i <= b <i+1:
        c = int(i)
        d = int(100 * (b - i))
        break
    
e = a * c
f = a * d
g = f // 100
h = e + g
print(h)

Fixed code:
re = input().split()
a = int(re[0])
b = float(re[1])
for i in range(10):
    if i <= b <i+1:
        c = int(i)
        #d = int(100 * (b - i))
        d = int(round(100 * (b - i)))
        break
    
e = a * c
f = a * d
g = f // 100
h = e + g
print(h)
Buggy code:

[a, b] = input().strip().split()
a = float(a)
b = float(b)
b = int(b * 1000)

print((a*b)//1000)


Fixed code:

[a, b] = input().strip().split()
a = int(a)
b = float(b)
b = int(b * 1000)

print((a*b)//1000)
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

def p_num(m):
  ret = 0
  for j in range(1,10**12):
    ret += j
    if ret <= m < ret+(j+1):
      ans = j
      break
  return ans

p = factorization(N)

cnt = 0
for k in range(len(p)):
  cnt += p_num(p[k][1])
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

def p_num(m):
  ret = 0
  for j in range(1,10**12):
    ret += j
    if ret <= m < ret+(j+1):
      ans = j
      break
  return ans

p = factorization(N)

cnt = 0
for k in range(len(p)):
  cnt += p_num(p[k][1])
print(cnt)
Buggy code:
sieve = [True] * 10**12
prime = []
for i in range(2, 10**6):
  if sieve[i]:
    prime.append(i)
    for j in range(i**2, 10**12, i):
      sieve[j] = False
n = int(input())
if n == 1:
  print(0)
else:
  e = []
  for p in prime:
    if n % p == 0:
      idx = 0
      while n % p == 0:
        n = n // p
        idx += 1
      e.append(idx)
      if n == 1:
        break
  if len(e) > 0:
    total = 0
    for idx in e:
      cnt = 1
      while idx => cnt*(cnt+1)//2:
        cnt += 1
      total += cnt - 1
    if n == 1:
      print(total)
    else:
      print(total + 1)
  else:
    print(1)
  
      
  

Fixed code:
sieve = [True] * 10**6
prime = []
for i in range(2, 10**6):
  if sieve[i]:
    prime.append(i)
    if i < 10**3:
      for j in range(i**2, 10**6, i):
        sieve[j] = False
n = int(input())
if n == 1:
  print(0)
else:
  e = []
  for p in prime:
    if n % p == 0:
      idx = 0
      while n % p == 0:
        n = n // p
        idx += 1
      e.append(idx)
    if n == 1:
        break
  if len(e) > 0:
    total = 0
    for idx in e:
      cnt = 1
      while idx >= cnt*(cnt+1)//2:
        cnt += 1
      cnt -= 1
      total += cnt 
    if n == 1:
      print(total)
    else:
      print(total + 1)
  else:
    print(1)
Buggy code:
import math

n = int(input())
N = n

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

yakusu = []
multi = []

i = 2
while(i <= math.ceil(math.sqrt(n))):
    
    if(n % i == 0):
        if(i in yakusu):
            multi[yakusu.index(i)] += 1
        else:
            yakusu.append(i)
            multi.append(1)
        n = int(n / i)
        continue
    
    if(n == 1):
        break
    
    i += 1

if(len(yakusu) == 0):
    print(1)
    exit()
    
ans = 0

for j in range(len(multi)):
    h = (-1 + int(math.sqrt(1 + 8 * multi[j]))) / 2
    ans += int(h)

print(ans)

Fixed code:
import math

n = int(input())
N = n

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

yakusu = []
multi = []

i = 2

while(i <= math.ceil(math.sqrt(N))):
    
    if(n % i == 0):
        if(i in yakusu):
            multi[yakusu.index(i)] += 1
        else:
            yakusu.append(i)
            multi.append(1)
        n = int(n / i)
        continue
    
    if(n == 1):
        break
    
    i += 1
    
else:
    yakusu.append(n)
    multi.append(1)

if(len(yakusu) == 0):
    print(1)
    exit()
    
# print(yakusu)
# print(multi)

ans = 0

for j in range(len(multi)):
    h = (-1 + int(math.sqrt(1 + 8 * multi[j]))) / 2
    ans += int(h)

print(ans)
Buggy code:
import bisect
n=int(input())
def 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 ra(a):
    ll,l=[],1
    for i in range(len(a)-1):
        if a[i]==a[i+1]:
            l+=1
        else:
            ll.append(l)
            l=1
    ll.append(l)
    return ll
l=ra(factorize(n))
c=[1]
for i in range(2,10**4):
    c.append(i+c[-1])
ans=0
for i in l:
    ans+=bisect.bisect_left(c,i)
print(ans)

Fixed code:
import bisect
n=int(input())
if n==1:
    print(0)
    exit()
def 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 ra(a):
    ll,l=[],1
    for i in range(len(a)-1):
        if a[i]==a[i+1]:
            l+=1
        else:
            ll.append(l)
            l=1
    ll.append(l)
    return ll
l=ra(factorize(n))
c=[1]
for i in range(2,10**4):
    c.append(i+c[-1])
ans=0
for i in l:
    ans+=bisect.bisect_left(c,i)
    if i in set(c):
        ans+=1
print(ans)
Buggy code:
import math

n = int(input())
list = {}
flag = True
while flag:
    flag = False
    for i in range(2,int(math.sqrt(n)+1)):
        if n%i==0:
            if i in list:
                list[i] = list[i]+1
            else:
                list[i] = 1
            n /= i
            flag = True
            break
if n in list:
    list[n] = list[n]+1
else:
    list[n] = 1
ans = 0
for i in list.keys():
    m = list[i]
    for j in range(m):
        if not j>m:
            ans += j
            m -= j
        else:
            break
print(ans)


Fixed code:
import math

n = int(input())
list = {}
flag = True
while flag:
    flag = False
    for i in range(2,int(math.sqrt(n)+2)):
        if n%i==0:
            if i in list:
                list[i] = list[i]+1
            else:
                list[i] = 1
            n /= i
            flag = True
            break
if n>1:
    if n in list:
        list[n] = list[n]+1
    else:
        list[n] = 1
ans = 0
for i in list.keys():
    m = list[i]
    for j in range(1,m+1):
        if not j>m:
            ans += 1
            m -= j
        else:
            break
print(ans)
Buggy code:
import numpy as np
import sys
sys.setrecursionlimit(10**6)

n=int(input())

m=int(np.sqrt(n))+1

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

ans=0
for i in range(2,m):
    cnt=0
    for j in range(44):
        if n%i==0:
            n=n/i
            print("i=",i,"n=",n)
            cnt+=1
        else:
            break
    if 1<=cnt<3:
        ans+=1
    if 3<=cnt<6:
        ans+=2
    if 6<=cnt<10:
        ans+=3
    if 10<=cnt<15:
        ans+=4
    if 15<=cnt<21:
        ans+=5
    if 21<=cnt<28:
        ans+=6
    if 28<=cnt<36:
        ans+=7
    if 36<=cnt<45:
        ans+=8

if n!=1:
    ans+=1

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

print(ans)        


Fixed code:
import numpy as np
import sys
sys.setrecursionlimit(10**6)

n=int(input())

m=int(np.sqrt(n))+1

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

ans=0
for i in range(2,m):
    cnt=0
    for j in range(44):
        if n%i==0:
            n=n/i
#            print("i=",i,"n=",n)
            cnt+=1
        else:
            break
    if 1<=cnt<3:
        ans+=1
    if 3<=cnt<6:
        ans+=2
    if 6<=cnt<10:
        ans+=3
    if 10<=cnt<15:
        ans+=4
    if 15<=cnt<21:
        ans+=5
    if 21<=cnt<28:
        ans+=6
    if 28<=cnt<36:
        ans+=7
    if 36<=cnt<45:
        ans+=8

if int(n)!=1:
    ans+=1

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

print(ans)
Buggy code:
import math
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)
ans=0
for i in range(len(b)):
    c=b[i][1]
    check=math.ceil(((-1)+math.sqrt(1+8*c))/2)
    ans=ans+check
if a==1:
    print(0)
else:
    print(ans)

Fixed code:
import math
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)
ans=0
for i in range(len(b)):
    c=b[i][1]
    check=math.floor(((-1)+math.sqrt(1+8*c))/2)
    ans=ans+check
if a==1:
    print(0)
else:
    print(ans)