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

def make_divisors(n: int):
    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):
    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 == 1:
        cnt = 0
        for j in range(1, i+1):
            if i % j == 0:
                cnt += 1
        if cnt == 8:
            ans += 1

print(ans)

Solution (Python):


def yakusu_rekkyo(n):
    yakusu = set()
    for i in range(1, int(pow(n, 0.5)+1)):
        if n%i == 0:
            yakusu.add(i)
            yakusu.add(n//i)
    return yakusu

N = int(input())
ans = 0
for i in range(105, N+1, 2):
    Y = yakusu_rekkyo(i)
    if len(Y) == 8:
        ans += 1
        
print(ans)

Solution (Python):
import sys
import itertools

import time
import math
 
sys.setrecursionlimit(10 ** 7)
 
from collections import defaultdict
 
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(input())

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


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

Solution (Python):
def actual(N):
    answer = 0

    odd_numbers = range(1, N + 1, 2)

    is_divisor = lambda num, i: num % i == 0

    for odd_num in odd_numbers:
        divisor_count = 0

        for i in range(1, odd_num + 1):
            if is_divisor(odd_num, i):
                divisor_count += 1

        if divisor_count == 8:
            answer += 1

    return answer

N = int(input())
print(actual(N))

Solution (Python):
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

N = int(input())

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

        if c == 8:
            cnt += 1

print(cnt)

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

for i in range(n + 1)[1::2]:
    c = 0
    j = i
    k = i
    while j > 0:
        if k % j == 0:
            c += 1
        j -= 1
    if c >= 8:
        p += 1

print(p)

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

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

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

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())
l=[3,5,7,11,13]
ans=[0]*10000
for i in range(3):
    for j in range(i+1,4):
        for k in range(j+1,5):
            ans[l[i]*l[j]*l[k]]=1
ans[135]=1
ans[189]=1
print(sum(ans[:n+1]))

Solution (Python):
def have_eight_divisor_odd(n):
    have_eight_divisor_odd_count = 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:
            have_eight_divisor_odd_count += 1
    return have_eight_divisor_odd_count

N = int(input())
result = have_eight_divisor_odd(N)
print(result)

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

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

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

print(ans)

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

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

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

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

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

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

    d = 0
    for i in range(1, n + 1, 2):
        c = 2
        for j in range(3, i // 2 + 1):
            if i % j == 0:
                c += 1
            if c > 8:
                break

        if c == 8:
            d += 1

    print(d)


if __name__ == '__main__':
    main()

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

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

if n == 1:
    print(0)

else:    
    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,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())
l=[]
for i in range(1,201):
    if i%2==0:
        l.append(0)
        continue
    c=0
    for j in range(1,i+1):
        if i%j==0:
            c+=1
    if c==8:
        l.append(1)
    else:
        l.append(0)
print(sum(l[:n]))

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

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

print(ans)

Solution (Python):
import sys


def main():
    n = int(sys.stdin.readline())

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

    dp = [0] * 201
    ans = 0

    for i in range(1, n + 1):
        for j in range(105, n + 1):
            if j % i == 0:
                dp[j] += 1

    for i in range(105, n + 1, 2):
        if dp[i] >= 8:
            ans += 1

    print(ans)


if __name__ == "__main__":
    main()

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

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

dp = [0] * 201
ans = 0

for i in range(1, n + 1):
    for j in range(105, n + 1):
        if j % i == 0:
            dp[j] += 1

for i in range(105, n + 1, 2):
    if dp[i] >= 8:
        ans += 1

print(ans)

Solution (Python):
class Factorization:	
	def __init__(self):
		
		self.__factors = dict()
		self.__n = 0
	
	
	def get_factors(self, n):
		
		self.__factors.clear()
		self.__n = n
		
		if n < 2:
			
			return { n:1 }
		else:
			self.__factorization()
			
			return self.__factors
	
	
	def get_divisors(self, n):
		
		self.__factors.clear()
		self.__n = n
		
		if n < 2:
			return [1]
		else:
			self.__factorization()
			divisors = [1]
			
			for k, v in self.__factors.items():
				import copy
				copy_ = copy.deepcopy(divisors)
								
				for i in range(1, v + 1):
					for c in copy_:
						divisors.append(c * (k ** i))
			
			return divisors

				
	def count_divisors(self, n):
		
		self.__factors.clear()
		self.__n = n
		
		if n < 2:
			return 1
		else:
			self.__factorization()
			count = 1
			
			for v in self.__factors.values():
				count *= v + 1
			
			return count
	

	def	__factorization(self):
		
		
		
		
		
		self.__divide_with(2)
		self.__divide_with(3)
		self.__divide_with(5)
			
		
		
		import math
		sqrt_ = math.floor(math.sqrt(self.__n))
			
		primes = [7, 11, 13, 17, 19, 23, 29, 31]
		i = 0
		is_break = False
			
		while self.__n > 1:
			for p in primes:
				if p + i <= sqrt_:
					self.__divide_with(p + i)
				else:
					
					is_break = True
						
					
					if self.__n > 1:
						self.__factors.setdefault(self.__n, 1)
				
			if is_break:
				break
			else:
				i += 30
	
	
	def __divide_with(self, d):
		count = 0
		
		while self.__n % d == 0:
			self.__n //= d
			count += 1
		
		if count > 0:
			self.__factors.setdefault(d, count)


n = int(input())
lib = Factorization()
ans = 0

for i in range(1, n + 1, 2):
	divisors = lib.get_divisors(i)
	
	if len(divisors) == 8:
		ans += 1

print(ans)

Solution (Python):
n=int(input())
if n<105:
  print(0)
  exit()
else:
  c=0
  for i in range(105,n+1,2):
    p=0
    for j in range(1,i//2+1,2):
      if i%j==0:
        p+=1
    if p==7:
      c+=1
print(c)

Solution (Python):
def main():
    ans = 0
    for i in range(1, int(input())+1, 2):
        c = 2 
        for j in range(2, i // 2):
            if i % j == 0:
                c += 1
        
        if c == 8:
            ans += 1
    print(ans)
        
if __name__ == "__main__":
    main()

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


for i in c:
  if i == 1:
    continue
  else:
    t = 2
    for k in range(1, c.index(i) - 1):
      if i % c[k] == 0:
        t += 1

    if t == 8:
      ans += 1

print(ans)

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

def make_divisors(n):
    from collections import deque
    divisors = deque([])
    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)
    lst_divisors = list(divisors)
    lst_divisors.sort()
    return lst_divisors

ans = 0
for i in range(1,-(-N//2)+1):
    now = 2*i-1
    if len(make_divisors(now)) == 8:
        ans += 1

print(ans)

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

Solution (Python):
import sys
from itertools import combinations
import math


def I(): return int(sys.stdin.readline().rstrip())


def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))


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


def LS(): return list(sys.stdin.readline().rstrip().split())


N = I()
ans = 0
if N >= 105:
    for i in range(105, N+1, 2):
        yakusu = 0
        for q in range(1, N+1):
            if i % q == 0:
                yakusu += 1
        if yakusu == 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 =[]
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.append(i)

print(len(ans))

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

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

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

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

print(count)

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

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

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


print(flag)

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]

ans=0

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

print(ans)

Solution (Python):


def factorization(n):
    ret = []
    i = 2
    if n == 1:
        return ret
    while i ** 2 <= n:
        while n % i == 0:
            n //= i
            ret.append(i)
        i += 1
    if n > 1:
        ret.append(n)
    return ret
    
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 x in range(1,n+1,2):
    cou = 0
    for j in range(1,x+1):
        if x % j == 0:
            cou += 1
    if cou == 8:
        ans += 1

print(ans)

Solution (Python):
import sys
n = int(input())
if n <= 3:
    print(3)
    sys.exit()
def check(a):
    sqrt = round(a ** 0.5 + 0.5)
    factors = {1, a}
    for i in range(2, sqrt + 1):
        if not a % i:
            if not i in factors:
                factors.add(i)
            j = a // i
            if not j in factors:
                factors.add(j)
    return len(factors)
ans = 0
for i in range(3, n + 1, 2):
    if check(i) == 8:
        ans += 1
print(ans)

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

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

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

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

print(ans)

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

Solution (Python):
def solve(N):
    allcount=0
    if N<105:
        return allcount
    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:
            allcount += 1
    return allcount


N=int(input())
print(solve(N))

Solution (Python):
def divisor(num):
  
  count=0
  for i in range(1,num+1):
    if (num%i==0):
      count+=1
  return count
 
n=int(input())
 
if(n<=105):
  if(n==105):
    print(1)
  else:
    print(0)
  exit()

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

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

Solution (Python):
def readinput():
    n=int(input())
    return n

def main(n):
    count=0
    for i in range(3,n+1,2):
        nc=0
        for j in range(1,i+1):
            if(i%j==0):
                nc+=1
        if nc==8:
            count+=1
    return count

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

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

Solution (Python):
import sys, math, itertools, collections, bisect 
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8') 
inf = float('inf') ;mod = 10**9+7 
mans = inf ;ans = 0 ;count = 0 ;pro = 1

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

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

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

count=0
ans=0
if n<=104:
    ans=0
else:
    for i in range(105,n+1):
        count=0
        for e in range(1,n+1):
            if i%2==0:
                break
            elif i%e==0:
                count+=1
        if count==8:
            ans+=1
print(ans)

Solution (Python):
def make_divisors(n):
    """
    約数を列挙
    入力：整数n
    戻り値：約数のリスト

    例
    入力：105
    戻り値：[1, 3, 5, 7, 15, 21, 35, 105]
    """
    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):
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

N = int(input())
count = 0

for i in range(1,N+1,2):
    if len(divisor(i)) == 8:
        count += 1


print(count)

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

def main():
    n = int(input())
    ans = 0
    for m in range(1, n + 1):
        if m % 2 == 0: continue
        factor = 0
        i = 1
        while i * i < m:
            if m % i == 0: factor += 2
            i += 1
        if i * i == m: factor += 1
        if factor == 8: ans += 1
        
    print(ans)


if __name__ == "__main__":
    main()

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

def cnt_factor(n):
    cnt = 0
    for b in range(1, n + 1):
        if n % b == 0:
            cnt += 1
    return cnt

cnt_list = []
for i in range(1, N + 1, 2):
    cnt_list.append(cnt_factor(i))

print(cnt_list.count(8))

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

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

print(count)

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

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

print(ans)

Solution (Python):
def has_8_of_divisors(N):
    return len(sum((list({n, N // n}) for n in range(1, int(N ** 0.5) + 1) if not N % n), [])) == 8
print(sum(map(has_8_of_divisors, range(1, int(input()) + 1, 2))))

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

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

Solution (Python):
def factorize(n):
    ans=[]
    while n%2==0:
        ans.append(2)
        n//=2
    f=3
    while f**2<=n:
        if n%f==0:
            ans.append(f)
            n//=f
        else:
            f+=2
    if n!=1:
        ans.append(n)
    return ans

n=int(input())
import collections

count=0
for i in range(1,n+1):
    if i%2==0:
        continue
    ans = collections.Counter(factorize(i))
    ans = ans.values()
    hoge=1
    for j in ans:
        hoge*=(j+1)
    if hoge==8:
        count+=1
print(count)

Solution (Python):
import itertools
N=int(input())
prime=[3,5,7,11,13,17,19]

comb = list(itertools.combinations(prime,3))

lst=[]
for i in range(len(comb)):
    temp=comb[i][0]*comb[i][1]*comb[i][2]
    if temp<=200:
        lst.append(temp)

lst.append(135)
lst.append(189)

ans = sum(N>=x for x in lst)
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())
arr = []
for i in range(1, n + 1):
  a = []
  for j in range(1, i + 1):
    if j % 2 == 1:
      if i % j == 0:
        a.append(j)
  if len(a) == 8:
    arr.append(i)
print(len(arr))

Solution (Python):
import sys
import itertools
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
N = int(read())
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):
def check(x):
    count = 0
    for num in range(1,x+1,2):
        if x % num == 0:
            count += 1
    return count

N = int(input())
ans = 0
for x in range(1,N+1):
    if check(x) == 8:
        ans += 1
print(ans)

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

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

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

Solution (Python):
n=int(input())
a=[3,5,7,9,11,13,17,19]

count=0
for i in range(len(a)):
  for j in range(i+1,len(a)):
    for k in range(j+1,len(a)):
      if a[i]*a[j]*a[k]<=n:
        count+=1

print(count)

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

count=0
for M in range(1,N+1):
	lis=[]
	if M%2==1:
		for i in range(1,M+1):
			if M/i == M//i:
				lis.append(i)

		if len(list(set(lis))) == 8:
			count+=1

print(count)

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


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

print(ans)

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

print(cnt)

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

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

Solution (Python):

def main():
    import sys
    N = int(sys.stdin.readline())
    
    def calc(num):
        cnt = 0
        for i in range(num, 0, -1):
            if num  % i==0:
                cnt+=1
        if cnt==8:
            
            return 1
        return 0
        
    
    ans = 0
    for i in range(1, N+1, 2):
        ans +=calc(i)
    print(ans)
    
                    
    

if __name__=='__main__':
    main()

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

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

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

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

Solution (Python):


n=int(input())

cnt8=0
for i in range(1,n+1):
    if i % 2 ==0:
        continue
    cntd=0
    for j in range(1,i+1):
        if i % j == 0:
            cntd+=1
    if cntd==8:
        cnt8+=1
print(cnt8)

Solution (Python):
import sys

n = int(sys.stdin.readline().rstrip("\n"))
count = 0
for num in range(27, n+1, 2):
    divisor = 1
    for p in range(1, num, 2):
        if num % p == 0:
            divisor += 1
    if divisor == 8:
        count += 1
print(count)

Solution (Python):
import sys

def main():
    N = int(input())
    
    cnt = 0
    for i in range(1, N+1, 2):
        prime_l = []
        for j in range(1, i+1, 2):
            if i%j==0:
                prime_l.append(j)
        if len(prime_l)==8:
            cnt+=1
    print(cnt)
main()

Solution (Python):

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

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

if n < 105:
    count = 0
else:
    for i in range(105, n + 1, 2):
        div_count = 0
        for j in range(1, i + 1):
            if i % j == 0:
                div_count += 1
        if div_count == 8:
            count += 1

print(count)

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

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

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

def solve(n):
    tmp=0
    for i in range(1,int(n**0.5)+1):
        if n%i==0:
            if n==i**2:
                tmp+=1
            else:
                tmp+=2
    return tmp

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

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

Solution (Python):
import math
def count_divisor(n):
    divisor = []
    for i in range(1, int(math.sqrt(n)) + 2):
        if n % i == 0:
            j = n // i
            if i != j:
                divisor.append(j)
            divisor.append(i)
    return len(divisor)

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

print(ans)

Solution (Python):
N  = int(input())
def divisor(n):
    div_list = []
    for i in range(1, int(1+ n**0.5)):
        if n%i == 0 and i**2 == n:
            div_list.append(i)
        elif n%i == 0:
            div_list.append(i)
            div_list.append(int(n/i))
    return div_list
counter = 0

for i in range(1,N+1):
    if i % 2 == 1 and len(divisor(i)) == 8:
        counter += 1
        
print(counter)

Solution (Python):
from math import sqrt

N = int(input())

ans = 0

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

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

    if sqrt(i).is_integer():
        cnt -= 1

    if cnt == 8:
        ans += 1

print(ans)

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

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

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

Solution (Python):
n = int(input())
if n<105:
    print(0)
    exit()
if n==105:
    print(1)
    exit()
res=1
for i in range(107,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:
        res+=1
print(res)

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

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

print(c)