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

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

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


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

    def enum_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(1, N + 1, 2):
        divs = enum_divisors(i)
        if len(divs) == 8:
            ans += 1

    print(ans)


if __name__ == '__main__':
    main()

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
inf = 10**17
mod = 10**9 + 7


n=I()
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):
ans=0
n=int(input())
if n<105:
  print('0')
  exit()
else:
  for i in range(105,n+1):
    if i%2!=0:
      cnt=0
      for j in range(1,i+1):
        if i%j==0:
          cnt+=1
      if cnt==8:
         ans+=1

print(ans)

Solution (Python):
def abc106b_105():
    n = int(input())
    cnt = 0
    for i in range(1, n + 1):
        if i % 2 == 0: continue
        yaku_cnt = 0
        for j in range(1, i + 1):
            if i % j == 0:
                yaku_cnt += 1
        if yaku_cnt == 8:
            cnt += 1

    print(cnt)


abc106b_105()

Solution (Python):
def make_divisors(n):
    lower, upper = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower.append(i)
            if i != n // i:
                upper.append(n//i)
        i += 1
    return lower + upper[::-1]

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

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

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

for i in range(1, n + 1, 2):
    j = 1
    cnt = 0
    
    while j*j <= i :
        if i % j == 0 :
            if j*j == i :
                cnt += 1
                
            else:
                cnt += 2
                
        j += 1
        
    if cnt == 8 :
        eight_cnt += 1
        
print(eight_cnt)

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

Solution (Python):

import sys
def input():
    return sys.stdin.readline()[:-1]

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

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

if __name__ == '__main__':
    main()

Solution (Python):
def factors(n):
    d, res = 1, 0
    while d*d <= n:
        if n % d == 0:
            if d*d == n:
                res += 1
            else:
                res += 2
        d += 1
    return res


N = int(input())

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

print(ans)

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

Solution (Python):
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1 
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

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

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

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


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

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

print(ans_num)

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

def make_divisors(n):
    lower_divisors, upper_divisors = [], []
    i = 1
    while i * i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n // i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

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

Solution (Python):
N = int(input())
num=0
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr
for i in range(1,N+1):
    ans=1
    if i%2==1:
        a=factorization(i)
        
        for u in a:
            ans*=u[1]+1
        if ans==8:
            num+=1
print(num)

Solution (Python):
def is_target(num):
    count = 0
    for i in range(1, num+1):
        if num % i == 0:
            count += 1
    if count == 8:
        return True
    else:
        return False

if __name__ == "__main__":
    N = int(input())
    count = 0
    for num in range(1, N+1, 2):
        count += is_target(num)

    print(count)

Solution (Python):
def pr(x):
    cnt = 0
    for i in range(1, int(x**0.5)+1):
        if i**2 == x:
            cnt += 1
        elif x % i == 0:
            cnt += 2
    return cnt

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

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

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

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

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

Solution (Python):

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

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


if __name__ == '__main__':
    main()

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


def make_divisors(n):
    lower_divisors, upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]


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())
cnts = 0

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

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

print(cnts)

Solution (Python):
import math
from collections import Counter
n=int(input())



def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)

    return a
ans=0
for i in range(1,n+1):
  if i%2==0:
    continue
  s=Counter(prime_factorize(i))
  cnt=1
  for j in s.values():
    cnt*=j+1
    
    
  if cnt==8:
    ans+=1
    
  else:
    continue
    
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 make_table(N=200):
    import math
    import itertools
    table = [False for _ in range(N + 1)]
    A = list(range(3, math.ceil(math.sqrt(N)), 2))
    
    for x, y, z in itertools.combinations(A, 3):
        if x * y * z <= N:
            table[x * y * z] = True
    
    for x, y in itertools.combinations(A, 2):
        if x * x * x * y <= N:
            table[x * x * x * y] = True
    return table


def resolve():
    table = make_table()
    N = int(input())
    print(sum(table[:N + 1]))


resolve()

Solution (Python):
class PrimeFactor():

    def __init__(self, n):
        """
        エラトステネス　O(N loglog N)
        """
        self.n = n
        self.table = list(range(n+1))       
        self.table[2::2] = [2]*(n//2)
        for p in range(3, int(n**0.5) + 2, 2):
            if self.table[p] == p:
                for q in range(p * p, n + 1, 2 * p):
                    if self.table[q] == q:
                        self.table[q] = p

    def prime_counter(self, x):
        """
        素因数分解（個数のリスト） O(logN)
        {素因数: 個数}　の形で返す
        """
        res = dict()
        if x < 2:
            return res
        while self.table[x] != 1:
            res[self.table[x]] = res.get(self.table[x], 0) + 1
            x //= self.table[x]
        return res

    def divisors_counter(self, x):
        """ 約数の個数　O((logN)^2) """
        res = 1
        for value in self.prime_counter(x).values():
            res *= (value+1)
        return res

N = int(input())
P = PrimeFactor(N)
res = 0
for i in range(1,N+1,2):
    if P.divisors_counter(i)==8:
        res += 1
print(res)

Solution (Python):
from math import ceil, sqrt

def prime_factorize_tuple(n):
    ret = []
    tmp = n
    for i in range(2, ceil(sqrt(n))):
        if tmp % i == 0:
            count = 0
            while tmp % i == 0:
                count += 1
                tmp //= i
            ret.append((i, count))

    if tmp != 1:
        ret.append((tmp, 1))

    if not ret:
        ret.append([n, 1])  

    return ret

n = int(input())
ans = 0
for i in range(1, n + 1, 2):
    tmp = 1
    for prime, count in prime_factorize_tuple(i):
        tmp *= (count + 1)
    if tmp == 8:
        ans += 1
print(ans)

Solution (Python):
def make_divisors(n: int) -> list:
    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):
    divisors = make_divisors(i)
    if len(divisors) == 8:
        
        ans += 1
print(ans)

Solution (Python):
import sys, bisect, math, itertools, string, queue, copy
import numpy as np
import scipy
from collections import Counter,defaultdict,deque
from itertools import permutations, combinations
from heapq import heappop, heappush

sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

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

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

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

print(ans)

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

print(ans)

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

p = [2*i+1 for i in range((n+1)//2)]
ans = 0
for i in p:
    j = 1
    cnt = 0
    while j <= i:
        if i%j == 0:
            cnt += 1
        j += 2
    if cnt == 8:
        ans += 1

print(ans)

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

Solution (Python):
import sys


def yakusu(i):

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

    return cnt


def main():
    N = int(sys.stdin.readline().rstrip())

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

    print(cnt)


main()

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


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp % i == 0:
            cnt = 0
            while temp % i == 0:
                cnt += 1
                temp //= i
            arr.append([i, cnt])

    if temp != 1:
        arr.append([temp, 1])

    if arr == []:
        arr.append([n, 1])

    return arr


ans = 0


for i in range(1, 1 + N, 2):
    temp = factorization(i)
    num = 1
    
    for x in temp:
        num = num * (x[1] + 1)

        if num == 8:
            ans += 1


print(ans)

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

divs = [0] * (n + 1)
for i in range(1, (n + 1)):
    for j in range(i, (n + 1), i):
        divs[j] += 1

ans = 0

for idx, div in enumerate(divs):
    if div == 8 and idx % 2 == 1:
        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())
ans = 0

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

print(ans)

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

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

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

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

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

print(ans)

Solution (Python):
from sys import stdin
ans=0
c=0
N = int(input().rstrip())
for i in range(N):
  c=0
  i+=1
  if i%2==1:
    for j in range(i):
      j+=1
      if i%j==0:
        c+=1
  if c==8:
    ans+=1

print(ans)

Solution (Python):

import sys
from itertools import product,combinations
from functools import reduce,lru_cache
import heapq

def vfunc(f): return lambda *lst, **kwargs: list(map(lambda *x:f(*x,**kwargs),*lst))

def list_t(l): return vfunc(lambda *args:args)(*l)

def rvfunc(f): return lambda *lst, **kwargs: list(map(lambda *x:rvfunc(f)(*x,**kwargs) if all(vfunc(lambda y:isinstance(y,list))(x)) else f(*x,**kwargs),*lst))

def reader():return vfunc(lambda l:l.split())(sys.stdin.readlines())

def factorization(n):
    out={}
    for i in range(2,int(n**0.5)+1):
        if n%i==0:
            out.update({i:0})
            while n%i==0:
                out[i]+=1
                n=int(n/i)
    if n != 1: out.update({n:1})
    return out

n=int(reader()[0][0])

dl = vfunc(lambda i:factorization(i))(range(1,n+1,2))
f = lambda d:reduce(lambda a,b:a*b,vfunc(lambda n:d[n]+1)(d)) if len(d)>1 else vfunc(lambda n:d[n]+1)(d)[0] if len(d)==1 else 0
s = vfunc(f)(dl)

print(len(list(filter(lambda a:a==8,s))))

Solution (Python):
import numpy as np
from sys import stdin
ans=0
c=0
N = int(input().rstrip())
for i in range(N):
  c=0
  i+=1
  if i%2==1:
    for j in range(i):
      j+=1
      if i%j==0:
        c+=1
  if c==8:
    ans+=1

print(ans)

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



import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """105"""
        output = """1"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """7"""
        output = """0"""
        self.assertIO(input, output)


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

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


if __name__ == "__main__":
    
    resolve()

Solution (Python):
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

N = int(input())

ans = 0
for i in range(1, N+1):
    if i % 2 == 0:
        continue
    factor = factorization(i)
    c = 1
    for j in range(len(factor)):
        c *= (factor[j][1] + 1)
    if c == 8:
        ans += 1

print(ans)

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

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

if n <= 104:
    print(0)
    exit()
else:
    res = 0
    for i in range(105,n+1,2):
        temp = 0
        for j in range(1,i+1):
            if i %j ==0:
                temp+=1
        if temp==8:
            res+=1
print(res)

Solution (Python):
n = int(input())
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]
cnt = 0
for i in range(1, n+1, 2):
    if len(make_divisors(i)) == 8:
        cnt +=1
print(cnt)

Solution (Python):
mod = 1000000007
eps = 10**-9


def main():
    import sys
    input = sys.stdin.readline

    N = int(input())
    ans = 0
    for i in range(1, N+1):
        if i&1:
            cnt = 0
            for d in range(1, i+1):
                if i%d==0:
                    cnt += 1
            if cnt == 8:
                ans += 1
    print(ans)


if __name__ == '__main__':
    main()

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

Solution (Python):
import sys
N = int(input())
L = [i for i in range(1, N+1) if i % 2 != 0]
ans = 0
if N < 105:
    print(0)
    sys.exit(0)
for num in L:
    counter = 1
    for i in range(1, num//2):
        if num % i == 0:
            counter += 1
    if counter == 8:
        ans += 1
print(ans)

Solution (Python):
N = int(input())
if N <= 105:
    if N == 105:
        print(1)
    else:
        print(0)
    exit()
ret = 1
for i in range(107, N+1, 2):
    div = 0
    for j in range(1, i+1, 2):
        if i%j==0:
            div += 1
    if div == 8:
        ret += 1
print(ret)

Solution (Python):
N = int( input())
count = 0
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())
a=0
b=[]
for i in range(N):
    b.append(0)
for i in range(1,N+1):
    for j in range(1,i+1):
        if i%j==0 and i%2==1:
            b[i-1]+=1
print(b.count(8))

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

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

print(res)

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

def make_divisors(n):
    x = 0
    i = 1
    while i*i <= n:
        if n % i == 0:
            x += 1
            if i != n // i:
                x += 1
        i += 1
    return x

s = 0

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

print(s)

Solution (Python):
N = int(input())
ret = 0
if N <= 105:
    if N == 105:
        print(1)
    else:
        print(0)
    exit()

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

Solution (Python):
N = int(input())
ls = [i+1 for i in range(N)]

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
ii = 0
for i in ls:
    if i % 2== 0:
        continue
    else:
        if len(divisor(i)) == 8:
            ii += 1
print(ii)

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

li = [3,5,7,11,13]
ans = 0
for i in range(1,n+1):
    cnt = 0
    for j in range(5):
        if i%li[j]==0:
            cnt += 1
    if cnt ==3:
        ans +=1

if n>=135:
    ans += 1
if n>=189:
    ans += 1

print(ans)

Solution (Python):
n = int(input())
t = 0
for i in range(1,n+1,2):
    num = 0
    for h in range(1,i+1):
        if i%h == 0:
            num += 1
    if num == 8:
        t += 1
print(t)

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

odds = [i for i in range(1, n+1, 1) if i%2 != 0]
cnt_lists = []
for j in odds:
    cnt = 0
    for k in range(1, j+1, 1):
        if j%k == 0:
            cnt += 1
    cnt_lists.append(cnt)

ans = cnt_lists.count(8)
print(ans)

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

for i in range(n):
    if (i+1)%2==0:
        continue
    else :
        s=0
        for j in range(i+1):
            if (i+1)%(j+1)==0:
                s+=1
        if s==8:
            t+=1
print(t)

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

Solution (Python):
from math import sqrt
N=int(input())
ans=0
for i in range(1,N+1,2):
  d=[]
  for j in range(1,int(sqrt(i))+1):
    if i%j==0:
      d.append(j)
      d.append(N//j)
  d=list(set(d))
  if len(d)==8:
    ans+=1
print(ans)

Solution (Python):
def divisors(n):
    res = 0
    for i in range(1, n+1):
        if n % i == 0:
            res += 1
    return res


N = int(input())
ans = 0

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

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

total = 0
for i in range(N-1):
    cnt = 0
    for j in range(N-i):
        if (N-i) % (N-i-j) == 0:
            cnt += 1 
    if cnt == 8 and (N-i) % 2 != 0:
        total += 1
print(total)

Solution (Python):
N = int(input())
p=0
if N < 105:
    print(0)
else:
    for n in range(1,  N+1, 2):
        ans = []
        for i in range(2, int(n**0.5)+1):
            while n % i == 0:
                ans.append(i)
                n //= i
        if n!=1:ans.append(n)

        A = 1
        sp = list(set(ans))
        for s in sp:
            A *= ans.count(s)+1
        if A == 8:
            p+=1

    print(p)

Solution (Python):
N = int(input())
count_all = 0
def count_yakusuu(N):
    count = 0
    for i in range(3, int(N/3)+1):
        if N % i == 0:
            count += 1
    if count == 6:
        return True
    else:
        return False
for k in range(N+1):
    if k % 2 == 1:
        if count_yakusuu(k):
            count_all += 1
print(count_all)

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

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

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

    print(ans)


if __name__ == "__main__":
    main()

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

def check_divisor(number):
	divisors = 0
	for j in range(1, number+1, 2):
		if not (number%j):
			divisors += 1
			if divisors == 9: return False
	if divisors == 8: return True
	else: return False

count = 0
for i in range(1, N+1, 2):
	if check_divisor(i):
		count += 1
print(count)

Solution (Python):
N = int(input())
cnt = 0
for n in range(1, N + 1, 2):
    route_n = int(n ** (1 / 2))
    by = [] 
    for i in range(1, route_n + 1, 2):
        if n % i == 0:
            by.append(i)
            a = n // i
            if a != i:
                by.append(a)
    if len(by) == 8:
        cnt += 1

print(cnt)

Solution (Python):
def main():
    n = int(input())
    count = 0
    x_list =[3**3*5, 3**3*7, 3*5*7, 3*5*11, 3*5*13]
    for one in x_list:
        if one<=n:
            count+=1
    print(count)

if __name__=="__main__":
    main()

Solution (Python):
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

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


def input():
    return sys.stdin.readline().rstrip()


def main():
    d =[0] *201

    for i in range(1,201):
        for k in range(1,201):
            if k%i==0 and k%2==1:
                d[k] +=1



    N = int(input())

    print(d[:N+1].count(8))


if __name__ == "__main__":
    main()

Solution (Python):
def make_divisors(n):
    
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

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

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 table
  
counter = 0
for i in range(1,N+1,2):
  if len(divisor(i)) == 8:
    counter += 1

print(counter)

Solution (Python):
import math
def is_square(N):
    return math.sqrt(N) - int(math.sqrt(N)) == 0

def get_divisor_count(N):
    divisor_count = 0
    for i in range(1,int(math.sqrt(N))+1):
        if N%i == 0:
            divisor_count += 1
    return divisor_count*2 if is_square(N) == False else divisor_count*2 - 1
if __name__ == "__main__":
    N = int(input())
    count = 0
    for i in range(1,N+1,2):
        if get_divisor_count(i) == 8:
            count += 1
    print(count)

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

Solution (Python):
n = int(input())
res = 0
for i in range(1, n + 1, 2):
    counter = 0
    for j in range(1, int(i ** (1/2)) + 1):
        if i % j == 0:
            counter += 1
            if i // j != j:
                counter += 1
    if counter == 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):
N = int(input())
ans = 0
m = 0
for i in range(1, N + 1, 2):
  m = 0
  for j in range(1, i + 1):
    if i % j == 0:
      m += 1
    if j == i and m == 8:
      ans += 1
print(ans)

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

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

print(ans)