qyliang/CodeNanoFix huggingface dataset:
Buggy code:
def divisor(n): 
    i = 1
    table = []
    while i * i <= n:
        if n % i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = list(set(table))
    return table

N = int(input())
total = 0

for n in range(1, N + 1, 2):
    print(n)
    if len(divisor(n)) == 8:
        total += 1

print(total)

Fixed code:
def divisor(n): 
    i = 1
    table = []
    while i * i <= n:
        if n % i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = list(set(table))
    return table

N = int(input())
total = 0

for n in range(1, N + 1, 2):
    if len(divisor(n)) == 8:
        total += 1

print(total)
Buggy code:
N = int(input())
ans = 0
for i in range(1, N+1, 2):
    cnt = 0
    for j in range(1, i+1):
        if i % j == 0: cnt += 1
    if cnt == 8:
        print(i)
        ans += 1
print(ans)

Fixed code:
N = int(input())
ans = 0
for i in range(1, N+1, 2):
    cnt = 0
    for j in range(1, i+1):
        if i % j == 0: cnt += 1
    if cnt == 8:
        ans += 1
print(ans)
Buggy code:
n = int(input())

cnt_2 = 0
if n < 105:
    print(0)

else:
    for i in range(105,n+1,2):
        cnt = 0
        for j in range(1,i+1):
            if i % j == 0:
                cnt += 1
        if cnt == 8:
            cnt_2 += 1

print(cnt_2)

Fixed code:
n = int(input())
 
cnt_2 = 0
if n < 105:
    print(0)
else:
    for i in range(105,n+1,2):
        cnt = 0
        for j in range(1,i+1):
            if i % j == 0:
                cnt += 1
        if cnt == 8:
            cnt_2 += 1
    print(cnt_2)
Buggy code:
N = int(input())
B = 0
for i in range(N):
  A = 0
  n = int((i+1)**(1/2))
  for j in range(n):
     if (i+1) % (j+1) == 0:
        A += 1
  if A == 4 and (i+1) % 2 == 1:
    print(i+1)
    B += 1
print(B)
    


Fixed code:
N = int(input())
B = 0
for i in range(N):
  A = 0
  n = int((i+1)**(1/2))
  for j in range(n):
     if (i+1) % (j+1) == 0:
        A += 1
  if A == 4 and (i+1) % 2 == 1:
    B += 1
print(B)
Buggy code:
N = int(input())

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)

    return divisors

cnt = 0  
for n in range(1,N+1):
  if len(make_divisiors(n)) == 8:
    cnt += 1
print(cnt)

Fixed code:
N = int(input())
 
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)
 
    return divisors
 
cnt = 0  
for n in range(1,N+1):
    if len(make_divisors(n)) == 8 and n%2==1:
        cnt += 1
print(cnt)
Buggy code:
def f(n):
    a = []
    for i in range(1,n+1):
        if n%i == 0:
            a.append(i)
    return a

n = int(input())
count = 0
for i in range(1,n+1):
    ff = f(i)
    if len(ff) == 8:
        count+=1
print(count)


Fixed code:
def f(n):
    a = []
    for i in range(1,n+1):
        if n%i == 0:
            a.append(i)
    return a

n = int(input())
count = 0
for i in range(1,n+1,2):
    ff = f(i)
    #print(ff)
    if len(ff) == 8:
        count+=1
print(count)
Buggy code:
n = int(input())
#h, w = map(int,input().split())
#ls = list(map(int,input().split()))
#ls = [list(map(int,input().split())) for i in range(n)]
#ls = [input() for i in range(h)]

ans = 0
for i in range(1,n+1):
  if i%2 == 1:
    yakusuu = 0
    for j in range(1,i + 1):
      if i%j == 0:
        yakusuu += 0
    if yakusuu == 8:
      ans += 1
print(ans)
    

Fixed code:
n = int(input())
#h, w = map(int,input().split())
#ls = list(map(int,input().split()))
#ls = [list(map(int,input().split())) for i in range(n)]
#ls = [input() for i in range(h)]

ans = 0
for i in range(1,n+1):
  if i%2 == 1:
    yakusuu = 0
    for j in range(1,i + 1):
      if i%j == 0:
        yakusuu += 1
    if yakusuu == 8:
      ans += 1
print(ans)
Buggy code:
n = int(input())
if n<=105:
  print(1)
  exit()

ans = 1
for i in range(107, n+1, 2):
  count = 0
  for j in range(1, i+1):
    if i % j == 0:
      count += 1
  if count == 8:
    ans += 1

print(ans)


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

ans = 1
for i in range(107, n+1, 2):
  count = 0
  for j in range(1, i+1):
    if i % j == 0:
      count += 1
  if count == 8:
    ans += 1

print(ans)
Buggy code:
n = int(input())
ans = 0
for m in range(1, n+1):
	if m%2 != 1:
		continue
	cnt = 0
	for k in range(1,m+1):
		if m%k == 0:
			cnt += 1
		if cnt>8:
			break
	if cnt == 8:
		print(m)
		ans += 1

print(ans)

Fixed code:
n = int(input())
ans = 0
for m in range(1, n+1):
	if m%2 != 1:
		continue
	cnt = 0
	for k in range(1,m+1):
		if m%k == 0:
			cnt += 1
		if cnt>8:
			break
	if cnt == 8:
		# print(m)
		ans += 1

print(ans)
Buggy code:
# -*- coding: utf-8 -*-
N = int(input())

if N < 105:
    ans = 0
else:
    ans = 0
    for i in range(103,N,2):
        cnt = 0

        for j in range(1,N):
            if i % j == 0:
                cnt += 1

        if cnt == 8:
            ans += 1


print(ans)

Fixed code:
# -*- coding: utf-8 -*-
N = int(input())

if N < 105:
    ans = 0
else:
    ans = 1
    for i in range(107, N+2, 2):
        cnt = 0
        for j in range(1, N+1):
            if i % j == 0:
                cnt += 1

        if cnt == 8:
            ans += 1

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

ans = 0
sqrt = 1

for i in range(1,n+1,2):
    if i == sqrt*sqrt:
        sqrt += 1
        continue
    elif i > sqrt*sqrt:
        sqrt += 1
    count = 0
    for j in range(1,sqrt,2):
        if i%j == 0:
            count += 1
    if count == 4:
        print(i,sqrt)
        ans += 1

print(ans)


Fixed code:
n = int(input())

ans = 0
sqrt = 1

for i in range(1,n+1,2):
    if i == sqrt*sqrt:
        sqrt += 1
        continue
    elif i > sqrt*sqrt:
        sqrt += 1
    count = 0
    for j in range(1,sqrt,2):
        if i%j == 0:
            count += 1
    if count == 4:
        ans += 1

print(ans)
Buggy code:
def solve(n,i,flg):
    if n%i != 0:
        return flg
    else:
        flg += 1
    return solve(int(n/i),i,flg)
if __name__ == '__main__':

    n = int(input())
    if n < 105:
        print(0)
    
    else:
            
        so = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]
        count = 0
        for k in range(105,n,2):
            
            cnt_list = []
            for j in so:
                cnt = solve(k,j,0)
                cnt_list.append(cnt)
            cnt_list.sort(reverse=True)
            
            if (cnt_list[:4] == [7,0,0,0]) or (cnt_list[:4] == [3,1,0,0]) or (cnt_list[:4] == [1,1,1,0]) :
                count += 1
            else:
                pass
        print(count)

Fixed code:
def solve(n,i,flg):
    if n%i != 0:
        return flg
    else:
        flg += 1
    return solve(int(n/i),i,flg)
if __name__ == '__main__':
    
    n = int(input())
    if n <= 104:
        print(0)
    
    else:
            
        so = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]
        count = 0
        for k in range(104,n+1):
            if k%2 == 1:
                cnt_list = []
                for j in so:
                    cnt = solve(k,j,0)
                    cnt_list.append(cnt)
                cnt_list.sort(reverse=True)
                
                if (cnt_list[0:4] == [7,0,0,0]) or (cnt_list[:4] == [3,1,0,0]) or (cnt_list[:4] == [1,1,1,0]) :
                    count += 1
                
        
        print(count)
Buggy code:
n = int(input())
ans = 0
for i in range(1,n + 1):
  if n % 2 == 0:
    continue
  cnt = 0
  for j in range(1,i + 1):
    if i % j = 0:
      cnt += 1
  if cnt == 8:
    ans += 1
print(ans)

Fixed code:
n = int(input())
ans = 0
for i in range(1,n + 1):
  if i % 2 == 0:
    continue
  cnt = 0
  for j in range(1,i + 1):
    if i % j == 0:
      cnt += 1
  if cnt == 8:
    ans += 1
print(ans)
Buggy code:
n = int(input())
cnt = 0
ans = 0

for i in range(1, n+1):
    for j in range(1, n+1, 2):
        if(i%j == 0):
            cnt += 1
            if(cnt == 8):
                ans += 1
print(ans)

Fixed code:
n = int(input())
ans = 0

for i in range(1, n+1, 2):
    cnt = 0
    for j in range(1, n+1):
        if(i % j == 0):
            cnt += 1
    if(cnt == 8):
        ans += 1

print(ans)
Buggy code:
n = int(input())
lst = [105, 135, 165, 189, 195, 201]
for i in range(6):
    if n < lst(i):
        print(i)
        break

Fixed code:
n = int(input())
lst = [105, 135, 165, 189, 195, 201]
for i in range(6):
    if n < lst[i]:
        print(i)
        break
Buggy code:
¥n = int(input())

if n >= 195:
    print(5)
elif n >= 189:
    print(4)
elif n >= 165:
    print(3)
elif n >= 135:
    print(2)
elif n >= 105:
    print(1)
else:
    print(0)


Fixed code:
n = int(input())

if n >= 195:
    print(5)
elif n >= 189:
    print(4)
elif n >= 165:
    print(3)
elif n >= 135:
    print(2)
elif n >= 105:
    print(1)
else:
    print(0)
Buggy code:
n = int ( input())
ans = 0
test = (3,5,7,11,13)
for i in range ( 105,n+1,2) :
  div = 0
  for d in test :
    if i % d == 0 :
      div += 1
  if div == 3 and i % 9 != 0:
    ans += 1
  elif i %= 27:
    ans += 1
print (ans)

Fixed code:
n = int ( input())
ans = 0
test = (3,5,7,11,13)
for i in range ( 105,n+1,2) :
  div = 0
  for d in test :
    if i % d == 0 :
      div += 1
  if div == 3 and i % 9 != 0:
    ans += 1
  elif i % 27 == 0:
    ans += 1
print (ans)
Buggy code:
n=input()
ans=0
for i in range(1,n):
  cnt=0
  for j in range(1,n):
    if i%j==0:
      cnt=cnt+1
  if cnt==8:
    ans+=1
print(int(ans))

Fixed code:
n=int(input())
ans=0
for i in range(1,n+1):
  if i % 2==0:
    continue
  cnt=0
  for j in range(1,n+1):
    if i%j==0:
      cnt=cnt+1
  if cnt==8:
    ans+=1
print(int(ans))
Buggy code:
N = int(input().strip())

c = 0
for n in range(1, N+1):
  d = 0
  for i in range(1, n+1):
    if i * i > n:
      break
    if n % i == 0:
      d += 1
      if d >= 9:
        break
  if d == 8:
    c += 1

print(c)

Fixed code:
N = int(input().strip())

c = 0
for n in range(1, N+1, 2):
  d = 0
  for i in range(1, n+1):
    if i * i > n:
      break
    if n % i == 0:
      d += 2
      if d >= 9:
        break
  if d == 8:
    c += 1

print(c)
Buggy code:
in_num = int(input())
check_num = 0
ans_counter = 0

while check_num <= in_num:
	i = 1
	div_counter = 0
	while i < check_num /2:
		if check_num % i == 0:
			div_counter += 1
		i += 2
	if div_counter == 8:
		ans_counter += 1

print(ans_counter)






Fixed code:
in_num = int(input())
check_num = 1
ans_counter = 0



while check_num <= in_num:
	i = 1
	div_counter = 0
	while i <= check_num :
		if check_num % i == 0:
			div_counter += 1
		i += 2
	if div_counter == 8:
		ans_counter += 1
	check_num += 2

print(ans_counter)
Buggy code:
N = int(input())

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 len(divisors)
  
ans = 0

for i in range(1,N+1):
  a = make_divisors(i)
  if a ==8:
    ans += 1
    
print(int(ans))

Fixed code:
N = int(input())

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 len(divisors)
  
ans = 0

for i in range(1,N+1):
  a = make_divisors(i)
  if a ==8 and i%2 == 1 :
    ans += 1
    
print(int(ans))
Buggy code:
def divisor(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=int(input())
ans=0
for i in range(2,n):
    num=divisors(i)
    if len(num)==8:
        ans+=1
print(ans)


Fixed code:
def divisor(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=int(input())
ans=0
for i in range(2,n+1):
    num=divisor(i)
    if i%2==1 and len(num)==8:
        ans+=1
print(ans)
Buggy code:
N = int(input())
if N <105:
  print(0)
else:
  for i in range(105,N,2):
    temp=0
    for j in range(3,15,2):
        if i%j==0:
            temp+=1
    if temp==3:
        cnt+=1
print(cnt)

Fixed code:
N = int(input())
cnt=0
if N <105:
  cnt =0
else:
  if N%2==0:
    for i in range(105,N+1,2):
      temp=0
      for j in range(1,N+1,2):
        if i%j==0:
          temp+=1
      if temp==8:
        cnt+=1
  else:
    for i in range(105,N+1,2):
      temp=0
      for j in range(1,N+3,2):
        if i%j==0:
          temp+=1
      if temp==8:
        cnt+=1

print(cnt)
Buggy code:
A=int(input())
ans = 0
for i in range(1,A+1):
    cnt = 0
    for j in range(1,i+1):
        if i % j == 0:
            cnt+=1
    if cnt == 8:
        ans += 1
print(ans)

Fixed code:
A=int(input())
ans = 0
for i in range(1,A+1):
    if i % 2 == 1:
        cnt = 0
        for j in range(1,i+1):
            if i % j == 0:
                cnt+=1
        if cnt == 8:
            ans += 1
print(ans)
Buggy code:
N = int(input())
ans = 0
for i in range(1, N, 2):
    c = 0
    for j in range(1, N+1):
        if i%j==0:
            c += 1
    if c==8:
        ans += 1
print(ans)


Fixed code:
N = int(input())
ans = 0
for i in range(1, N+1, 2):
    c = 0
    for j in range(1, N+1):
        if i%j==0:
            c += 1
    if c==8:
        ans += 1
print(ans)
Buggy code:
N=int(input())

ans=0
for i in range(1,N):
    if i%2 != 0:
        count=0
        for j in range(1,i):
            if i % j ==0:
                count+=1
            else:
                if count==8:
                    ans+=1

print(ans)

Fixed code:
N=int(input())

ans=0
for i in range(1,N+1):
    if i%2 != 0:
        count=0
        for j in range(1,i+1):
            if i % j ==0:
                count+=1
            if count==8:
                    ans+=1

print(ans)
Buggy code:
N=int(input())
def prime(n):
  cnt=0
  for i in range(2,n):
    if n%2==0:
      cnt+=1
    
  return cnt

ans=0
for i in range(1,N+1):
  if i%2==1 and prime(i)==8:
    ans+=1
print(ans)


Fixed code:
N=int(input())
def prime(n):
  cnt=0
  for s in range(1,n+1):
    if n%s==0:
      cnt+=1
    
  return cnt

ans=0
for i in range(1,N+1):
  if i%2==1 and prime(i)==8:
    ans+=1
print(ans)
Buggy code:
n=int(input())
if n<105:
  print(0)
elif n<135:
  print(1)
elif n<165:
  print(2):
elif n<189:
  print(3)
elif n<195:
  print(4)
else:
  print(5)

Fixed code:
n=int(input())
if n<105:
  print(0)
elif n<135:
  print(1)
elif n<165:
  print(2)
elif n<189:
  print(3)
elif n<195:
  print(4)
else:
  print(5)
Buggy code:
N = int(input())

list_yakusuu = []

cnt = 0
for i in range(1,N+1):
  list_yakusuu = []
  if i % 2 == 0:
    continue
    
  for j in range(1,i+1):
    if i % j == 0:
      list_yakusuu.append(j)
  
  if len(list_yakusuu) == 8:
    print(i)
    cnt += 1

print(cnt)

Fixed code:
N = int(input())

list_yakusuu = []

cnt = 0
for i in range(1,N+1):
  list_yakusuu = []
  if i % 2 == 0:
    continue
    
  for j in range(1,i+1):
    if i % j == 0:
      list_yakusuu.append(j)
  
  if len(list_yakusuu) == 8:
    cnt += 1

print(cnt)
Buggy code:
ret = 0
for x in range(11, int(input()) + 1, 2):
    n = 2
    for y in range(2, x // 2 + 1):
        if x % y == 0:
            n += 1
    if n == 8:
        ret += 1
        print(x)
print(ret)

Fixed code:
ret = 0
for x in range(11, int(input()) + 1, 2):
    n = 2
    for y in range(2, x // 2 + 1):
        if x % y == 0:
            n += 1
    if n == 8:
        ret += 1
print(ret)
Buggy code:
N = int(input())
ans = 0
if N<105:
  print(0)
else:
  for i in range(105,N+1,2):
    cnt = 0
    for j in range(1,N+1,2):
      if i%j == 0:
        cnt += 1
        if cnt == 8:
          ans += 1
print(ans)

  

Fixed code:
N = int(input())
ans = 0
if N<105:
  ans = 0
else:
  for i in range(105,N+1,2):
    cnt = 0
    for j in range(1,N+1,2):
      if i%j == 0:
        cnt += 1
        if cnt == 8:
          ans += 1
print(ans)
Buggy code:
N = int(input())

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


for i in range(1,N+1,2):
    if(len(make_divisors(i))==8):
        cnt+=1
        
print(cnt)

Fixed code:
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=int(input())
c=0
for i in range(1,n+1,2):
      if len(make_divisors(i))==8:
            c+=1
print(c)
Buggy code:
N = int(input())
x = []
res = 0
for i in range(3, N+1, 2):
    if len(x) == 0:
        x.append(i)
    else:
        y = i
        z = {}
        flag = True
        while flag:
            flag = False
            for j in x:
                if y % j == 0:
                    y /= j
                    z.setdefault(j, 0)
                    z[j] += 1
                    flag = True
        if y == i:
            x.append(i)
        else:
            yakusu = 1
            for j in z.values():
                yakusu *= j + 1
            if yakusu == 8:
                print(i)
                res += 1
print(res) 

Fixed code:
N = int(input())
x = []
res = 0
for i in range(3, N+1, 2):
    if len(x) == 0:
        x.append(i)
    else:
        y = i
        z = {}
        flag = True
        while flag:
            flag = False
            for j in x:
                if y % j == 0:
                    y /= j
                    z.setdefault(j, 0)
                    z[j] += 1
                    flag = True
        if y == i:
            x.append(i)
        else:
            yakusu = 1
            for j in z.values():
                yakusu *= j + 1
            if yakusu == 8:
                res += 1
print(res)
Buggy code:
n = int(input())

con = 0
ans = 0

for j in range(1,n+1):
    for i in range(1,n+1):
        if j % i == 0:
            con += 1
            if con == 8:
                ans += 1

print(ans)

Fixed code:
n = int(input())

ans = 0

for i in range(1,n+1,2):
    con =0
    for j in range(1,i+1):
        if i % j == 0:
            con += 1
        if con == 8:
            ans += 1

print(ans)
Buggy code:
import math

def countDividers(n):
    divisors = []
    for i in range(1, int(math.sqrt(n))):
        if n % i == 0:
            divisors.append(i)
            divisors.append(int(n/i))
    return len(divisors)

if __name__ == '__main__':
    n = int(input())
    count = 0
    for i in range(1,n+1):
      if countDividers(i) == 8:
        count += 1
    print(count)

Fixed code:
import math

def countDividers(n):
    divisors = []
    for i in range(1, int(math.sqrt(n))+1):
        if n % i == 0:
            divisors.append(i)
            divisors.append(int(n/i))
    return len(divisors)


if __name__ == '__main__':
    n = int(input())
    count = 0
    for i in range(1,n+1):
        if i %2 ==1 and countDividers(i) == 8:
            count += 1
           
    print(count)
Buggy code:
n=int(input())
ans=0
for i in range(1,n+2,2):
  for k in range(1,i+1):
    x=0
    if i%k==0:
      x+=1
  if x==8:
    ans+=1
print(ans)

Fixed code:
n=int(input())
ans=0
if n%2==1:
  for i in range(1,n+2,2):
    x=0
    for k in range(1,i+1):
      if i%k==0:
        x+=1
    if x==8:
      ans+=1
else:
  for i in range(1,n+1,2):
    x=0
    for k in range(1,i+1):
      if i%k==0:
        x+=1
    if x==8:
      ans+=1
print(ans)
Buggy code:
n = int(input())

ans = 0
for i in range(1, n+1):
    tmp = 0
    for j in range(1, i/2+1):
        if n % j == 0:
            tep += 1

    if tmp == 8:
        ans += 1

print(ans)

Fixed code:
n = int(input())

ans = 0
for i in range(1, n+1, 2):
    tmp = 0
    for j in range(1, n+1):
        if i % j == 0:
            tmp += 1

    if tmp == 8:
        ans += 1

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

def divisor(n):
  i = 2
  count = 0
  divs = []
  while n != 1:
    if n % i:
      divs.append(count)
      count = 0
      i+= 1
    else:
      n = n //i
      count += 1
  ans = 1
  for d in divs:
    ans *= d + 1
  return ans

count = 0
for i in range(1,n+1,2):
  if divisor(i) == 8:
    count += 1
print(count)

Fixed code:
n = int(input())

def divisor(n):
  i = 2
  count = 0
  divs = []
  while n != 1:
    if n % i:
      if count :
        divs.append(count)
        count = 0
      i+= 1
    else:
      n = n //i
      count += 1
      if n == 1:
        divs.append(count)
  ans = 1
  for d in divs:
    ans *= (d + 1)
  return ans

count = 0
for i in range(1,n+1,2):
  if divisor(i) == 8:
    count += 1
print(count)
Buggy code:
n = int(input())
cnt = 0
for i in range(1,n+1):
  num8 = 0
  for j in range(1,n+1):
    if i%j == 0:
      num8 +=1
  if num8 == 8:
    cnt +=1
print(cnt)

Fixed code:
n = int(input())
cnt = 0
for i in range(1,n+1,2):
  num8 = 0
  for j in range(1,n+1):
    if i%j == 0:
      num8 +=1
  if num8 == 8:
    cnt +=1
print(cnt)
Buggy code:

N = int(input())

if N => 195:
    print("4")
elif N => 165:
    print("3")
elif N => 135:
    print("2")
elif N => 105:
    print("1")
else:
    print("0")

Fixed code:
N = int(input())

if N >= 195:
    print("5")
elif N >= 189:
    print("4")
elif N >= 165:
    print("3")
elif N >= 135:
    print("2")
elif N >= 105:
    print("1")
else:
    print("0")
Buggy code:
from math import floor, sqrt

N = int(input())
ans = 0
for o in range(1, N + 1, 2):
	cnt = 0
    for n in range(1, 1 + floor(sqrt(o))):
    	if o % n == 0:
            cnt += 2
    if cnt == 8:
      ans += 1
print(ans)
        

Fixed code:
from math import floor, sqrt
 
N = int(input())
ans = 0
for o in range(1, N + 1, 2):
    cnt = 0
    for n in range(1, 1 + floor(sqrt(o))):
    	if o % n == 0:
            cnt += 2
    if cnt == 8:
        ans += 1
print(ans)
Buggy code:
N = int(input())

ans = 0

for i in range(1, N+1):
    cnt = 0
    for j in range(1, i):
        if i % j == 0:
            cnt += 1
    
    if cnt == 8:
        ans += 1

print(ans)

Fixed code:
N = int(input())

ans = 0

for i in range(1, N+1):
    if i % 2 == 1:
        cnt = 0
        for j in range(1, i+1):
            if i % j == 0:
                cnt += 1
        
        if cnt == 8:
            ans += 1

print(ans)
Buggy code:
n = int(input())
ans = []

for i in range(1, n+1):
    cnt = 0
    for j in range(1, i):
        if i % 2 == 1 and i % j == 0:
            cnt += 1
    if cnt == 8:
        ans.append(i)

print(len(ans))

Fixed code:
n = int(input())
ans = []

for i in range(1, n+1):
    cnt = 0
    for j in range(1, i+1):
        if i % 2 == 1 and i % j == 0:
            cnt += 1
    if cnt == 8:
        ans.append(i)

print(len(ans))
Buggy code:
n = int(input())

ret = 0


for j in range(1,n+1):
    cnt = 0
    if j % 2 = 1:
        for i in range(1,j+1):
            if n % i == 0:
               cnt += 1
    if cnt == 8:
        ret += 1
print(ret)

Fixed code:
n = int(input())
cnt = 0
for i in range(1,n+1,2):
    tmp = 0
    for j in range(1,i+1):
        if i%j==0:
            tmp += 1
    if tmp == 8 :
        cnt += 1
print(cnt)
Buggy code:
A=int(input())

answer=0
if A<=104:
  print(0)
else:
  for i in range(105,A+1,2):
    count=0
    for j in range(1,i+1):
      if i%j==0:
        count+=1
    if count==8:
      answer+=1
print(answer)

Fixed code:
A=int(input())

answer=0
if A<=104:
  print(0)
  exit()
else:
  for i in range(105,A+1,2):
    count=0
    for j in range(1,i+1):
      if i%j==0:
        count+=1
    if count==8:
      answer+=1
print(answer)