qyliang/CodeNanoFix huggingface dataset:
Buggy code:
def countFactors(n):
  count = 0
  for i in range(1, n + 1):
    if n % i == 0:
      count += 1
  return count

X = int(input())

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

print(count)


Fixed code:
def countFactors(n):
  count = 0
  for i in range(1, n + 1):
    if n % i == 0:
      count += 1
  return count

X = int(input())

count = 0
for i in range(1, X + 1, 2):
  if countFactors(i) == 8:
    count += 1

print(count)
Buggy code:
N = int(input())
ans = 0
for i in range(1, N+1, 2):
  cnt = 0
  for j in range(1, i+1, 2):
    if i%j == 0:
      cnt += 1
  if cnt%2 == 0:
    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, 2):
    if i%j == 0:
      cnt += 1
  if cnt == 8:
    ans += 1
print(ans)
Buggy code:
def hantei(n):
    root_n = int(n**0.5 +0.5)
    
    if root_n**2 == n:
        return 0
    
    total = 0
    for i in range(1,root_n):
        if n % i == 0:
            total += 2
            
    return total
    
n = int(input())

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

print(total)

Fixed code:
def hantei(n):
    root_n = int(n**0.5 +0.5)
    
    if root_n**2 == n:
        return 0
    
    total = 0
    for i in range(1,root_n):
        if n % i == 0:
            total += 2
            
    return total
    
n = int(input())

total = 0
for i in range(1,n+1,2):
    if hantei(i) == 8:
        total += 1

print(total)
Buggy code:
import math
N = int(input())
cnt = 0
for j in range(1, N+1, 2):
    ans = []
    for i in range(1, math.ceil(j**0.5)+1):
        if j%i == 0:
            if j//i == i:
                ans.append(i)
            else:
                ans.append(i)
                ans.append(j//i)
    if len(ans) == 8:
        cnt += 1
    print(ans)
    ans = []
print(cnt)

Fixed code:
import math
N = int(input())
cnt = 0
for j in range(1, N+1, 2):
    ans = []
    for i in range(1, math.ceil(j**0.5)+1):
        if j%i == 0:
            if j//i == i:
                ans.append(i)
            else:
                ans.append(i)
                ans.append(j//i)
    if len(ans) == 8:
        cnt += 1
    ans = []
print(cnt)
Buggy code:
n=int(input())
ans=0
count=0
for i in range(n+1): 
  for j in range(1,i+1):    
    if n%i==0:
      ans+=1
  if ans==8 and j%2==1:
    count+=1
print(count)

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

res = 0
for i in range(8,n+1,2):
    yakusu = 0
    for j in range(2,int(i/2)+1):
        if(i % j == 0):
            yakusu +=1
    if(yakusu == 8):
        res += 1

print(res)

Fixed code:
n = int(input())

res = 0
for i in range(9, n+1, 2):
    yakusu = 0
    for j in range(1, i+1):
        if i % j == 0:
            yakusu += 1
    if yakusu == 8:
        res += 1

print(res)
Buggy code:
from collections import defaultdict
N = int(input())
ans = 0
for i in range(N + 1):
  if i % 2 == 0:
    continue
  t, j, dic, r = i, 2, defaultdict(int), 1
  while True:
    while t % j == 0:
      t /= j
      dic[j] += 1
    if j * j > i:
      break
  if t > 1:
    dic[t] += 1
  for key in dic:
    r *= dic[key] + 1
  if r == 8:
    ans += 1
print(ans)

Fixed code:
from collections import defaultdict
N = int(input())
ans = 0
for i in range(N + 1):
  if i % 2 == 0:
    continue
  t, j, dic, r = i, 2, defaultdict(int), 1
  while True:
    while t % j == 0:
      t /= j
      dic[j] += 1
    j += 1
    if j * j > i:
      break
  if t > 1:
    dic[t] += 1
  for key in dic:
    r *= dic[key] + 1
  if r == 8:
    ans += 1
print(ans)
Buggy code:
import sys

def resolve():
    N = int(input())
    cnt = 0
    for i in range(1, N, 2):
        if is_8_factors(i):
            cnt += 1
    print(cnt)

def is_8_factors(n):
    nfactors = 2
    upper = n
    div = 3
    while True:
        if upper <= div:
            break
        if n % div == 0:
            nfactors += 2
            upper = n // div
        div += 2

    return True if nfactors == 8 else False

if '__main__' == __name__:
    resolve()

Fixed code:
import sys

def resolve():
    N = int(input())
    cnt = 0
    for i in range(1, N+1, 2):
        if is_8_factors(i):
            cnt += 1
    print(cnt)

def is_8_factors(n):
    nfactors = 2
    upper = n
    div = 3
    while True:
        if upper <= div:
            break
        if n % div == 0:
            nfactors += 2
            upper = n // div
        div += 2

    return True if nfactors == 8 else False

if '__main__' == __name__:
    resolve()
Buggy code:
a = input()
ans = 0
if a >= 105:
    ans+=1
if a >= 135:
    ans+=1
if a >= 165:
    ans+=1
if a >= 189:
    ans+=1
if a >= 195:
    ans+=1
print(ans)

Fixed code:
a = int(input())
ans = 0
if a >= 105:
    ans+=1
if a >= 135:
    ans+=1
if a >= 165:
    ans+=1
if a >= 189:
    ans+=1
if a >= 195:
    ans+=1
print(ans)
Buggy code:
for i in range(1, n+1):
    if i % 2 == 1:
        count = 0
        for j in range(1, i+1):
            if i % j == 0:
                count += 1
            else:
                continue
        if count == 8:
            ans += 1
print(ans)

Fixed code:
n = int(input())
count = 0
ans = 0
for i in range(1, n+1):
    if i % 2 == 1:
        count = 0
        for j in range(1, i+1):
            if i % j == 0:
                count += 1
        if count == 8:
            ans += 1
        else:
            continue
    else:
        continue
print(ans)
Buggy code:
from math import sqrt
N = int(input())
ans = 0
for i in range(7, N+1):
  if i%2==0:
    continue
  c = 0
  for j in range(1, int(sqrt(i))+1):
    if i%j==0:
      c+=2
  if c==8:
    ans += 1
    print(i)
print(ans)

Fixed code:
from math import sqrt
N = int(input())
ans = 0
for i in range(7, N+1):
  if i%2==0:
    continue
  c = 0
  for j in range(1, int(sqrt(i))+1):
    if i%j==0:
      if i//j==j:
        c+=1
      else:
        c+=2
  if c==8:
    ans += 1
print(ans)
Buggy code:
def num_divisors(n):
  res = 0
  i = 2
  while i * i <= n:
    if n % i == 0:
      res += 1
      res += 1 if i * i != n else 0
    i += 1
  return res


N = input()
res = 0
for n in range(1, N + 1):
  if num_divisors(n) == 8:
    res += 1
print(res)


Fixed code:
def num_divisors(n):
  res = 0
  i = 1
  while i * i <= n:
    if n % i == 0:
      res += 1
      res += 1 if i * i != n else 0
    i += 1
  return res


N = int(input())
res = 0
for n in range(1, N + 1, 2):
  if num_divisors(n) == 8:
    res += 1
print(res)
Buggy code:
N = int(input())

if N < 105:
    print (0)
else:
    if N < 135:
        print (1)
        if N < 165:
            print (2)
        else:
            if N < 195:
                print (3)
            else:
                print (4)

Fixed code:
N = int(input())

if N < 105:
    print (0)
else:
    if N < 135:
        print (1)
    else:
        if N < 165:
            print (2)
        else:
            if N < 189:
                print (3)
            else:
                if N < 195:
                    print (4)
                else:
                    print (5)
Buggy code:
N=int(input())
num=0
for j in range(1,N+1,2):
  cnt=0
    for i in range(1,j+1):
#        print(i)
#        print(j)
        if j%i==0 :
            cnt=cnt+1
    if cnt==8 :
#        print(cnt)
        num+=1
#    print("---")
print(num)


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

Fixed code:
n = int(input())
ans = 0
c = 0
for i in range(1,n+1):
    if i%2 == 0:
        c = 0
    else:
        for j in range(1,i+1):
            if i%j == 0:
                c += 1
    if c == 8:
        ans += 1
print(ans)
Buggy code:
import math
import copy
from copy import deepcopy
import sys
import fractions
# import numpy as np
from functools import reduce
# import statistics
import decimal
import heapq
import collections
import itertools
from operator import mul

sys.setrecursionlimit(100001)


# input = sys.stdin.readline
# sys.setrecursionlimit(10**6)

# ===FUNCTION===

def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList


# ===CODE===

n = int(input())

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

    if tmp == 8:
        ans += 1

print(ans)


Fixed code:
import math
import copy
from copy import deepcopy
import sys
import fractions
# import numpy as np
from functools import reduce
# import statistics
import decimal
import heapq
import collections
import itertools
from operator import mul

sys.setrecursionlimit(100001)


# input = sys.stdin.readline
# sys.setrecursionlimit(10**6)

# ===FUNCTION===

def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList


# ===CODE===

n = int(input())

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

    if tmp == 8:
        ans += 1

print(ans)
Buggy code:
N = int(input())
ans = 0
for i in range(1,N,2):
    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):
    count=0
    for j in range(1,N+1,2):
        if i%j == 0:
            count +=1
        
    if count == 8:
        
        ans +=1

print(ans)
Buggy code:
N = int(input())
c = 0
for  i in range(1,N+1):
  li = []
  if i < 10:
    continue
  else:
    k = i
    for j in range(2,int(i**(0.5)+1)):
      d = 1
      while k % j == 0:
        k = k/j
        d += 1
      if d != 1:
        li.append(d)
    ss = 1
    for x in li:
      ss *= x
    if ss == 8:
      c += 1
    
print(c)


Fixed code:
N = int(input())
c = 0
for  i in range(1,N+1):
  if i % 2 == 0:
    continue
  li = []
  if i < 10:
    continue
  else:
    k = i
    for j in range(2,int(i**(0.5)+3)):
      d = 1
      while k % j == 0:
        k = k/j
        d += 1
      if d != 1:
        li.append(d)
    ss = 1
    for x in li:
      ss *= x
    if ss == 8:
      #print(i)
      c += 1
    
print(c)
Buggy code:
n = int(input())
total, count = 0,0
for i in range(1, n+1, 2):
    for j in range(1, i+1):
        if i % j == 0:
            count += 1
    print(count)
    if count == 8:
        total += 1
    count = 0
print(total)




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


Fixed code:
n=int(input())
ans=0
for i in range(1,n+1):
    c=0
    for j in range(1,i+1):
        if i%j==0 and i%2==1:
            c+=1
    if c==8:
        ans+=1
print(ans)
Buggy code:
from sys import stdin
N = int(stdin.readline().rstrip())

count = 0
if N < 105:
    pass
else:
    for i in range(105, N+1):
        if i % 2 == 0:
            pass
        else:
            divisor = 0
            for j in range(1, i+1):
                if i % j == 0:
                    divisor += 1
            if divisor == 8:
                print(i)
                count += 1
print(count)


Fixed code:
from sys import stdin
N = int(stdin.readline().rstrip())

count = 0
if N < 105:
    pass
else:
    for i in range(105, N+1):
        if i % 2 == 0:
            pass
        else:
            divisor = 0
            for j in range(1, i+1):
                if i % j == 0:
                    divisor += 1
            if divisor == 8:
                count += 1
print(count)
Buggy code:
N = int(input())
k = [i for i in range(1,N,2)]
ans = 0
for i in k:
    count = 0
    for j in k:
        if i % j == 0:
            count += 1
    if count == 8:
        ans += 1
print(ans)

Fixed code:
N = int(input())
k = [i for i in range(1,N+1,2)]
ans = 0
for i in k:
    count = 0
    for j in k:
        if i % j == 0:
            count += 1
    if count == 8:
        ans += 1
print(ans)
Buggy code:
n=int(input())
p=[3,5,7,11,13]
x=[]
for i in range(5):
	for j in range(i):
		for k in range(j):
			if n >= p[i]*p[j]*p[k]:
				x.append(i*j*k)
cnt=len(x)
if  135 <= n <189:
	cnt += 1
elif   n  <= 189:
	cnt += 2
else:
	pass
print(cnt)

Fixed code:
n=int(input())
p=[3,5,7,11,13]
x=[]
for i in range(5):
	for j in range(i):
		for k in range(j):
			if n >= p[i]*p[j]*p[k]:
				x.append(i*j*k)
cnt=len(x)
if 135 <= n < 189:
	cnt += 1
elif 189 <= n:
	cnt += 2
else:
	pass
print(cnt)
Buggy 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:
        print(i)
        ans += 1
print(ans)



Fixed code:
n = int(input())

ans = 0

for i in range(1, n+1):
    if i % 2 == 0:
        continue
    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())

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


Fixed code:
n=int(input())
ans=0
for i in range(1,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
for i in range(1,N+1):
    a = 0
    if i%2 == 1:    
        for j in range(1,i+1):
            if i%j == 0:
                a += 1
        if a == 8:
            ans += 1
            print(i)
print(ans)

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

def make_divisors(n):
    ans = 0
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            ans += 1
            if i != n // i:
                ans += 1
    return ans

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

print(ans)

Fixed code:
N = int(input())

def make_divisors(n):
    ans = 0
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            ans += 1
            if i != n // i:
                ans += 1
    return ans

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

print(ans)
Buggy code:
n = int(input())
yaku=[]
ans=0
for j in range(1, n+1)[::2]:
    for i in range(1, i+1):
        if j%i==0:
            yaku.append(i)
    if len(yaku)==8:
        ans+=1
print(ans)
    

Fixed code:
n = int(input())
yaku=[]
ans=0
for j in range(1, n+1)[::2]:
    yaku=[]
    for i in range(1, j+1):
        if j%i==0:
            yaku.append(i)
    if len(yaku)==8:
        ans+=1
print(ans)
Buggy code:
import sys

N = float(input())
t = 3
prime_number = []
while t <= N / 15.0:
    l = []
    for i in range(t+1):
        if i != 0:
            if t % i == 0:
                l.append(i)
    if l == [1, t]:
        prime_number.append(t)
    t += 1
n = len(prime_number)
ans = 0
if n < 3:
    print(0)
    sys.exit()
else:
    for i in prime_number:
        for j in prime_number:
            if j != i:
                for k in prime_number:
                    if k != i and k != j:
                        if i * j * k <= N:
                            ans += 1
ans = ans / 6
print(ans)
if N >= 189:
    ans += 2
elif N >= 135:
    ans += 1
print(int(ans))


Fixed code:
import sys

N = float(input())
t = 3
prime_number = []
while t <= N / 15.0:
    l = []
    for i in range(t+1):
        if i != 0:
            if t % i == 0:
                l.append(i)
    if l == [1, t]:
        prime_number.append(t)
    t += 1
n = len(prime_number)
ans = 0
if n < 3:
    print(0)
    sys.exit()
else:
    for i in prime_number:
        for j in prime_number:
            if j != i:
                for k in prime_number:
                    if k != i and k != j:
                        if i * j * k <= N:
                            ans += 1
ans = ans / 6
if N >= 189:
    ans += 2
elif N >= 135:
    ans += 1
print(int(ans))
Buggy code:
def make_divisors(n):
    ans=0
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            ans+=1
            if i != n // i:
                ans+=1
    return ans

n=input()
ans=0
for i in range(1,n+1):
    if make_divisors(i)==8:
        ans+=1
print(ans)

Fixed code:
def make_divisors(n):
    ans=0
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            ans+=1
            if i != n // i:
                ans+=1
    return ans

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

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

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

count = 0
for i in range(1,n+1):
  temp_count = 0
  for j in range(1,i+1):
    if i%j == 0:
      temp_count += 1
  if temp_count == 8:
    count += 1
    
print(count)
    



Fixed code:
n = int(input())

count = 0
for i in range(1,n+1):
  temp_count = 0
  if i%2 == 0:
    continue
  for j in range(1,i+1):
    if i%j == 0:
      temp_count += 1
  if temp_count == 8:
    count += 1
    
print(count)
Buggy code:
# ABC106B - 105
n = int(input())
odd = []
odd_divs = []

for i in range(1, n + 1):
    if i % 2 == 1:
        odd.append(i)
        
print(odd)
for i in range(len(odd)):
    count = 0
    for j in range(1, odd[i] + 1):
        if odd[i] % j == 0:
            count += 1            
    odd_divs.append(count)
    
print(odd_divs.count(8))

Fixed code:
# ABC106B - 105
n = int(input())
odd = []
odd_divs = []

for i in range(1, n + 1):
    if i % 2 == 1:
        odd.append(i)
        
for i in range(len(odd)):
    count = 0
    for j in range(1, odd[i] + 1):
        if odd[i] % j == 0:
            count += 1            
    odd_divs.append(count)
    
print(odd_divs.count(8))
Buggy code:
N = int(input())						# 5


ans=0
for j in range(1,N+1):
	count=0
	for i in range(1, j+1):
		if (j/i)==(j//i):
			count+=1
	else:
		if(count==8): 
			ans+=1
#			print(j, end=',')
#print()
print(ans)

Fixed code:
N = int(input())						# 5


ans=0
for j in range(1,N+1, 2):
	count=0
	for i in range(1, j+1):
		if (j/i)==(j//i):
			count+=1
	else:
		if(count==8): 
			ans+=1
#			print(j, end=',')
#print()
print(ans)
Buggy code:
n = int(input())

def solve(num):
    cnt = 0
    for i in range(1,num+1):
        if num % i == 0:
            cnt += 1
    return cnt

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

print(ans

Fixed code:
n = int(input())

def solve(num):
    cnt = 0
    for i in range(1,num+1):
        if num % i == 0:
            cnt += 1
    return cnt

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

print(ans)
Buggy code:
n = inpt(input())
ans = 0
for i in range(1, n+1):
  stock = 0
  for j in range(1, n+1):
    if i % j == 0:
      stock += 1
  if stock == 8 and i % 2:
    ans += 1
print(ans)

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

for i in range(1, N):
  if i%2!=0:
    c=0
    for j in range(1,i):
      if i%j==0:
        c+=1
    if c==8:
      a+-1
      
print(a)

Fixed code:
N=int(input())
a=0
 
for i in range(1, N+1):
  if i%2!=0:
    c=0
    for j in range(1,i+1):
      if i%j==0:
        c+=1
    if c==8:
      a+=1
      
print(a)
Buggy 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()) 


l = list(range(n + 1))[1::2]

num = 0
for i in l:
    if len(make_divisors(i)) == 8:
        print(i)
        num += 1

print(num)

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


l = list(range(n + 1))[1::2]

num = 0
for i in l:
    if len(make_divisors(i)) == 8:
        num += 1

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

x=0
for i in range(1,N+1,2):
    y=0
    for j in range(i//2):
        if i % (j+1) == 0:
            y+=1
    if y+1 == 8:
        x+=1
    print(i,y+1)

Fixed code:
N=int(input())

x=0
for i in range(1,N+1,2):
    y=0
    for j in range(i//2):
        if i % (j+1) == 0:
            y+=1
    if y+1 == 8:
        x+=1

print(x)
Buggy code:
N=int(input())
odds = [i*2+1 for i in range(100)]
cnt=0
for odd in odds:
  if odd==105: print(odd)
  if odd>N:
    break
  temp_cnt=0
  for lil_odd in odds:
    if odd==105: print("lil_odd :",lil_odd)
    if lil_odd>odd:
      if temp_cnt==8:
        cnt+=1
      break
    if odd%lil_odd==0:
      if odd==105: print("True")
      temp_cnt+=1
  if odd==105: print("temp_cnt :",temp_cnt)
print(cnt)

Fixed code:
N=int(input())
odds = [i*2+1 for i in range(100)]
cnt=0
for odd in odds:
  #if odd==105: print(odd)
  if odd>N:
    break
  temp_cnt=0
  for lil_odd in odds:
    #if odd==105: print("lil_odd :",lil_odd)
    if lil_odd>odd:
      if temp_cnt==8:
        cnt+=1
      break
    if odd%lil_odd==0:
      #if odd==105: print("True")
      temp_cnt+=1
  #if odd==105: print("temp_cnt :",temp_cnt)
print(cnt)