Problem:
 Score: 200 points    Problem Statement  The number 105 is quite special - it is odd but still it has eight divisors.
Now, your task is this: how many odd numbers with exactly eight positive divisors are there between 1 and N (inclusive)?      Constraints   N is an integer between 1 and 200 (inclusive).         Input  Input is given from Standard Input in the following format:  N       Output  Print the count.        Sample Input 1 105      Sample Output 1 1  Among the numbers between 1 and 105 , the only number that is odd and has exactly eight divisors is 105 .       Sample Input 2 7      Sample Output 2 0  1 has one divisor. 3 , 5 and 7 are all prime and have two divisors. Thus, there is no number that satisfies the condition.

Solution (Python):
n = int(input())
c = 0

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

for i in range(1, n + 1, 2):
    if (len(divisors(i)) == 8):
        c += 1
print(c)

Solution (Python):
N=int(input())
ans = 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:
        ans += 1
print(ans)

Solution (Python):
def main():
    n = int(input())
    ans = [0] * 201
    cnt = 0
    a = [0] * 201

    for i in range(1,n+1):
        if i % 2 == 0:
            a[i] = a[i-1]
        else:
            cnt = 0
            for j in range(1,i+1):
                if i % j == 0:
                    cnt += 1
            if cnt == 8:
                a[i] = a[i-1] + 1
            else:
                a[i] = a[i-1]

    print(a[n])



if __name__=='__main__':
    main()

Solution (Python):
N = int(input())


def f(x):
    c = 0
    for i in range(1, int(x**.5)+1):
        if x%i==0:
            c += 1 if i*i==x else 2
    return c

c = 0
for i in range(1, N+1, 2):
    if f(i)==8:
        c += 1

print(c)

Solution (Python):
N=int(input())
ans=0
for i in range(1,N+1):
    count=0
    if (i%2==1):
        for j in range(1,N+1):
            if i%j==0:
                count+=1
        if count==8:
            ans+=1
print(ans)

Solution (Python):
def divisors(n):
    res = []
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0:
            res.append(i)
            if i != n // i:
                res.append(n // i)
    return len(res)
    
arr = [0, 0] + [1 if divisors(i) == 8 and i % 2 else 0 for i in range(2, 201)]
N = int(input())

print(sum(arr[: N + 1]))

Solution (Python):


N = int(input())

ans = 0

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

print(ans)

Solution (Python):
n=int(input())
c=0
for i in range(1,n+1,2):
  if i%(i**0.5)==0:
    continue
  t=0
  for j in range(1,i+1):
    if i%j==0:
      t+=1
  c+=(t==8)
print(c)

Solution (Python):
n = int(input())

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

print(ans)

Solution (Python):
import math
N = int(input())
ans = 0
for i in range(1,N+1):
	if i % 2 == 0:
		continue
	q = set()
	d = math.floor(i**(1/2))
	for j in range(1,d+1):
		if i % j == 0:
			q.add(j)
			q.add(i//j)

	if len(q) == 8:
		ans += 1

print(ans)

Solution (Python):
n = int(input())

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

Solution (Python):
N = int(input())
ans = 0
for n in range(1,N+1,2):
    d = set()
    m = 1
    while m*m <= n:
        if n%m==0:
            d.add(m)
            d.add(n//m)
        m += 1
    if len(d)==8:
        ans += 1
print(ans)

Solution (Python):


N = int(input())

has8 = [0] * 201
for num in range(1,201):
    cnt = 0
    if num % 2 == 1:
        for m in range(1,num+1):
            if num % m == 0:
                cnt += 1
        if cnt == 8:
            has8[num] = 1

total = [0] * 201
for i in range(1,201):
    total[i] = total[i-1] + has8[i]

print(total[N])

Solution (Python):

import itertools
def yakusu(x):
    wareru=[]
    for i in range(1,x+1):
        if x%i==0:
            wareru.append(i)
    num=len(wareru)
    return num

n=int(input())
ans=0
for i in range(1,n+1):
    if i%2==0:
        continue
    if yakusu(i)==8:
        ans+=1
print(ans)

Solution (Python):
n=int(input())
ans=0
for i in range(1,n+1,2):
  a=0
  for j in range(1,i+1):
    if i%j==0:
      a=a+1
  if a==8:
    ans=ans+1
print(ans)

Solution (Python):
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


def solve():
    N = int(input())
    
    ans = 0
    for i in range(1, N + 1, 2):
        divisors = make_divisors(i)
        if len(divisors) == 8:
            ans += 1
    print(ans)


if __name__ == '__main__':
    solve()

Solution (Python):

import sys


def solve(N: int):

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


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



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  
    solve(N)


if __name__ == "__main__":
    main()

Solution (Python):
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)

Solution (Python):
def main():
    N = int(input())
    result = 0
    for n in range(105, N + 1, 2):
        cnt = 0
        for i in range(1,200):
            if n % i == 0:
                cnt += 1
            if n < i or cnt > 8:
                break
        if cnt == 8:
            result += 1
    print(result)


if __name__ == '__main__':
    main()

Solution (Python):
import math
N = int(input())
ans = 0
for m in range(1,N+1,2):
    P = set([1,m])
    for k in range(2,math.floor(math.sqrt(m))+1):
        if m % k == 0:
            P.add(k)
            P.add(m//k)
    if len(P) == 8:
        ans += 1
print(ans)

Solution (Python):
n = int(input())
ans = 0
for x in range(1, n + 1, 2):
    res = 0
    for y in range(1, n + 1):
        if x % y == 0:
            res += 1
    if res == 8:
        ans += 1
print(ans)

Solution (Python):
N = int(input())



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 len(table)
  
i = 1
answer = 0
while i <= N:
  if divisor(i) == 8:
    answer += 1
  i += 2
print(answer)

Solution (Python):
n = int(input())

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

Solution (Python):
n = int(input())
num = 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:
            num += 1
print(num)

Solution (Python):
N = int(input())
def divisor(n):
    ans = []
    for i in range(1,int(n**0.5)+1):
        if n%i==0:
            ans.append(i)
            if n//i != i:
                ans.append(n//i)
    return len(ans)
ans = 0
for i in range(1,N+1,2):
    if divisor(i) == 8:
        ans += 1
print(ans)

Solution (Python):
n = int(input())
ans = 0
for j in range(1,n+1,2):
    cnt = 0
    for k in range(1,n+1):
        if j%k == 0:
            cnt += 1
    if cnt == 8:
        ans += 1
print(ans)

Solution (Python):

N=int(input())
cnt=0
for x in range(1,N+1,2):
    tmp=0
    for i in range(1,x+1):
        if x%i==0:
            tmp+=1
    if tmp==8:
        cnt+=1
print(cnt)

Solution (Python):
N = int(input())


def func(x):
    if x % 2 == 0:
        return 0

    cnt = 0
    for i in range(1, x + 1):
        if x % i == 0:
            cnt += 1
    if cnt == 8:
        return 1
    else:
        return 0


ans = 0
for i in range(1, N + 1):
    ans += func(i)

print(ans)

Solution (Python):


N = int(input())

ans = 0
for i in range(1, 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)

Solution (Python):
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)

Solution (Python):
n = int(input())

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

print(ans)

Solution (Python):
n=int(input())
j=1
a=0
while j<=n:
  d=0
  for i in range(1,j+1):
    if j%i==0:
      d+=1
  if d==8:
    a+=1
  j+=2
print(a)

Solution (Python):
N = int(input())

ans = 0

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

Solution (Python):
N=int(input())
c=[]
v=0
for i in range(1,N+1):
  c=[]
  if i%2!=0:
    for j in range(1,i+1):
      if i%j==0:
        c.append(j)
        if len(c)==8:
          v+=1
print(v)

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

Solution (Python):
import math
n = int(input())

ans = 0
if n < 105:
    print(0)
else:
    for i in range(105, n +1, 2):
        div = []
        for j in range(1, int(math.sqrt(i**2) + 1)):
            if i % j == 0:
                div.append(j)
                if j != i // j:
                    div.append(i //j)
        if len(div) // 2 == 8:
            ans += 1
    print(ans)

Solution (Python):
import math
n = int(input())

ans = 0
if n < 105:
    print(0)
else:
    for i in range(105, n +1):
        if i % 2 == 0:
            continue
        div = []
        for j in range(1, int(math.sqrt(i**2) + 1)):
            if i % j == 0:
                div.append(j)
                if j != i // j:
                    div.append(i //j)
        if len(div) // 2 == 8:
            ans += 1
    print(ans)

Solution (Python):
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)

Solution (Python):
N = int(input())

odd = []
for i in range(N+1):
    if i % 2 == 1:
        odd.append(i)


ans_odd = []
for i in odd:
    cnt = 0
    for j in range(1, N+1):
        if i % j == 0:
            cnt += 1
    if cnt == 8:
        ans_odd.append(i)

print(len(ans_odd))

Solution (Python):
import sys

read = sys.stdin.buffer.read
input = sys.stdin.buffer.readline
inputs = sys.stdin.buffer.readlines






def main():
	n=int(input())
	ans=0
	if n>=105:
		ans+=1
	if n>=135:
		ans+=1
	if n>=165:
		ans+=1
	if n>=189:
		ans+=1
	if n>=195:
		ans+=1
	
	print(ans)
	
	
if __name__ == "__main__":
	main()

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

Solution (Python):
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)

Solution (Python):
def divisor(n):
    lists=[]
    for i in range(1,n+1):
        if n%i==0:
            lists.append(i)
    return len(lists)

N=int(input())
cnt=0
for i in range(1,N+1):
    if i%2 != 0 and divisor(i)==8:
        cnt+=1
print(cnt)

Solution (Python):
n = int(input())
nl = map(int, (i for i in range(1, n + 1, 2)))
ans = 0


def eight(num):
    i = 1
    cnt = 0
    while i <= num:
        if num % i == 0:
            cnt += 1
        i += 1
    if cnt == 8:
        return 1
    else:
        return 0


for i in nl:
    ans += eight(i)

print(ans)

Solution (Python):
from math import sqrt

n = int(input())

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

Solution (Python):
N=int(input())
ans = 0
for i in range(1,N+1,2):
  nn = i
  c = 0
  s = 1
  d = []
  while s*s <= i:
    if nn%s == 0:
      d.append(s)
      c += 1
      if nn != s:
        d.append(nn//s)
        c += 1
    s += 1
  if c == 8:
    ans += 1

print(ans)

Solution (Python):
N=int(input())
count=0
for i in range(105,N+1,2):
    divisor=0
    for j in range(1,i+1):
        if(i%j==0):divisor+=1
    if(divisor==8):count+=1
print(count)

Solution (Python):




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


def main():
    N = int(input())
    print(sum(divisible_count(x) == 8 for x in range(1, N + 1, 2)))


if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
l = []
for i in range(1, N + 1, 2):
  count = 0
  for j in range(1, i + 1, 2):
    if i % j == 0:
      count += 1
  if count == 8:
    l.append(i)
print(len(l))

Solution (Python):
N = int(input())
answer = 0
for i in range(1,N+1,2):
    div = []
    for j in range(1,N+1):
        if i%j==0:
            div.append(j)
    if len(div)==8:
        answer += 1
print(answer)

Solution (Python):
N = int(input())
result = 0
for i in range(1,N+1,2):
  
  A = 0
  for j in range(1,i+1):
    
    if i % j == 0:
      A += 1
  if A == 8:
    result += 1
print(result)

Solution (Python):
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
        else:
            cnt = cnt
    if cnt == 8:
        ans += 1
    else:
        ans = ans

print(ans)

Solution (Python):
N=int(input())
cnt=0
L=[3*5*7,3*5*9,3*5*11,3*5*13,3*7*9]
for l in L:
  cnt+=(l<=N)
print(cnt)

Solution (Python):
def main():
    limit = int(input())
    result = 0
    for i in range(1, limit + 1, 2):
        divisor = 2
        j = 2
        while j * j <= i:
            if i % j == 0:
                if i * i == j:
                    divisor += 1
                else:
                    divisor += 2
            j += 1
        if divisor == 8:
            result += 1
    print(result)


if __name__ == '__main__':
    main()

Solution (Python):
usrInput = int(input())
kosuu = []

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

for n in range(usrInput):
    counting = n + 1
    divisors = make_divisors(counting)
    if len(divisors) == 8 and counting % 2 == 1:
        kosuu.append(counting)

print(len(kosuu))

Solution (Python):
num = int(input())


ct = 0

for i in range(105,num + 1,2):
    i_primes = 0
    for j in range(1, i + 1):
        if i % j == 0:
            if (i // j) <= j:
                break
            i_primes += 2
    
    ct += 1 if i_primes == 8 else 0

print(ct)

Solution (Python):
n = int(input())

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

print(ans)

Solution (Python):
import math
n = int(input())

def factors(a):
    b = int(math.sqrt(a))
    f = []
    for i in range(1, b+1):
        if a % i == 0:
            f.append(i)
            f.append(a//i)
    return len(f)

def solve():
    if n < 105:
        print(0)
        return
    ans = 0
    for i in range(105, n+1, 2):
        if factors(i) == 8:
           ans += 1
    print(ans)
solve()

Solution (Python):
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
ans=0
N=int(input())
if N<105:
    print(0)
    exit(0)
for i in range(104,N+1):
    if i%2==1 and len(make_divisors(i))==8:
        ans+=1
print(ans)

Solution (Python):
n = int(input())

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

print(ans)

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

Solution (Python):
n=int(input())
cnt=0
for i in range(1,n+1,2):
	a=0
	for j in range(1,i+1):
		if i  % j ==0:
			a += 1
	if a==8:
		cnt += 1
print(cnt)

Solution (Python):
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)

Solution (Python):
n = int(input())
ans = 0
for i in range(1,n+1,2):
    x = 0
    
    for j in range(1,i+1):
        if i % j == 0:
            x += 1
       
    if x == 8:
        ans += 1
        
print(ans)

Solution (Python):

N = int(input())
ans = 0
if N>=195:
    ans = 5
elif N>=189:
    ans = 4
elif N>=165:
    ans = 3
elif N>=135:
    ans = 2
elif N>=105:
    ans = 1
print(ans)

Solution (Python):
N=int(input())

def div(n):
    table=[]
    for i in range(1,int(n**0.5)+1):
        if i*i>n:
            break
        if n%i==0:
            table.append(i)
            if n//i!=i:
                table.append(n//i)
    return table

ans=0
for i in range(1,N+1,2):
    if len(div(i))==8:
        ans+=1
        
print(ans)

Solution (Python):



n = int(input())
l = []
for j in range(1,n+1):
    if j%2 != 0:
        l.append(j)
b = 0
for i in l:
    a = 0
    for k in range(1,i+1):
        if i%k == 0:
            a += 1
    if a == 8:
        b += 1
print(b)

Solution (Python):
n = int(input())
l = []
for j in range(1,n+1):
    if j%2 != 0:
        l.append(j)
b = 0
for i in l:
    a = 0
    for k in range(1,i+1):
        if i%k == 0:
            a += 1
    if a == 8:
        b += 1
print(b)

Solution (Python):

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)

Solution (Python):
n = int(input())

s = 0

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

Solution (Python):
n=int(input())
ans=0
l=[i for i in range(1,n+1) if i%2==1]
for i in l:
    cnt=0
    for j in range(1,i+1):
        if i%j==0:
            cnt+=1
    if cnt==8:
        ans+=1
print(ans)

Solution (Python):
n=int(input())
c=0
for i in range(1,n+1):
  if i%2==0:
    pass
  else:
    t=0
    for j in range(1,i+1):
      if i%j==0:
        t+=1
      if t==8:
        c+=1
print(c)

Solution (Python):
N = int(input())

ans = []
for n in range(1, N+1, 2):
    d = 0
    for i in range(1, n+1):
        if n % i == 0:
            d += 1
    if d == 8:
        ans.append(n)

print(len(ans))

Solution (Python):
N = int(input())

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

output = 0
for i in range(1, N +1, 2):
    div_cnt = divisorChecker(i)
    if div_cnt == 8:
        output += 1
        
print(output)

Solution (Python):
n=int(input())
sa=0
for i in range(1,n+1):
    ans=0
    for j in range(1,i):
        if i%j==0:
            ans+=1
    if ans==7 and i%2==1:
        sa+=1
print(sa)

Solution (Python):
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)

Solution (Python):
n = int(input())

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

ans = 0 

for i in range(1, n+1, 2):
    if F(i) == 8:
        ans += 1
print(ans)

Solution (Python):
N = int(input())
ans = 0
for i in range(N + 1):
    if i % 2 == 0:
        continue
    c = 0
    for j in range(1, i + 1):
        if i % j == 0:
            c += 1
    if c == 8:
        ans += 1
print(ans)

Solution (Python):
i=int(input())
if i<105:print(0)
if i<135 and i>=105:print(1)
if i<165 and i>=135:print(2)
if i<189 and i>=165:print(3)
if i<195 and i>=189:print(4)
if i>=195:print(5)

Solution (Python):
n = int(input())

def divisor(n: int) -> list:
    list_of_divisor = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            list_of_divisor.append(i)
            if i != n//i:
                list_of_divisor.append(n//i)
    
    return list_of_divisor

ans = 0
for i in range(1, n+1, 2):
    li = divisor(i)
    if len(li) == 8:
        ans += 1

print(ans)

Solution (Python):
n = int(input())
c = 0
ans = 0

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

print(ans)

Solution (Python):
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

n = int(input())
ans = 0

for i in range(1,n+1,2):
    if len(make_divisors(i)) == 8:
        ans += 1

print(ans)

Solution (Python):
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
ans = 0
for i in range(N):
    if (i+1)%2==1:
        d = make_divisors(i+1)
        if len(d) == 8:
            ans += 1
print(ans)

Solution (Python):
N = int(input())
s = 0
for i in range(N+1):
  if i % 2 == 1:
    t = 0
    for j in range(1,i+1):
      if i % j == 0:
        t += 1
    if t == 8:
      s += 1
print(s)

Solution (Python):
n = int(input())

ans = 0
for i in range(1, n+1):
    l = [] 
    for j in range(1, i+1):
        if i % j == 0:
            l.append(j)

    if len(l) == 8 and i % 2 == 1:
        ans += 1

print(ans)

Solution (Python):
n=int(input())
list=[]
for i in range(1,n+1,2):
	count=0
	for j in range(1,i+1,1):
		if i%j==0:
			count+=1
	if count==8:
		list.append(i)
print(len(list))

Solution (Python):
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
  ans+=(1 if cnt==8 else 0)

print(ans)

Solution (Python):
N=int(input())
num=0
cdcount=0
count=0
for i in range(N):
    num=i+1
    for j in range(num):
        if (num%(j+1)==0):
            cdcount=cdcount+1
    if (cdcount==8)and(num%2==1):
        count=count+1
    cdcount=0
print(count)

Solution (Python):
n = int(input())
lp = [3,5,7,11,13]

ans = 0
for i in (range(n)):
  li = []
  for k in lp:
    tmp = i+1
    cnt = 0
    while tmp%k == 0:
      tmp //= k
      cnt += 1
    if cnt > 0:
      li.append(cnt)
  if li in [[1,1,1], [3,1]]:
    ans += 1

print(ans)

Solution (Python):
n = int(input())
lp = []
for i in range(3,int(n//2)+1):
  for k in lp:
    if i%2 == 0 or i%k == 0:
      break
  else:
    lp.append(i)

ans = 0
for i in (range(n)):
  li = []
  for k in lp:
    tmp = i+1
    cnt = 0
    while tmp%k == 0:
      tmp //= k
      cnt += 1
    if cnt > 0:
      li.append(cnt)
  if li in [[1,1,1], [1,3], [3,1], [7]]:
    ans += 1

print(ans)

Solution (Python):
n = int(input())
lp = []
for i in range(3,int(n**0.5)+1):
  for k in lp:
    if i%2 == 0 or i%k == 0:
      break
  else:
    lp.append(i)

ans = 0
for i in (range(n)):
  li = []
  for k in lp:
    tmp = i+1
    cnt = 0
    while tmp%k == 0:
      tmp //= k
      cnt += 1
    if cnt > 0:
      li.append(cnt)
  if li in [[1,1,1], [1,3], [3,1], [7]]:
    ans += 1

print(ans)

Solution (Python):

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
n = int(input())
a = [105,135,165,189,195]

if a[0] > n: print(0)
elif a[0] <= n < a[1]: print(1)
elif a[1] <= n < a[2]: print(2)
elif a[2] <= n < a[3]: print(3)
elif a[3] <= n < a[4]: print(4)
elif a[4] <= n: print(5)

Solution (Python):
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, o + 1):
    if o % n == 0:
      cnt += 1
  if cnt == 8:
    ans += 1
print(ans)

Solution (Python):
n = int(input())

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

print(ans)

Solution (Python):
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, o + 1):
    if o % n == 0:
      cnt += 1
  if cnt == 8:
    ans += 1
print(ans)

Solution (Python):
import math
ans = 0
n = int(input())
for i in range(1,n+1,2):
    count = 0
    for j in range(1,int(math.sqrt(i))+1):
        if i%j==0:
            count+=1
    if count*2 == 8:
        ans += 1
print(ans)

Solution (Python):
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)

Solution (Python):
n = int(input())
count1 = 0

for i in range(1, n + 1, 2):
    count2 = 0

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

    if count2 == 8:
        count1 += 1

print(count1)

Solution (Python):
N = int(input())
Odd = [num for num in range(1,N+1) if num%2 == 1]
dic = {}
counter = 0
for i in Odd:
  dic[i] = []
  for x in range(1,i+1):
    if(i%x == 0):
      dic[i].append(x)
  if(len(dic[i])==8):
    counter += 1
print(counter)

Solution (Python):
N = int(input())

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

Solution (Python):
import collections
N = int(input())


def prime_factorize(n):
    assert n > 0
    res = []
    while n % 2 == 0:
        res.append(2)
        n //= 2
    m = 3
    while m ** 2 <= n:
        if n % m == 0:
            res.append(m)
            n //= m
        else:
            m += 2
    if n != 1:
        res.append(n)
    return res


ans = 0
for i in range(1, N+1, 2):
    d = collections.Counter(prime_factorize(i))
    tmp = 1
    for v in d.values():
        tmp *= (1 + v)
    if tmp == 8:
        ans += 1
print(ans)

Solution (Python):
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

n = int(input())
ans = 0
for i in range(3,n+1,2):
    div = make_divisors(i)
    if len(div) == 8:
        ans += 1
print(ans)

Solution (Python):
import numpy as np
 
a = np.zeros(201)
for d in range(1,201,2):
  a[d::2*d] += 1

a = (a == 8).cumsum()
 
N = int(input())
print(a[N])

Solution (Python):
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
  
N = int(input())  
ans = 0
for i in range(7, N+1, 2):
  cnt = len(make_divisors(i))
  if cnt == 8:
    ans += 1
    
print(ans)

Solution (Python):
n=int(input())

result = 0


for i in range(1,n+1):
    buf=[]
    if i%2!=0:
        for j in range(1,i+1):
            if i%j == 0:
                buf.append(j)
    if len(buf) == 8:
        result+=1

print(result)

Solution (Python):
N = int(input())
ans = 0


def count_factors(n):
    c = 0

    for i in range(1, n + 1):
        if n % i == 0:
            c += 1

    return c


for i in range(1, N + 1, 2):
    if count_factors(i) >= 8:
        ans += 1

print(ans)

Solution (Python):
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 i in range(1, N+1, 2):
    divis = make_divisors(i)
    if len(divis) == 8:
        cnt += 1
print(cnt)

Solution (Python):
n = int(input())
if 104 >= n:
    print(0)
    exit()
ans = 0
for i in range(105,n+1,2):
    l1 = [0]*(i+1)
    count = 1
    for j in range(2,i+1):
        if i % j == 0:
            while i % j == 0:
                l1[j] += 1
                i //= j
    for k in l1:
        count *= (k+1)
    if count == 8:
        ans += 1

print(ans)

Solution (Python):
n = int(input())

resultNum = 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:
        resultNum += 1

print(resultNum)

Solution (Python):
N = int(input())
cnt, ans = 0, 0
for i in range(1, N + 1):
    cnt = 0
    for j in range(1, i + 1):
        if i % j == 0: cnt += 1
    if (cnt == 8 and i % 2 == 1): ans += 1
print(ans)

Solution (Python):
import sys

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())

sys.setrecursionlimit(10 ** 9)


def main():
    N = INT()

    for i, value in enumerate([105, 135, 165, 189, 195, 201]):
        if N < value: 
            print(i)
            sys.exit()


if __name__ == '__main__':
    main()

Solution (Python):
N=int(input())
[3,5,7,11,13]
A=[105,135,165,189,195]
ans=0
for i in A:
  if i <=N:
    ans+=1
print(ans)

Solution (Python):
n = int(input().strip())
ans = 0
for i in range(1, (n + 1), 2):
    cnt = 0
    for j in range(1, (i + 1), 1):
        if (i % j == 0):
            cnt += 1
    if cnt == 8:
        ans += 1
print(ans)

Solution (Python):
import math
def func(n):
    sq = math.sqrt(n)
    cnt = 0
    if sq.is_integer():
        for i in range(1, int(sq)):
            if n%i==0:
                cnt += 1
        return 2*cnt + 1
    else:
        for i in range(1, int(sq)+1):
            if n%i==0:
                cnt += 1
        return 2*cnt 

n = int(input())
cnt = 0
for i in range(1, n+1):
    if i%2==0:
        continue
    elif func(i)==8:
        cnt = cnt + 1
print(cnt)

Solution (Python):
N = int(input())


divisor_cnt = 0
num = 0

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


print(num)

Solution (Python):
ans = 0
n = int(input())
for i in range(3,n+1,2):
  temp = 0
  for j in range(1,i+1):
    if i%j == 0:
      temp += 1
  ans += (1 if temp == 8 else 0)
print(ans)

Solution (Python):
n = int(input())

if (n < 105):
   print(0)
   exit()

i = 105
ok = 0
while i <= n:
   x = [j for j in range(1, n+1) if i % j == 0]
   if (len(x) == 8):
      ok += 1
   i += 2
print(ok)