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

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

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


def make_divisors(n):
    divisors = []
    for i in range(1, int(math.sqrt(n)) + 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(1, N + 1, 2):
    if make_divisors(i) == 8:
        cnt += 1
print(cnt)

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

res = 0

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

print(res)

Solution (Python):


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

    
    odd = [i for i in range(1, n+1, 2)]

    res = 0
    for i in odd:
        cnt = 0
        for j in range(1, i+1, 2):
            if i % j == 0:
                cnt += 1
        if cnt == 8:
            res += 1
    print(res)
if __name__ == "__main__":
    main()

Solution (Python):

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

    

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


if __name__ == '__main__':
    main()

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

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

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

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

ans = 0
for i in range(105, 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, 2):
    m = 1
    num = i
    for j in range(2, n + 1):
        cnt = 0
        while num % j == 0:
            num //= j
            cnt += 1
        m *= (cnt + 1)
    if m == 8:
        ans += 1
print(ans)

Solution (Python):
def solve(n: int):
    count = 0
    for k in range(1, n + 1, 2):
        num_aliquot = len([1 for j in range(1, k + 1) if k % j == 0])
        if num_aliquot == 8:
            count += 1

    return count


N = int(input())  

print(solve(N))

Solution (Python):

import sys


def f(n):
    '''
    >>> f(105)
    8
    '''
    ret = 0
    for i in range(1, n+1):
        if n % i == 0:
            ret += 1
    return ret

def solve(N: int):
    ret = 0
    for i in range(1, N+1):
        if i % 2 == 1 and f(i) == 8:
            ret += 1
    return ret


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    print(solve(N))

def test():
    import doctest
    doctest.testmod()

if __name__ == '__main__':
    test()
    main()

Solution (Python):
n = int(input())
nn = [i for i in range(1, n+1) if i%2==1]
ans = 0
for i in range(1, n+1, 2):
    cnt = []
    t = 0
    for j in nn[:-2]:
        for k in nn[1:]:
            if j*k==i: cnt.extend([j, k])
    if len(set(cnt))==8:
        ans+=1
        
print(ans)

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

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())
nm=[0]*(n+1)

for i in range(1,n+1):
    for j in range(1,n+1):
        if i%j==0:
            nm[i]+=1
l=[1 for i in range(1,n+1) if nm[i]==8 and i%2]
print(sum(l))

Solution (Python):
def make_div_list(num):
    div_list=[]
    for i in range(1, int(num**0.5)+1):
        if num%i==0:
            div_list.append(i)
            if i!=num//i:
                div_list.append(num//i)
    
    div_list.sort()
    return div_list

n=int(input())
if n<=104:
    print(0)
else:
    ans=1
    for num in range(107, n+1):
        if num%2==1:
            l=make_div_list(num)
            if len(l)==8:
                ans+=1
    print(ans)

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

ans = [0 for n in range(N+1)]

for n in range(1,N+1, 2):
  for i in range(n, N+1, n):
    ans[i] += 1

print(ans.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())

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

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

Solution (Python):
a=int(input())
if a<=104:
    ans=0
elif a<135:
    ans=1
elif a<165:
    ans=2
elif a<189:
    ans=3
elif a<195:
    ans=4
else:
    ans=5
print(ans)

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

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

Solution (Python):
import sys
import math

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

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

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

ans = 0

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

print(ans)

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

if (n < 105):
    ans = 0
elif (n == 105):
    ans = 1

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

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

print(ans)

Solution (Python):
import sys
import heapq
import re
from itertools import permutations
from bisect import bisect_left, bisect_right
from collections import Counter, deque
from fractions import gcd
from math import factorial, sqrt, ceil
from functools import lru_cache, reduce
INF = 1 << 60
MOD = 1000000007
sys.setrecursionlimit(10 ** 7)


class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

def is_prime(n):
    if n == 1:
        return False
    for i in range(2,int(n**0.5)+1):
        if n % i == 0:
            return False
    return True




def warshall_floyd(d, n):
    
    for k in range(n):
        for i in range(n):
            for j in range(n):
                d[i][j] = min(d[i][j],d[i][k] + d[k][j])
    return d



def dijkstra_heap(s, edge, n):
    
    d = [10**20] * n
    used = [True] * n 
    d[s] = 0
    used[s] = False
    edgelist = []
    for a,b in edge[s]:
        heapq.heappush(edgelist,a*(10**6)+b)
    while len(edgelist):
        minedge = heapq.heappop(edgelist)
        
        if not used[minedge%(10**6)]:
            continue
        v = minedge%(10**6)
        d[v] = minedge//(10**6)
        used[v] = False
        for e in edge[v]:
            if used[e[1]]:
                heapq.heappush(edgelist,(e[0]+d[v])*(10**6)+e[1])
    return d


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


def lcm(x, y):
    return (x * y) // gcd(x, y)


def lcm_list(numbers):
    return reduce(lcm, numbers, 1)


def gcd_list(numbers):
    return reduce(gcd, numbers)






def eratosthenes(limit):
    A = [i for i in range(2, limit+1)]
    P = []

    while True:
        prime = min(A)
        
        if prime > sqrt(limit):
            break
            
        P.append(prime)
            
        i = 0
        while i < len(A):
            if A[i] % prime == 0:
                A.pop(i)
                continue
            i += 1
            
    for a in A:
        P.append(a)
            
    return P


def permutation_with_duplicates(L):

    if L == []:
        return [[]]

    else:
        ret = []

        
        S = sorted(set(L))

        for i in S:

            data = L[:]
            data.remove(i)

            for j in permutation_with_duplicates(data):
                ret.append([i] + j)

        return ret



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

"""
Created on Fri May  8 01:14:23 2020

@author: Kanaru Sato
"""
import math

N = int(input())
ans = 0

for n in range(1,N+1):
    if n%2 != 0:
        count = 0
        for i in range(1,n+1):
            if n % i == 0:
                count += 1
        if count == 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, 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())
counter = 0
ans = 0
for i in range(1,N+1):
    if i % 2 == 0:
        continue
    for j in range(1, i+1):
        if i % j == 0:
            counter += 1
    
    if counter == 8:
        ans += 1

    counter = 0


print(ans)

Solution (Python):

def main():
    import sys
    N = int(sys.stdin.readline())
    result = 0
    
    for i in range(1, N+1, 2):
        result +=yakusu_cnt(i)
    print(result)
    
def yakusu_cnt(n):
    ans = 0
    for i in range(1, n+1):
        if n%i==0:
            
            ans+=1
    if ans ==8:
        return 1
    else:
        return 0


if __name__=='__main__':
    main()

Solution (Python):


import sys






















def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    def calc_div(i):
        num = 0
        for j in range(1, i + 1, 2):
            if i % j == 0:
                num += 1
        return num

    n = ii()
    cnt = 0
    for i in range(1, n + 1, 2):
        if calc_div(i) == 8:
            cnt += 1
    print(cnt)


if __name__ == "__main__":
    main()

Solution (Python):
import math
def divisor(n):
    a = set()
    for i in range(1, math.ceil(n**0.5) + 1):
        if n % i == 0:
            a.add(i)
            a.add(n // i)
    return a

n = int(input())

ans = 0
for i in range(1, n+1, 2):
    if len(divisor(i)) == 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):
def main():
    n = int(input())
    ans = solve(n)
    print(ans)


def solve(n):
    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
    return ans


if __name__ == '__main__':
    main()

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


def yaku(n):
  x = 0
  for i in range(1,n+1):
    if(not n%i):
      x += 1
  return x

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

print(count)

Solution (Python):
n=int(input())
ANS = []

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

Solution (Python):

import sys
import math
from bisect import bisect_left, bisect_right, insort_left, insort_right
from collections import defaultdict, deque, Counter
from copy import deepcopy
from fractions import gcd
from functools import lru_cache, reduce
from heapq import heappop, heappush
from itertools import accumulate, groupby, product, permutations, combinations, combinations_with_replacement
from math import ceil, floor, factorial, log, sqrt, sin, cos
from operator import itemgetter
sys.setrecursionlimit(10**7)
rs = lambda: sys.stdin.readline().rstrip()
ri = lambda: int(rs())
rf = lambda: float(rs())
rs_ = lambda: [_ for _ in rs().split()]
ri_ = lambda: [int(_) for _ in rs().split()]
rf_ = lambda: [float(_) for _ in rs().split()]
INF = float('inf')
MOD = 10 ** 9 + 7
PI = math.pi

N = ri()
ans = 0
for n in range(1, N + 1, 2):
    tmp = 0
    for i in range(1, n + 1):
        if n % i == 0:
            tmp += 1
    if tmp == 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):
a=int(input())
if a<=104:
    ans=0
elif a<135:
    ans=1
elif a<165:
    ans=2
elif a<189:
    ans=3
elif a<195:
    ans=4
else:
    ans=5
print(ans)

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

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

a = [0] * 100
b = [0] * 100
ans = 0

for i in range(100):
    a[i] = 2 * i + 1

for i in range(100):
    for j in range(2, 200):
        if a[i] % j == 0:
            b[i] += 1

for k in range(100):
    if b[k] == 7 and a[k] <= n:
        ans += 1

print(ans)

Solution (Python):
n=int(input())
i=1
ans=0
while i<=n:
    x=1
    count=0
    while x<=n:
        if i%x==0:
            count+=1
        x+=1
    if count==8: ans+=1
    i+=2
print(ans)

Solution (Python):



















maxNum = int(input())
i = 1
ansNum = 0

while i <= maxNum:
    numOfYakusu = 0

    warukazu = 1
    while warukazu <= i:
        
        if i % 2 == 0:
            break
        if i % warukazu == 0:
            numOfYakusu += 1
        warukazu += 1
        
    
    if numOfYakusu == 8:
        ansNum += 1
    i += 1


print(ansNum)

Solution (Python):
N=int(input())
ans=0
def count(x):
    c=0
    i=1
    while i<=x:
        if x%i==0:
            c+=1
        i+=1
    return c
for i in range(105,N+1,2):
    if count(i)==8:
        ans+=1
print(ans)

Solution (Python):
n=int(input())
def yakusuu(n):
  num=0
  if n%2==1:
    for i in range(1,n+1):
      if n%i==0:
        num=num+1
  return num 

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

Solution (Python):
import bisect

n = int(input())

a = []
for i in range(100):
    s = 0
    for j in range(1, int(((i*2+1)**(0.5)//1)+1)):
        if (i*2+1)%j == 0:
            s += 1
            if int((i*2+1)/j) != j:
                s += 1
    
    if s == 8:
        a.append(i*2+1)
        
ans = bisect.bisect_right(a, n)
print(ans)

Solution (Python):
def is_div_8(x):
    if x % 2 == 0:
        return False
    count = 0
    for j in range(1, x + 1):
        if x % j == 0:
            count += 1
    if count == 8:
        return True
    else:
        return False


N = int(input())
count = 0
for i in range(1, N + 1):
    if is_div_8(i):
        count += 1

print(count)

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

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

Solution (Python):
import math
n = int(input())
lng = 0
for i in range(1,n+1,2):
  count= 0
  for p in range(1,n+1):
    if i%p == 0:
      count += 1
  if count == 8:
    lng += 1
print(lng)

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

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

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

Solution (Python):

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

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

count = 0

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

print(count)

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):
a=int(input());print(sum(a>ord(x)for x in'h¤¼Â'))

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

Solution (Python):
a=int(input());print(sum(ord(x)<a for x in"h¤¼Â"))

Solution (Python):
_=int(input());print(sum(ord(x)<_ for x in "h¤¼Â"))

Solution (Python):
def main():
    n = int(input())
    r = 0
    for i1 in range(1, n + 1,2):
        cnt = 0
        for i2 in range(1,i1+1):
            cnt += i1 % i2 == 0
        r += cnt == 8
    print(r)

if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

Solution (Python):
_=int(input());c=0
for i in 'i¥½ÃÉ':
  if (_ < ord(i)):
    print(c)
    break
  c+=1

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(1, N + 1):
  if len(make_divisors(i)) == 8 and i%2 == 1:
    ans += 1
print(ans)

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


def readstr():
    return input().strip()


def readint():
    return int(input())


def readnums():
    return map(int, input().split())


def readstrs():
    return input().split()


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

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

print(ans)

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

X = [int(x) for x in range(1,n+1,2)]

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

Solution (Python):
def main():
  N = int(input())
  ans = 0
  
  for i in range(3, N+1, 2): 
    count = 2 

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

  print(ans)

if __name__ == "__main__":
  main()

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

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

X = [int(x) for x in range(1,n+1,2)]

answer = []
cnt = 0
for x in X:
    answer = []
    for i in range(1,n+1):
        if x % i == 0:
            answer.append(i)

    if len(answer) == 8 :
        cnt += 1 
print(cnt)

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

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

print(count)

Solution (Python):


N = int(input())

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

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

def calc(N):
    ret = 2
    M = int(N ** 0.5) + 1
    for i in range(2, M):
        if N % i == 0:
            ret += 2
    return ret

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

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

if n >= 105:
    for i in range(105, n+1, 2):
        count_yakusuu = 0
        for j in range(1, int(i**0.5)+1):
            if i % j == 0:
                count_yakusuu += 2
        if count_yakusuu == 8:
            ans += 1
print(ans)

Solution (Python):

import sys
import math

N = int(input())


def divisor(n):
    ans = 0
    for i in range(1, int(math.sqrt(n + 1)), 2):  
        if n % i == 0:
            ans += 1
            if i != int(math.sqrt(n + 1)):
                ans += 1

    return ans


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

print(ans)

Solution (Python):

import sys
import math

N = int(input())


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

    return ans


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

print(ans)

Solution (Python):
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
cnt=0
for i in range(1, n+1, 2):
    ans = 1
    for j in list(set(prime_factorize(i))):
        ans *= (1+prime_factorize(i).count(j))
    if ans == 8:
        cnt += 1
print(cnt)

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

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

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

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

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

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

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

Solution (Python):
import numpy as np

def unique(w):
    d = {}
    for c in w:
        if c in d.keys():
            d[c] += 1
        else:
            d.setdefault(c, 1)
    return list(d.keys()), list(d.values())

def number_of_divisor(n):
	import numpy as np
	result = []
	while n > 1:
		div = divisor(n)
		result.append(div)
		n //= div
	index, result = unique(result)
	result = [x + 1 for x in result]
	return np.prod(result)

def divisor(n):
    if n % 2 == 0:
        return 2
    elif n % 3 == 0:
        return 3
    maxitr = intSqrt(n)
    i = 1
    while True:
        i += 4
        if i > maxitr:
            return n
        elif n % i == 0:
            return i
        i += 2
        if i > maxitr:
            return n
        elif n % i == 0:
            return i

def intSqrt(n):
    x = 1
    while True:
        x2 = (x + n // x) // 2
        if x2 ** 2 <= n and abs(x - x2) <= 1:
            break
        x = x2
    return x2

def ABC106B(n):
    count = 0
    for i in range(3, n+1, 2):
        if number_of_divisor(i) == 8:
            count += 1
    print(count)

n = int(input())
ABC106B(n)

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

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

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

Solution (Python):
n = int(input())
cnt = 0
if n < 105:
    print(0)
    quit()
elif n == 105:
    print(1)
    quit()
else:
    ans = 1
    for i in range(107, 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):
import collections

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

N = int(input())
if N < 105:
    print(0)
    exit(0)
else:
    cnt = 1
    for i in range(107, N+1, 2):
        x = 1
        c = collections.Counter(prime_factorize(i))
        li = c.values()
        for j in li:
            j += 1
            x *= j
        if x == 8:
            cnt += 1
    print(cnt)