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

import itertools

n = int(input())

odd_primes = [3, 5, 7, 11, 13, 17, 19, 23]
the_number = 0

for comb in list(itertools.combinations(odd_primes, 3)):
    if comb[0] * comb[1] * comb[2] <= n:
        the_number += 1

for comb in list(itertools.combinations(odd_primes, 2)):
    if comb[0] ** 3 * comb[1] <= n:
        the_number += 1

print(the_number)

Solution (Python):
def divs(n):
  d = 0
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      d += 1
      if i != n // i:
        d += 1
  return d

c = 0
for i in range(1, int(input()) + 1, 2):
  if divs(i) == 8:
    c += 1
print(c)

Solution (Python):
N = int(input())
P = [105, 135, 165, 189, 195]

print(sum([1 for p in P if N >= p]))

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

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

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):
from sys import stdin
from itertools import product


n = int(stdin.readline().rstrip())

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

print(point)

Solution (Python):

N = int(input())

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

print(ans)

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

def yakusuu(num):
  yakusuu_array = []
  for j in range(1,num):
    if num % j == 0:
          yakusuu_array.append(j)
  return len(yakusuu_array)


for i in range(N):
  if (i+1) % 2 == 1 and yakusuu(i+1) == 7:
    ans += 1

print(ans)

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

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


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


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

print(c)

Solution (Python):
import sys,math
def input():
    return sys.stdin.readline()[:-1]

N = int(input())
n = int(N**0.5)+1
ANS = 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:
        if i%2==1:
            ANS+=1
print(ANS)

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

Solution (Python):




import sys

import math











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


def main():
    n = int(sys.stdin.readline().rstrip())
    
    count = 0
    for i in range(1, n + 1, 2):
        if len(divisors(i)) == 8:
            count += 1
    
    print(count)




if __name__ == "__main__":
    
    main()

Solution (Python):
N = int(input())
ans = 0
for n in range(1, N+1, 2):
    i = 1
    cnt = 0
    while(i*i <= n):
        if (n%i == 0):
            cnt += 1 + (n//i != i)
        i += 1
    ans += (cnt==8)
print(ans)

Solution (Python):
n=max(int(input())-75,0);c=int(n>113);print(n//30+c)

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())
cnt = 0
for i in range(1, n+1):
  if(i % 2 ==1 and len(make_divisors(i)) == 8):
    cnt += 1
print(cnt)

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

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

if n <= 104:
    print(0)
elif 105 <= n <= 134:
    print(1)
elif 135 <= n <= 164:
    print(2)
elif 165 <= n <= 188:
    print(3)
elif 189 <= n <= 194:
    print(4)
else:
    print(5)

Solution (Python):

N = int(input())

l1 = []
for n in range(1, N+1, 2):
  l = []
  for j in range(1, n+1):
    if(n % j == 0):
      l.append(j)
  if(len(l) == 8):
    l1.append(n)
print(len(l1))

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

n = int(input())
ans = sum(len(divisor(i))==8 for i in range(1,n+1) if i%2)
print(ans)

Solution (Python):
def count_divisors(n):
    divisors = 0
    for i in range(1, int(n**0.5) +1):
        if n % i == 0:
            divisors += 1
            if i != n // i:
                divisors += 1

    return divisors

n = int(input())

print(sum(count_divisors(x) == 8 for x in range(1, n+1, 2)))

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

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

def num_divisors(n):
  d = 0
  for j in range(1,n+1):
    if n%j == 0:
      d+=1
  return d

for i in range(1,N+1):
  if i%2 != 0 and num_divisors(i)==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 len(divisors)

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

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

print(ans)

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]
n=int(input())
ans=0
for i in range(n):
    if (i+1)%2==0:
        continue
    cnt=0
    for j in range(i+1):
        if (i+1)%(j+1)==0:
            cnt+=1
    if cnt==8:
        ans+=1
print(ans)

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

div_num = 0
for n in range(105, N+1, 2):
  div_c = 0
  for t in range(1, n+1):
    if n % t == 0:
      div_c += 1
  if div_c == 8 :
    div_num += 1

print(div_num)

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

Solution (Python):
n = int(input())
r = []
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:
    r.append(i)
print(len(r))

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

count = 0
for i in range(105, N+1, 2):
    div_i = make_divisors(i)
    if len(div_i) == 8:
        count += 1

print(count)

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


print(len(ans))

Solution (Python):
N = int(input())
tmp = []
for i in range(N+1):
    if i%2 != 0:
        tmp.append(i)
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 = []
for j in range(len(tmp)):
    ans.append(make_divisors(tmp[j]))
count = 0
for k in range(len(ans)):
    if len(ans[k]) == 8:
        count += 1
print(count)

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

for i in range(1,n+1):
  j=2
  t=1
  x=i
  while j*j<i:
    f=0
    while x%j==0:
      x //= j
      f+=1
    if f != 0:
      t *= f+1
    j+=1
  if x==i:
    t *= 2
  if t==8 and i%2:
    a += 1
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())





if N < 105:
  ans = 0
elif N < 135:
  ans = 1
elif N < 165:
  ans = 2
elif N < 189:
  ans = 3
elif N < 195:
  ans = 4
else:
  ans = 5
  
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

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

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

Solution (Python):

def divisors(x: int) -> set:
    """
    Compute divisors of a number.
    
    Args: x (int): an integer to be evaluated.
    Returns: divs (set): set of divisors
    """
    divs = set()
    for i in range(1, int(x ** 0.5) + 1):
        if x % i == 0:
            divs.add(i), divs.add(x // i)
    return divs


def main():
    N = int(input())
    ans = sum(len(divisors(i)) == 8 for i in range(1, N + 1, 2))
    print(ans)


if __name__ == "__main__":
    main()

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

Solution (Python):



N=int(input())
if N<105:
    ans=0
elif N<135:
    ans=1
elif N<165:
    ans=2
elif N<189:
    ans=3
elif N<195:
    ans=4
else:
    ans=5
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):
  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):
  cnt = 0
  j = 1
  while j**2 <= i:
    if i % j == 0:
      cnt += 2
    j += 1
  if cnt == 8:
    ans += 1
print(ans)

Solution (Python):
N=int(input())
print((N>=195)+(N>=189)+(N>=165)+(N>=135)+(N>=105))

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

def make_divisors(n):
  divisors = []
  for i in range(1, N+1):
    if n % i == 0:
      divisors.append(i)
  return divisors

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

Solution (Python):
def is8DivisorNumbers(n: int) -> bool:
    cnt = 0
    for i in range(1, n+1):
        if n%i == 0:
            cnt += 1

    return True if cnt == 8 else False

n = int(input())
odds = [i for i in range(1, n+1, 2)]

ans = 0
for odd in odds:
    if is8DivisorNumbers(odd):
        ans += 1

print(ans)

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

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

print(res)

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):
from itertools import combinations
from itertools import permutations
N = int(input())
lis = []
for v in combinations([3,5,7,11,13],3):
  if v[0]*v[1]*v[2] <= N: lis.append(v[0]*v[1]*v[2]) 
for v in permutations([3,5,7],2):
  if (v[0]**3)*v[1] <= N: lis.append((v[0]**3)*v[1]) 

print(len(lis))

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

div_count = 0
sum = 0

for i in range(3,n+1,2):
    a = i
    j = 2
    div_count = 0
    while(j <= a):
        
        
        if a % j == 0:
            div_count += 1
            a //= j
            j += 1
        else:
            j += 1
    if div_count == 3:
        sum += 1

print(sum)

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


def count_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)
  length = len(divisors)
  return length


l = []
for i in range(1, n + 1):
  if i % 2 == 0:
    continue
  else:
    if count_divisors(i) == 8:
      l.append(i)

      
print(len(l))

Solution (Python):
def factorization(n):
    def sieve(n):
        is_prime = [True for _ in range(n+1)]
        is_prime[0] = False

        for i in range(2, n+1):
            if is_prime[i-1]:
                j = 2 * i
                while j <= n:
                    is_prime[j-1] = False
                    j += i
        table = [ i for i in range(1, n+1) if is_prime[i-1]]
        return table
    arr = []
    temp = n
    for i in sieve(int(n**0.5)):
        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
cnt=1
n=int(input())
ans=0
for i in range(1,n+1,2):
    a=factorization(i)
    for j in range(len(a)):
        cnt*=a[j][1]+1
    if cnt==8:
        ans+=1
    cnt=1
print(ans)

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)


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():
    n = int(input())
    if n < 105:
        print(0)
        exit()
    arr = [x for x in list(range(105, n+1)) if x % 2 != 0]

    cnt = 0
    for x in arr:
        if len(make_divisors(x)) == 8:
            cnt += 1

    print(cnt)


if __name__ == '__main__':
    main()

Solution (Python):
import collections
def div(n):
    a = []
    for i in range(2,n+1):
        while n % i == 0:
            a.append(i)
            n //= i
    return a
n = int(input())
cnt = 1
ans = 0
for i in range(1,n+1,2):
    a = collections.Counter(div(i))
    a = list(a.values())
    for j in range(len(a)):
        cnt *= (a[j]+1)
    if cnt == 8:
        ans += 1
    cnt = 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())
yakusu= 0
for i in range(N+1):
    count = 0
    for j in range(1, i+1):
        if i % j == 0:
            count += 1
        else:
            pass
        if count > 8:
            break
        
    if count == 8 and i % 2 == 1:
        yakusu += 1
    else:
        pass
    
print(yakusu)

Solution (Python):
def solve(num):
    result = []
    for i in range(2, int(num**(1/2)+1)):
        counter = 0
        while num%i == 0:
            num /= i
            counter += 1
        if counter >= 1:
            result.append((i, counter))
    if len(result) == 0:
        result = [(1,1)]
    numbers = 1
    for i in result:
        numbers *= i[1]+1
    return numbers
def main():
    n = int(input())
    c = 0
    for i in range(1, n+1, 2):
        r = solve(i)
        if r == 8:
            c += 1
    print(c)

if __name__ == '__main__':
    main()

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


if N <= 104:
    print(0)
else:
    ans = 0
    for n in range(105, N+1, 2):
        d_list = []
        for i in range(1, n//2):
            if n%i == 0:
                d_list.append(i)
        if len(d_list) == 7:
            ans += 1
    print(ans)

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

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

print(ans)

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

Solution (Python):
n=int(input())
if n<105:
  print(0)
elif 104<n<135:
  print(1)
elif 134<n<165:
  print(2)
elif 164<n<189:
  print(3)
elif 188<n<195:
  print(4)
else:
  print(5)

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

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

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
if n < 105:
    print(0)
else:
    for i in [i for i in range(105,n+1) if i %2 == 1]:
        m = make_divisors(i)
        if len(m) == 8:
            ans += 1   
    print(ans)

Solution (Python):
n=int(input())
l=[105,135,165,189,195]
count=0
for i in l:
    if n>=i:
        count+=1
print(count)

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

cnt = [0] * (n + 1)
for i in list(i for i in range(1, n + 1) if i % 2 == 1):
    for j in range(1, n + 1):
        if i % j == 0:
            cnt[i] += 1
            if cnt[i] == 8:
                break

print(cnt.count(8))

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

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    a_cnt = 0
    for i in range(1, n + 1):
        if i % 2 != 0:
            cnt = 0
            t = i
            cnt = 0
            for j in range(1, i + 1):
                if t % j == 0:
                    cnt += 1
            if cnt == 8:
                a_cnt += 1
    print(a_cnt)


if __name__ == '__main__':
    slove()

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()

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):
n = int(input())
ans = 0

for i in range(n+1):
    count = 0
    if i%2 == 1:
        for m in range(i+1):
            if m != 0 and i%m == 0:
                count += 1
    if count == 8:
        ans += 1

print(ans)

Solution (Python):
import bisect
print(bisect.bisect_right([105, 135, 165, 189, 195], int(input())))

Solution (Python):
import sys
input = sys.stdin.readline


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

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


if __name__ == '__main__':
    main()

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

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())
result = 0
for num in range(1,N+1):
    if(num%2>0 and len(make_divisors(num))==8):
        result = result + 1
print(result)

Solution (Python):
def f(x):
  a=[]
  for i in range(1, int(pow(x, 1/2))+1, 1):
    if x%i==0:
      a.append(i)
      if x!=pow(i, 2):
        a.append(x//i)
        
  a.sort()
  return a

counter=0
N=int(input())
for i in range(1, N+1, 2):
  a=f(i)
  if len(a)==8:
    counter+=1
    
print(counter)

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

def divisor(N):
  div = []
  cur = N
  for i in range(1,N+1):
    if cur%i == 0:
      div.append(i)
  return len(div)

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

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

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

count_list = []
for num in range(1, N + 1):
    if num % 2 != 0:
        count = 0
        for n in range(1, num + 1):
            if num % n == 0:
                count += 1
            else:
                pass
        count_list.append(count)
    else:
        count_list.append(-1)

print(count_list.count(8))

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

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    n = int(input())
    print(
        sum(
            [
                sum([i % j == 0 for j in range(1, i + 1)]) == 8
                for i in range(1, n + 1, 2)
            ]
        )
    )


if __name__ == "__main__":
    main()

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())
count=0
for i in range(1,n+1,2):
    if len(make_divisors(i))==8:
        
        count+=1
print(count)

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

    if cnt == 8:
        ans += 1

print(ans)

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

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

Solution (Python):
a = 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 k in range(1,a+1):
  if k%2 == 1 and len(make_divisors(k)) == 8:
    cnt += 1
print(cnt)

Solution (Python):
n = int(input())
ans =0
for i in range(2,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)

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

counter = 0
for i in range(1, n+1, 2):
  yakusuu = 0
  for j in range(1, i // 2 + 1 + 1, 2):
    if i % j == 0:
      yakusuu += 1

  if yakusuu == 7:
    counter += 1
  yakusuu = 0
print(counter)

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

Solution (Python):
n=int(input())
ans=0
L=[105,135,165,189,195]
for l in L:
    if n>=l:
        ans+=1
    else:
        break
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())
ans = 0
for n in range(1,N+1,2):
    div = 0
    for d in range(1,n+1):
        if n % d == 0:
            div += 1
    if div == 8:
        ans += 1
print(ans)

Solution (Python):
def fact(n):
    num = n
    cnt = [0]*(n+1)
    ans = 1
    for i in range(2, n+1):
        while num % i == 0:
            cnt[i] += 1
            num /= i
    for i in range(2, n+1):
        ans *= cnt[i] + 1
    return ans

n = int(input())

res = 0
for i in range(1, n+1):
    if i % 2 == 1 and fact(i) == 8:
        res += 1
print(res)

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

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

sum = 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:
            break
    else:
        if cnt == 8:
            sum += 1
print(sum)

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

Solution (Python):
n = int(input())
count = 0
output = 0

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

    if count == 8:
        output += 1

print(output)

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

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

ans = 0

for i in range(1, N + 1):
    if i % 2 == 1:
        a = 1

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

print(ans)

Solution (Python):
n = int(input())
l=[]
count=0
for h in range(n):
    for i in range(h+1):
        if (h+1)%(i+1)==0 and (h+1)%2!=0:
            l.append(h+1)
            if len(l)==8:
                count+=1
    if len(l)!=8:
        l.clear()
print(count)

Solution (Python):
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
def divisors(n):
    S,T=[],[]
    for i in range(1,int(n**.5)+1):
        if n%i==0:
            S.append(i)
            T.append(n//i)
    T.reverse()
    return S+T if S[-1]!=T[0] else S+T[1:]

def resolve():
    n=int(input())
    ans=0
    for i in range(1,n+1,2):
        ans+=(len(divisors(i))==8)
    print(ans)
resolve()

Solution (Python):
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda :sys.stdin.readline().rstrip()
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 resolve():
    n=int(input())
    ans=0
    for i in range(n+1):
        if i%2==0: continue
        D=make_divisors(i)
        if len(D)==8: ans+=1
    print(ans)

resolve()

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

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

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














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)
elif n <= 200:
    print(5)

Solution (Python):
N = int(input())
ans = 0
if N < 105:
    ans = 0
else:
    for i in range(105, 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

print(ans)