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):
import itertools
n=int(input())
ans=0
l=[3,5,7,11,13]
c=list(itertools.combinations(l,3))
for i in c:
    if i[0]*i[1]*i[2]<=n:ans+=1
p=list(itertools.permutations(l,2))
for i in p:
    if i[0]**3*i[1]<=n: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 divisors

n = int(input())
modList = []
count = 0

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

Solution (Python):



n = int(input())

def count(n):
    c = 0
    for i in range(1,n+1):
        if n % i == 0:
            c += 1
    return c
ans = 0
for i in range(1,n+1):
    if i % 2 == 0:continue
    x = count(i)
    if x == 8:
        ans += 1
print(ans)

Solution (Python):
a = int(input())
b = 0

for i in range(1,a+1,2):
  c = 0
  for j in range(1,a+1,2):
    if i%j==0:
      c+=1
  else:
    if c==8:
      b+=1
else:
  print(b)

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

from collections import Counter

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

div = [len(make_divisors(i)) for i in range(N+1)][1:N+1:2]
d = Counter(div)

print(d[8])

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

Solution (Python):
import bisect

N = int(input())

lst = [105, 135, 165, 189, 195]
ans = bisect.bisect_right(lst, N)
print(ans)

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

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

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

N = int(input())
c = 0

for i in range(1, N+1, 2):
    if len(compute_divisors(i)) == 8:
        c += 1
print(c)

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





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

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

def chk(n):
    cnt = 0
    for i in range(1, n + 1):
        if n % i == 0:
            cnt += 1
    return cnt == 8

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

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

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

    return c

ans = 0

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

print(ans)

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

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

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

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

    if m == 8:
        ans += 1

print(ans)

Solution (Python):
n = int(input())
l = [i for i in range(1, n+1) if i%2 == 1]
ans = 0
cnt = 0
for i in l:
    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())
ans = 0


for i in range(1,N+1,2):
	
	count=0	 
	
	for j in range(1,200,2):
		if j <= i and i % j ==0:
			
			count += 1
		else:
			continue
	if count == 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 divisors

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

Solution (Python):
def make_division(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_cnt = 0
for num in range(n+1):
    cnt = 0
    if num%2==0:
        pass
    else:
        cnt = make_division(num)
        if cnt == 8:
            ans_cnt += 1
print(ans_cnt)

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

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


def yakusuu(num):
    res = 0
    for i in range(num):
        if num%(i+1) == 0:
            res += 1
    return res

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

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

    if cnt==8:
        cnt_i+=1
        
    cnt = 0

print(cnt_i)

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

Solution (Python):
n = int(input())
def get_divisor(x):
  divisor = set()
  for i in range(1, int(x**(1/2))+1):
    if x%i==0:
      divisor.add(i)
      divisor.add(x//i)
  return divisor
ans = 0
for i in range(1, n+1, 2):
  if len(get_divisor(i))==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):
def divc(num):
    count = 0
    for i in range(1, num+1):
        if num % i == 0:
            count += 1
    
    return count

n = int(input())
ans = 0
for i in range(1, n+1):
    if i % 2 != 0 and divc(i) == 8:
        ans += 1

print(ans)

Solution (Python):
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

N = n()

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

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

print(total)

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

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

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

Solution (Python):
def divisor(n):
    div = set()
    for i in range(1, n // 2 + 1):
        d, m = n // i, n % i
        if m == 0:
            div.add(i)
            div.add(d)
        if d < i:
            break
    return sorted(list(div))  

n = int(input())
if n < 105:
  print(0)
else:
  count = 0
  for n in range(105, n + 1, 2):
    if len(divisor(n)) == 8:
      count += 1
  print(count)

Solution (Python):
def abc():
    n = int(input())
    odd = [x for x in range(1, n + 1) if x % 2]
    cnt = 0
    for o in odd:
        divisor = [x for x in range(1, o + 1) if o % x == 0]
        if len(divisor) == 8:
            cnt += 1
    print(cnt)


abc()

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

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

        j += 1

        if i % j == 0:

            Npn += 1

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


print (ans)

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

Solution (Python):
x = 0
for i in range(1 , int(input()) + 1):
    if i == 105 or i == 135 or i == 165 or i == 189 or i == 195:
        x += 1
print(x)

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


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

print(cnt)

Solution (Python):
N = int(input())
x = 0
for i in range(1, N + 1):
    y = 0
    over = False
    m = False
    if i % 2 != 0:


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


                if (y == 8) & (over == False):
                    x = x + 1
                    over = True

                elif (y < 8) & (over == True) & (m == False):
                    x = x -1

print(x)

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



print(A)

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

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

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

N, = map(int, input().split())

def f(n):
    a = set()
    
    for i in range(1, n + 1):
        if n % i == 0:
            a.add(n // i)
            a.add(i)
            
    return len(a)
    
print(len([v for v in range(1, N + 1) if v % 2 == 1 and f(v) == 8]))

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

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

Solution (Python):
N=int(input())
list=list()
cnt=0
for i in range(105,N+1,2):
    list=[j for j in range(1,200)if i%j<1]
    if len(list) >=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

answer = 0
for i in range(1, n+1):
  if (i % 2 == 0):
    continue
  else:
    yakusu = make_divisors(i)
    if (len(yakusu) == 8):
      answer += 1


print(answer)

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

def divcnt(x):
    cnt = 0
    for i in range(1, x+1):
        if x % i == 0:
            cnt += 1
    return cnt

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

print(ans)

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

if a == 105:
    cnt = 1
elif a <= 104:
    cnt = 0
else:
    cnt = 0
    divs = 0
    for i in range(1,a+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):
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):
    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):
    c=0
    for j in range(1,i+1):
        if i%j==0:
            c+=1
    ans+=1 if c==8 else 0
print(ans)

Solution (Python):
a = int(input())
ans = [105,135,165,189,195]
c=0
for i in range(len(ans)):
    if ans[i]<=a:
        c+=1

print(c)

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 = [0]*201
for i in range(1, N+1, 2):
    l[i] = len([i for x in range(1, i+1) if i%x==0])
print(l.count(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)
    divisors.sort()
    return divisors

N = int(input())

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

print(cnt)

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

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

cnt=0
for j in range(1,N+1,2):
    n=int(math.sqrt(j))
    yaku=0
    for i in range(n):
        if j%(i+1)==0:
            yaku+=1
    
    if yaku*2==8:
        cnt+=1
print(cnt)

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

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

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

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

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

Solution (Python):
N = int(input())
nm_of_odd = 0
for n in range(1, N+1, 2):
  nm_of_divisor = 0
  for d in range(1, n+1, 2):
    if n % d == 0:
      nm_of_divisor += 1
  if nm_of_divisor == 8:
    nm_of_odd += 1
print(nm_of_odd)

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

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

result = 0


for i in range(1, N+1):
    cnt = 0
    if i % 2 ==0:
        continue
    for x in range(1, N+1):
        if i % x == 0:
            cnt += 1
    
    
    if cnt == 8:
        result += 1
print(result)

Solution (Python):
def f(n):
    if n == 1:
        return 1
    divs = {}
    div = 3
    while n > 1:
        if n % div == 0:
            n //= div
            if div in divs:
                divs[div] += 1
            else:
                divs[div] = 1
        else:
            div += 2
    ans = 1
    for div in divs.values():
        ans *= div + 1
    return ans


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

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

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

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

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

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

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

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

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

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

print(count2)

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

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

print(ans)

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

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

print(ans)

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

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

n = int(input())
count = 0
if n < 105 :
	pass
else :
	for i in range(105,n+1) :
		if i%2 != 0 :
			if len(get_divisor(i)) == 8:
				count += 1

print(count)

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

def fact(x):
  prime = {}
  if x == 1: prime[1] = 1
  for i in range(2,x+1):
    while True:
      if x % i == 0:
        if i in prime:
          prime[i] += 1
        else: prime[i] = 1
        x //= i
      else: break
  return prime

ans = 0

for i in range(n):
  prime = fact(i+1)
  a = 1
  for j in prime:
    a *= (prime[j]+1)
  if a == 8 and (i+1) % 2 == 1:
    ans += 1

print(ans)

Solution (Python):
n=int(input())
if n<105:
  print(0)
else:
  ans=0
  for i in range(105,n+1,2):
    cnt=0
    for j in range(1,i+1,2):
      if i % j==0:
        cnt +=1
    else:
      if cnt == 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 solve(n,i,flg):
    if n%i != 0:
        return flg
    else:
        flg += 1
    return solve(int(n/i),i,flg)
if __name__ == '__main__':
    
    n = int(input())
    if n <= 104:
        print(0)
    
    else:
            
        so = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]
        count = 0
        for k in range(104,n+1):
            if k%2 == 1:
                cnt_list = []
                for j in so:
                    cnt = solve(k,j,0)
                    cnt_list.append(cnt)
                cnt_list.sort(reverse=True)
                
                if (cnt_list[0:4] == [7,0,0,0]) or (cnt_list[:4] == [3,1,0,0]) or (cnt_list[:4] == [1,1,1,0]) :
                    count += 1
                
        
        print(count)

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

num8 = 0
for i in range(1,N+1,2):
    dividend = i
    divisor = 2
    count = 0
    while dividend != 1 and divisor <= (i//2):
        if dividend % divisor == 0:
            dividend = dividend // divisor
            count += 1

        divisor += 1
    
    if count == 3:
        num8 += 1

print(num8)

Solution (Python):

N=int(input())


ans=0

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

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

    
    if c==8:
      ans+=1


print(ans)

Solution (Python):

import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
	
def main():
	N = int(input())
	
	ans = 0
	for i in range(1, N+1, 2):
		tmp = make_divisors(i)
		if len(tmp) == 8:
			ans += 1
	
	print(ans)
	
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    
    return divisors
	
if __name__ == "__main__":
	main()

Solution (Python):
def divisible_count(n):
    
    divisors = 0
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0:
            divisors += 1
            if i != n // i:
                divisors += 1
    return divisors


n = int(input())
print(sum(divisible_count(x) == 8 for x in range(1, n+1, 2)))

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

print(count)

Solution (Python):
def judge(n):
	lst = []
	for i in range(1, n+1):
		if n%i == 0: lst.append(i)
	if len(lst) == 8: return True
	return False

N = int(raw_input())
index = 1
cnt = 0
while index <= N:
	if judge(index): cnt += 1
	index += 2
print cnt

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

for n in range(9, N+1, 2):
    a = 0
    for i in range(1, N+1, 2):
        if n % i == 0:
            a += 1
    if a == 8:
        ans += 1

print(ans)

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

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

Solution (Python):

N = int(input())
ans = 0
s = 0
for i in range(1,N+1,2):
    L = i
    divisors=[0]*(i+1)
    cnt = 1
    
    for j in range(2,N+1):
        while True:
            if L % j == 0:
                divisors[j] += 1
                L //= j
                if L == 1:
                    s = 1 
                    break
            else:
                break

    for div in divisors:
        cnt *= (div+1)
    if cnt == 8:
        ans += 1
    

print(ans)

Solution (Python):
n=int(input())
s={3,5,7,11,13}
l=[]
for i in range((n+1)//2):
    x=2*i+1
    count=0
    for j in s:
        if x%j==0:
            count+=1
    if count==3:
        l.append(x)
    elif x==27*5 or x==27*7:
        l.append(x)
print(len(l))

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

N = int(input())
c = 0

for i in range(1, N+1, 2):
    if len(compute_divisors(i)) == 8:
        c += 1
print(c)

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

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

N = int(input())
if N<105:
    print(0)
else:
    c = 0
    for i in range(105,N+1,2):
        if md(i) == 8:c+=1
    print(c)

Solution (Python):

import sys

def isSpecial(n):
    cnt = 1
    for i in range(3,n+1):
        if n % i == 0:
            cnt += 1
    return cnt == 8




def solve(N: int):
    cnt = 0
    for i in range(1,N+1,2):
        if isSpecial(i):
            cnt += 1
    print(cnt)
    return



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

if __name__ == '__main__':
    main()

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

Solution (Python):
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    cnt = 0
    n = f()[0]
    for i in range(1,n+1):
        cnt_divisor = 0
        if i%2 == 0:
            continue
        for j in range(1, i+1):
            if i%j == 0:
                cnt_divisor += 1
        
        if cnt_divisor == 8:
            cnt += 1
    
    print(cnt)

solve()

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

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

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

def main():
    a = 0
    for i in range(1,n+1):
        c = 0
        if i %2 != 0:
            for j in range(1,i+1):
                if i % j == 0:
                    c += 1
            if c == 8:
                a += 1
                
    return a

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

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

def main():
    a = 0
    for i in range(1,n+1):
        c = 0
        if i %2 != 0:
            for j in range(1,i+1):
                if i % j == 0:
                    c += 1
            if c == 8:
                a += 1
                
    return a

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