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


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

    
    return divisors

n = int(input())

ans = 0

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

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

ans = 0

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

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

print(ans)

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

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

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

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

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

sup = (N + 1) // 2
con = 0
ans = 0

if N < 105:
  print(ans)

else:
  for i in range(1,N + 1,2):
    for j in range(1,max(i // 2 + 1,2)):
      if i % j == 0:
        con +=1
    if con == 7:
      ans += 1
    con = 0
      
  print(ans)

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

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

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

    if cnt >= 8:
        ans += 1

print(ans)

Solution (Python):
import sys
from math import floor, sqrt
from bisect import bisect_right as bi_r 

def prime_nums(n):
    sieve = set(range(2, n + 1))
    non_prime = set(range(2 * 2, n + 1, 2))
    sieve -= non_prime
    for i in range(3, floor(sqrt(n)) + 1, 2):
        if i in sieve:
            non_prime = set(range(i * 2, n + 1, i))
            sieve -= non_prime
    return sieve

n = int(sys.stdin.readline().rstrip())
ps = prime_nums(n)
ps -= set([2])
ps = sorted(ps)

def main():
    l = len(ps)
    cnt = 0

    
    for i in range(1, l+1):
        p = ps[i-1]
        if p ** 7 <= n:
            cnt += 1
        else:
            break
    
    
    for i in range(1, l+1):
        p = ps[i-1]
        j = bi_r(ps, n // p ** 3)
        if j >= i:
            cnt += j - 1
        elif j > 0:
            cnt += j
        else:
            break
        
    
    for i in range(1, l-1):
        p = ps[i-1]
        for j in range(i+1, l):
            q = ps[j-1]
            if p * q > n:
                break
            for k in range(j+1, l+1):
                r = ps[k-1]
                if p * q * r > n:
                    break
                cnt += 1

    return cnt

if __name__ == '__main__':
    ans = main()
    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())

res = 0

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

Solution (Python):
def divisor(n):
    i = 1
    ans_div = []
    while i * i <= n:
        if n%i == 0:
            ans_div.append(i)
            ans_div.append(n // i)
        i += 1
    ans_div = list(set(ans_div))
    return ans_div
import sys
input = sys.stdin.readline
N = int(input())
count = 0
if N < 105:
    print(0)
else:
    for odd in range(105, N+1, 2):
        li = divisor(odd)
        if len(li) == 8:
            count += 1
    print(count)

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

Solution (Python):
import sys
input = sys.stdin.readline
N = int(input())
if N < 105 :
    print(0)
elif N >= 105 and N<135 :
    print(1)
elif N>= 135 and N<165 :
    print(2)
elif N>=165 and N<189 :
    print(3)
elif N>=189 and N<195 :
    print(4)
else :
    print(5)

Solution (Python):
N = int(input())
ans=1
if N <=104:
  print(0)
elif N==105 or N==106:
  print(1)
else:
  for i in range(107,N+1,2):
    i_div ={div for div in range(1,i+1) if i%div == 0}
    if len(i_div) == 8:
      ans+=1
  print(ans)

Solution (Python):
N = int(input())
cnt = 0
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 math
import itertools
import sys
import copy
 




N = int(input())

if N == 105 :
  print (1)
  exit()
elif N < 105 :
  print (0)
  exit()
  
cnt = 1
for i in range(107, N+1, 2) :
  q = 0
  for j in range(1, i+1) :
    if i%j == 0 :
      q += 1
      
  if q == 8 :
    cnt += 1
    
print (cnt)

Solution (Python):
import bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7





def get_divisors(n):
    """
    n の約数をリストで返す
    :param int n:
    :rtype: list of int
    """
    ret = []
    for i in range(1, int(math.sqrt(n)) + 1):
        if n % i == 0:
            ret.append(i)
            if n // i != i:
                ret.append(n // i)
    return ret


n = int(sys.stdin.buffer.readline())
ans = 0
for i in range(1, n +1):
    ans +=i& 1 and len(get_divisors(i)) == 8
print(ans)

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

Solution (Python):
import math
n = int(input())
lst = [x for x in range(1, n + 1) if x % 2 != 0]
def div(x):
    lst_2 = []
    for i in range(1, int(math.sqrt(x)) + 1):
        if x % i == 0 and x // i != i:
            lst_2.append(i)
            lst_2.append(x // i)
        if x % i == 0 and x // i == i:
            lst_2.append(i)
    return lst_2

cnt = 0
for i in lst:
    div_lst = div(i)
    if len(div_lst) == 8:
        cnt += 1

print(cnt)

Solution (Python):
n = int(input())
ans = 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):
    if i%2:
        if len(make_divisors(i)) == 8:
            ans += 1

print(ans)

Solution (Python):



def get_ans(num: int):
    if num < 105:
        return 0
    ans = 0
    for i in range(105, num + 1):
        if i % 2 == 0:
            continue
        if cnt_yaku(i):
            ans += 1
    return ans


def cnt_yaku(num: int):
    ans = 0
    for i in range(1, num + 1):
        if num % i == 0:
            ans += 1
    return ans == 8


num = int(input())
ans = get_ans(num)
print(ans)

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


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

Solution (Python):
n=int(input())
ans=0
if n>=105:
  ans+=1
if n>=135:
  ans+=1
if n>=165:
  ans+=1
if n>=189:
  ans+=1
if n>=195:
  ans+=1
print(ans)

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

ans=0
if N<=104:
  ans=0
elif N==105:
  ans=1
else:
  ans=1
  for i in range(106,N+1):
    if i%2==0:
      continue
    cnt=0
    for j in range(1,i+1):
      if i%j==0:
        cnt+=1
        if cnt>8:
          break
    if cnt==8:
      ans+=1
print(ans)

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

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

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

print(ans)

Solution (Python):
import math
N = int(input())
res = [0 for _ in range(N + 1)]

for i in range(1, N + 1):
	for j in range(1, N + 1):
		if j < i or j % 2 == 0: continue
		if j % i == 0:
			res[j] += 1
ctr = 0			
for r in res:
	if r == 8:
		ctr += 1
		
print(ctr)

Solution (Python):
n = int(input())
lst = [135, 189, 105, 165, 195]
tmp = 0
x = []

for i in range(5):
    x.append(n-lst[i])

for i in range(5):
    if x[i]>=0:
        tmp += 1

print(tmp)

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

for i in range(3,n+1,2):
    y = 1
    cnt = 0
    for j in range(3,int((i**0.5)//1)+1,2):
        while i%j == 0:
            i //= j
            cnt += 1
        y *= cnt+1
        cnt = 0
    if i != 1: y *= 2
    if y == 8: ans += 1
print(ans)

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

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

Solution (Python):
def prime_factorization(N):
	'''
	return: [[2,3], [3,5]] (2^3 * 3^5)
	        [] if N==1
	O(sqrt{N}) (maybe)
	'''
	ans = []
	cnt=0
	while N%2==0:
		cnt+=1
		N//=2
	if cnt!=0:
		ans.append([2,cnt])
	
	f = 3
	while f*f<=N:
		cnt=0
		while N%f==0:
			N//=f
			cnt+=1
		if cnt!=0:
			ans.append([f,cnt])
		f+=2
	if N!=1:
		ans.append([N,1])
	return ans


N = int(input())
ans = 0
for i in range(1,N+1,2):
	T = prime_factorization(i)
	s = 1
	for t in T:
		s *= t[1]+1
	if s==8:
		ans += 1
print(ans)

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


if __name__ == '__main__':
    main()

Solution (Python):
import sys
input = sys.stdin.readline
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(1, N+1, 2):
    if make_divisors(i) == 8:
        cnt += 1
print(cnt)

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

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

print(count)

Solution (Python):


N = int(input())
import math


def solve(num):
        count = 0
        for i in range(1, int(math.sqrt(num)) + 1):
                if num % i == 0:
                        if (num // i) != i:
                                count += 2
                        else:
                                count += 1
        if count == 8:
                return 1
        else:
                return 0

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

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

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(N+1):
	length = 0
	if(i%2==1):
		divi = make_divisors(i)
		length = len(divi)
	if(length == 8):
		cnt+=1
print(cnt)

Solution (Python):


n = int(input())


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

    
    return divisors

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

print(ans)

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

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

print(cnt)

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

Solution (Python):
import math
n=int(input())
ans=[]
for i in range(1,n+1,2):
    div=0
    for j in range(1,int(math.sqrt(i)//1)+1):
        if(i%j==0):
            div+=1

    if(div==4):
        ans.append(i)

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

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

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

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

elif N==105:
    print(1)
else:
    print(0)

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)
else:
  print(5)

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

a=[1 for i in range(1,int(input())+1,2) if len(f(i))==8]
print(len(a))

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

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

Solution (Python):
def divisor(n):
    limit = int(n**0.5 + 1)
    divisors = set()
    for div in range(1, limit):
        if n % div == 0:
            div2 = n//div
            divisors.add(div)
            divisors.add(div2)
    return len(divisors)


n = int(input())
ans = 0

for num in range(105, n+1, 2):
    if divisor(num) == 8:
        ans += 1

print(ans)

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

if N < 105:
    print(0)
else:
    res = 1
    for i in range(107, N+1, 2):
            sum = 0
            for j in range(1, i+1):
                if (i % j) == 0:
                    sum += 1
            if (sum == 8):
                res += 1
    print(res)

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

lst_c = collections.Counter(lst)
print(lst_c[8])

Solution (Python):
def divisor(n):
    limit = int(n**0.5 + 1)
    divisors = set()
    for div in range(1, limit):
        if n % div == 0:
            div2 = n//div
            divisors.add(div)
            divisors.add(div2)
    return len(divisors)


n = int(input())
ans = 0

for num in range(105, n+1, 2):
    if divisor(num) == 8:
        ans += 1

print(ans)

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


def f(x):
    li = [i for i in range(1, x + 1) if x % i == 0]
    
    return len(li)


cnt = 0

for i in range(1, n + 1, 2):
    if f(i) == 8:
        cnt += 1

print(cnt)

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

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

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

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

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

print(ans)

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

num = list(range(1, N+1))
num = num[::2]

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 n in num:
  ans.append(len(make_divisors(n)))

print(ans.count(8))

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

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

    
    return divisors

ans = 0

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

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

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

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

    if count==8:
        ans += 1

print(ans)

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

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

Solution (Python):
n = int(input())
s = 0
for i in range(1, n + 1, 2):
    c = 0
    sq = int(i ** 0.5)
    for j in range(1, sq + 1):
        if i % j == 0:
            c += 1
    if c == 4:
        s += 1

print(s)

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

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

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

Solution (Python):
a=int(input());print(len([1 for i in [52,67,82,94,97] if 2*i<a]))

Solution (Python):
s=[105, 135, 165, 189, 195]
ans=0;n=int(input())
for f in s:
  if n>=f:ans+=1
print(ans)

Solution (Python):
s=[]
for i in range(201)[105::2]:
  d=1;k=i
  for h in range(2,i+1):
    if i%h==0:
      cnt=0
      while i%h==0:
        cnt+=1
        i//=h
      d*=(cnt+1)
  if d==8:
    s.append(k)
ans=0;n=int(input())
for f in s:
  if n>=f:ans+=1
print(ans)

Solution (Python):
n = int(input()) + 1
ans = 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 val in range(n):
    if len(make_divisors(val)) == 8 and val%2 != 0:
        ans += 1
print(ans)

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

if n < 105:
    print(0)
elif 105 <= n < 135:
    print(1)
elif 135 <= n < 165:
    print(2)
elif 165 <= n < 189:
    print(3)
elif 189 <= n < 195:
    print(4)
else:
    print(5)

Solution (Python):
n = int(input())
odds = [i for i in range(1, n+1) if i%2 == 1]

ans = 0
for o in odds:
    cnt = 0
    for j in range(1, o+1):
        if o%j == 0:
            cnt+=1
    if cnt == 8:
        ans+=1
        
print(ans)

Solution (Python):
def yakusu_count(x):
    
    
    
    
    return len([i for i in range(1, x + 1) if x % i == 0])


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

    
    
    

    count = len([i for i in range(1, N+1, 2) if yakusu_count(i) == 8])

    print(count)


if __name__ == '__main__':
    main()

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

l = []

check = 0

for i in range(n):
	if (i+1)%2 != 0:
		test = 0
		for j in range(i+1):
			if (i+1)%(j+1)==0:
				test = test + 1
				
				if test == 8:
					
					check = check + 1
				
print(check)

Solution (Python):
N = int(input())
ans = 0
for candi in range(1, N + 1, 2):
    num_divisor = 0
    div = 1
    while div**2 <= candi:
        if candi % div == 0:
            num_divisor += 2
        div += 1
    if num_divisor == 8:
        ans += 1
print(ans)

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

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


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

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


for ni in range((N-1)//2+1):
    n=ni*2+1
    c=0 

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

    if c==8: 
        c8+=1

print(c8)

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

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

Solution (Python):
A = int(input())
k = 1
if A < 105:
  print(0)
elif A == 105 and A == 106:
  print(1)
else:
  for a in range(107,A+3,2):
    count = 0
    for i in range(1,A+3,2):
      if a % i == 0:
        count = count + 1
      elif count == 8 and A+1 <= i:
        k = 1+k
  print(k)

Solution (Python):
def factorize(n):
    fct = []  
    b, e = 2, 0  
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct
N = int(input())
ans = 0
for i in range(1,N+1):
    if i%2 == 0:
        continue
    else:
        tmp = factorize(i)
        if len(tmp) == 2:
            if tmp[0][1]*tmp[1][1] ==3:
                ans += 1
        if len(tmp) == 3:
            if tmp[0][1]*tmp[1][1]*tmp[2][1] ==1:
                ans += 1
print(ans)

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

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

Solution (Python):
N = int(input())
ans = 0
for i in range(1, N + 1, 2):
    res = 0
    for j in range(1, i):
        if i < j * j:
            break
        if i % j == 0:
            if j != i / j:
                res += 2
            else:
                res += 1
    if res == 8:
        ans += 1
print(ans)

Solution (Python):
from bisect import bisect_right
li = [105, 135, 165, 189, 195]
N = int(input())
ans = bisect_right(li,N)
print(ans)

Solution (Python):
def divide(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())
if n < 105:
	print (0)
	exit()
ans = []
for i in range(105,n+1):
	if i % 2 == 0:
		continue
	s = divide(i)
	if len(s) == 8:
		ans.append(i)

print(len(ans))

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

Solution (Python):

import sys


def solve(N: int):
    ans = 0
    for n in range(1, N+1):
        count = 0
        if n % 2 == 0:
            pass
        else:
            for i in range(1, n+1):
                if n % i == 0:
                    count += 1
            if count == 8:
                ans += 1
    print(int(ans))


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

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

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)
    divisors.sort()
    return divisors
count=0
for i in range(N):
  if len(make_divisors(i+1))==8 and (i+1)%2!=0:
    count+=1
print(count)

Solution (Python):
N = int(input())
l = [105, 135, 165, 189, 195]
ans = 0
if N >= 105:
  for i in range(5):
    if l[i] <= N:
      ans += 1
    else:
      break

print(ans)

Solution (Python):
def cntDiv(n):
    cnt = 0
    for i in range(1,n+1):
        if n%i == 0:
            cnt += 1
    return 1 if cnt == 8 else 0

N = int(input())
ans = 0
for i in range(1,N+1,2):
    ans += cntDiv(i)

print(ans)

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

Solution (Python):
N = int(input())
if N < 105:
    print(0)
else:
    ans = 0
    for n in range(105,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 num in range(1, N + 1):
  count = 0
  if not num % 2:
    continue
  
  for i in range(1, num + 1):
    if not num % i:
      count += 1
    if count == 8:
      ans += 1
      continue
      
print(ans)

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

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

    
    return divisors

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

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

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

Solution (Python):
n = int(input())
ans = 0
if n < 3 * 5 * 7:
    ans = 0
elif n < 3 * 3 * 3 * 5: 
    ans = 1
elif n < 3 * 5 * 11:
    ans = 2
elif n < 3 * 3 * 3 * 7:
    ans = 3    
elif n < 3 * 5 * 13:
    ans = 4
else:
    ans = 5
print(ans)