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 num_factors(n):
    res = 1
    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
            res *= (cnt + 1)    
    if temp != 1:
        res *= 2
    if res == 1:
        res = 2    
    return res


N = int(input())
ans = 0
for n in range(3, N+1, 2):
  if num_factors(n) == 8:
    ans += 1

print(ans)

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

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

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

    if cnt == 8:
        cnt2 += 1


print(cnt2)

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

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

cnt=0

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

Solution (Python):
import math
n = int(input())
ans = 0
if n > 104:
    for i in range(105,n+1)[::2]:
        cnt = 0
        for j in range(1,math.ceil(i**0.5)):
            if i%j == 0:
                cnt += 2
            if j**2 == i:
                cnt -= 1
        if cnt == 8:
            ans += 1
print(ans)

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

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

if __name__ == '__main__':
    resolve()

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, 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())
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):
import math
import copy
from copy import deepcopy
import sys
import fractions

from functools import reduce

import decimal
import heapq
import collections
import itertools
from operator import mul

sys.setrecursionlimit(100001)







def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList




n = int(input())

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

    if tmp == 8:
        ans += 1

print(ans)

Solution (Python):
n = int(input())
ans = 0
for i in range(1,n+1,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())
li1 = list(range(1, n+1, 2))
li2 = list(range(1, n+1, 1))
count = 0
ans = 0
for i in li1:
    for j in li2:
        if i % j == 0:
            count += 1
    if count == 8:
        ans += 1
    count = 0
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())

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

    if yakusu == 8:
        ans += 1

print(ans)

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

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


dict = {}
for i in range(N+1):
    if i % 2 == 1:
        dict[i] = 0
        for j in range(1, N+1):
            if i % j == 0:
                dict[i] += 1
            else:
                continue
    else:
        continue

count = 0
for i in dict.values():
    if i == 8:
        count += 1
    else:
        continue

print(count)

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

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

print(cnt)

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

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

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

Solution (Python):
def div(N):
    div = set()
    for i in range(1, int(N ** 0.5 + 0.5) + 1):
        if N % i == 0:
            div.add(i)
            div.add(N // i)
    return len(div)


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

Solution (Python):



def solve(N):
    result = 0
    for x in range(1, N+1, 2):
        divisor_cnt = 0
        
        for i in range(1, x+1, 2):
            
            if x % i == 0:
                divisor_cnt += 1
        if divisor_cnt == 8:
            result += 1

    return result


if __name__ == "__main__":
    N = int(input())
    print(solve(N))

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

Solution (Python):



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

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

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

div8 = []
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:
        div8.append(i)

print(len(div8))

Solution (Python):


N = int(input())

import math
primes = []
p = [ x for x in range(2, math.floor(math.sqrt(N))+1) ]
while len(p) > 0:
    pi = p.pop(0)
    primes.append(pi)
    for pj in p:
        if pj % pi == 0:
            p.remove(pj)

primes.remove(2)

count = 0

for a in primes:
    n = pow(a, 7)
    if n <= N:
        count += 1

for a in primes:
    for b in primes:
        if a == b:
            continue
        n = pow(a, 3) * pow(b, 1)
        if n <= N:
            count += 1

for a in primes:
    for b in primes:
        for c in primes:
            if a >= b or b >= c:
                continue
            n = a * b * c
            if n <= N:
                count += 1

print(count)

Solution (Python):



N = int(input())


def prime_factor(x):
    m = {}
    i = 2
    while i ** 2 <= x:
        while x % i == 0:
            if i in m:
                m[i] += 1
            else:
                m[i] = 1
            x //= i
        i += 1
    if x != 1:
        m[x] = 1
    return m


def len_divisor(x):
    m = prime_factor(x)
    ans = 1
    for n in m.values():
        ans *= n + 1
    return ans        


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


if __name__ == "__main__":
    main()

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

def count_div(i):
    ret = 0
    for j in range(1, i + 1):
        if i % j == 0:
            ret += 1
    
    return ret

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

print(ans)

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

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

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

print(cc)

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

Solution (Python):

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

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


if __name__ == "__main__":
    main()

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

a = [3,5,7,11,13]
b = []
c = list(itertools.combinations([0, 1, 2, 3 , 4], 3))
for j in range(len(c)):
    b.append(a[c[j][0]] * a[c[j][1]] * a[c[j][2]])
c = list(itertools.combinations([0, 1, 2, 3 , 4], 2))
for j in range(len(c)):
    b.append(a[c[j][0]]**3 * a[c[j][1]])

ans = 0
for i in b:
    if n >= i:
        ans += 1
print(ans)

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

Solution (Python):
def yaku(n):
	a=1
	p=[3,5,7,11,13]
	for i in p:
		j=0
		while n%i==0:
			n//=i
			j+=1
		a*=j+1
	return a
print(sum([1 for i in range(int(input())+1) if i%2==1 and yaku(i)==8]))

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):
def inpl():
    return list(map(int, input().split()))


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


N = int(input())

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

Solution (Python):


N=int(input())
ans=0
for n in range(3,N+1)[::2]:
    count=0
    cor=int(n**0.5//1)
    for i in range(1,cor+1):
        if n/i==n//i:
            count+=2
    if cor==n/cor:
        count-=1
    if count==8:
        ans+=1
    
print(ans)

Solution (Python):
def fn(a):
  alist =[]
  for i in range(1,a+1):
    if a%i == 0:
      alist.append(i)
  return len(alist)
n = int(input())
anslist =[]
for i in range(1,n+1):
  if fn(i) == 8 and i%2 == 1:
    anslist.append(i)
print(len(anslist))

Solution (Python):

import collections
import itertools as it
import math
import numpy as np

def yakusu(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


A = int(input())






c = 0
for n in range(1, A+1):
    if n % 2 == 1 and len(yakusu(n)) == 8:
        c += 1

print(c)

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

count = 0
for i in range(1, N+1):
    yakusu_count = 0

    if i % 2 == 0:
        continue

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

    if yakusu_count == 8:
        count += 1

print(count)

Solution (Python):
from math import sqrt
import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines


def prime_enumeration(n):
    div = 0
    for i in range(1, int(sqrt(n))+1):
        if n % i == 0:
            div += 1
            if n // i != i:
                div += 1

    return div == 8


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

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


if __name__ == "__main__":
    main()

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

L = []
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:
        L.append(i)
print(len(L))

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

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

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

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

res = 0
for i in range(1,N+1):
  if i == 1:
    continue
  if i % 2 == 0:
    continue
  divisors = calc_divisors(i)
  if len(divisors) == 8:
    res += 1
  
print(res)

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


def II(): return int(input())
def MI(): return map(int,input().split())
def LI(): return list(map(int,input().split()))





def main():
	n=II()
	li=[105,135,165,189,195]
	ans=0
	for i in range(n+1):
		if i in li:
			ans+=1
	print(ans)















if __name__ == "__main__":
	main()

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

print(len(ans))

Solution (Python):


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

N = int(input())

if N < 105:
    print(0)
    exit()
elif N == 105:
    print(1)
    exit()

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

print(ans)

Solution (Python):
import itertools
import math

N = int(input())
cnt = 0
listA = []
for i in range(3, int(math.sqrt(N)+1), 2):
    listA.append(i)

listB = list(itertools.combinations(listA, 3))

for listC in listB:
    seki = 1
    for x in listC:
        seki = seki * x
    if seki <= N:
        cnt += 1
print(cnt)

Solution (Python):
N = int(input())
A = [105, 135, 165, 189, 195]
print(sum([1 for a in A if a <= N]))

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

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)
    return divisors

for odd in [i for i in range(1, n + 1, 2)]:
    
    if len(divisor(odd)) == 8:
        count += 1
print(count)

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

    if cnt == 8 and i % 2 == 1:
        ans += 1

print(ans)

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


def divisor_count(n):
    i = 1
    count = 0

    while(i * i <= n):
        if n % i == 0:
            count += 1
            if n != i * i:
                count += 1
        i += 1

    return count

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

print(result)

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

Solution (Python):

import sys
import re
from decimal import *

l = sys.stdin.readline()


n = int(l)

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

print(tcount)

sys.stdout.flush()

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

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

res = 0
for elem in cnt:
  if elem == 8:
    res += 1
print(res)

Solution (Python):
n=int(input())
def make_divisor_list(num):
    if num < 1:
        return []
    elif num == 1:
        return [1]
    else:
        divisor_list = []
        divisor_list.append(1)
        for i in range(2, num // 2 + 1):
            if num % i == 0:
                divisor_list.append(i)
        divisor_list.append(num)

        return divisor_list
cnt=0
for i in range(1,n+1,2):
    if len(make_divisor_list(i))==8:
        cnt+=1
print(cnt)

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

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

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

Solution (Python):
def divisor_all(n): 
    l = [1,n]
    for i in range(2,int(pow(n,1/2))+1):
        if n % i == 0:
            if i == n//i:
                l.append(i)
            else:
                l.append(i)
                l.append(n//i)
    l.sort()
    return l 
N = int(input())
ans = 0
for i in range(1,N+1,2):
    if len(divisor_all(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


def main():
    n = int(input())
    ans = 0
    for i in range(1, n+1):
        if i % 2 != 0 and len(divisor(i)) == 8:
            ans += 1
    print(ans)


if __name__ == "__main__":
    main()

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

print(ans)

Solution (Python):
import sys
import itertools
import math
from collections import deque
MAX_INT = int(10e15)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N = I()

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

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

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

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

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

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

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

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

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

ans = 0
for i in range(1,N+1,2):
    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())
def cnt_div(n):
    cnt = 0
    for i in range(1,n+1):
        if i*i>n:break
        if n%i==0:
            cnt+=1
            if n//i!=i:
                cnt+=1
    return cnt
cnt = 0
for i in range(1,N+1):
    if i%2==1 and cnt_div(i)==8:
        cnt+=1
print(cnt)

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

Solution (Python):
d8 = [105, 135, 165, 189, 195]
n = int(input())
print(sum([1 for i in d8 if i <= n]))

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

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())
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):
l = [3*5*7, 3*5*11, 3*5*13, 3**3*5, 3**3*7]

n = int(input())
ans = 0
for i in l:
    if i <= n:
        ans += 1
print(ans)

Solution (Python):
l = [3*5*7, 3*5*11, 3*5*13, 3**3*5, 3**3*7]

n = int(input())
ans = 0
for i in l:
    if i <= n:
        ans += 1
print(ans)

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

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 odd_number_has_eigith_divisors(odd_number):
    divisor_number = 0
    for n in range(1, odd_number+1):
        divisor = 0
        if n % 2 == 0:
            pass
        else:
            for i in range(1, n+1):
                if n % i == 0:
                    divisor += 1
            if divisor == 8:
                divisor_number += 1

    return divisor_number


if __name__ == '__main__':
    input_num = int(input())
    print(odd_number_has_eigith_divisors(input_num))

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

Solution (Python):
import math
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())
table = [-1] + [1] * N
for i in range(3, N+1):
  for j in range(i, N+1, i):
    table[j] += 1
print(sum([True for i, _ in enumerate(table) if i % 2 and _ == 8]))

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

Solution (Python):

import sys

N = int(input().strip())


if N <= 104:
    print(0)
    sys.exit()
elif N == 105:
    print(1)
    sys.exit()
else:
    ans_list=[105]
    for i in range(107,N+1,2):
        cnt=0
        for j in range(1,N+1):
            if i % j == 0:
                cnt += 1
        
        if cnt == 8:
            ans_list.append(i)

print(len(ans_list))

Solution (Python):
n=int(input())
import math
ans=0
def yakusu(n):
  ans_local=set()
  for i in range(1,int(math.sqrt(n))+1):
    if n%i==0:
      ans_local = ans_local | set([i,n//i]) 
  return list(ans_local)  
for i in range(1,n+1,2):
    if len(yakusu(i))==8:
        ans+=1
print(ans)

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

    
    return len(divisors)

n=int(input())
ans=0

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

print(ans)

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

N = int(input())
ans = 0

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

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

Solution (Python):
def is_ans(n:int) -> int:
    count = 0
    for i in range(1,n+1):
        if n%i == 0:
            count += 1
    return count

def main():
    tmp = 0
    ans = 0
    n = int(input())
    for i in range(1,n+1):
        if i%2 == 1:
            tmp = is_ans(i)
        if tmp == 8:
            ans += 1
        tmp = 0
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):


N = int(input().split()[0])
total = 0
for i in range(1, N + 1):  
    a = i
    if a % 2 == 0:
        continue
    c = 0
    for j in range(1, N + 1):  
        if a % j == 0:
            c += 1
    if c == 8:
        total += 1
ans = total
print(ans)

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

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

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

Solution (Python):
def main(n):
    ans = 0

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

        l = 0
        for j in range(1, i + 1):

            if i % j == 0:
                l += 1

        if l == 8:
            ans += 1

    print(ans)


if __name__ == "__main__":
    n = int(input())

    main(n)

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)
    divisors.sort()
    return divisors


N = int(input())

count=0
mitasuN=[]
for i in range(1,N+1,2):
    tmp_s = make_divisors(i)
    
    if len(tmp_s)==8:
        count+=1
        mitasuN.append(i)

print(count)

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

Solution (Python):

def yakusu(num):
    x=num
    count=0
    i=0
    while (i<num):
        i+=1
        if (num%i==0):
            num=num/i
            count+=2
            if (num**2==x):
                count-=1
    return count

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

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

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