Problem:
 Score: 200 points    Problem Statement  The number 105 is quite special - it is odd but still it has eight divisors.
Now, your task is this: how many odd numbers with exactly eight positive divisors are there between 1 and N (inclusive)?      Constraints   N is an integer between 1 and 200 (inclusive).         Input  Input is given from Standard Input in the following format:  N       Output  Print the count.        Sample Input 1 105      Sample Output 1 1  Among the numbers between 1 and 105 , the only number that is odd and has exactly eight divisors is 105 .       Sample Input 2 7      Sample Output 2 0  1 has one divisor. 3 , 5 and 7 are all prime and have two divisors. Thus, there is no number that satisfies the condition.

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

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

N = I()
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 solve(num):
    cnt = 0
    for i in range(1,num+1):
        if num % i == 0:
            cnt += 1
    return cnt

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

print(ans)

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


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

print(ans)

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

Solution (Python):
N = int(input())
xList = [105,135,165,189,195]
answer = 0
for i in xList:
    if i <= N:
        answer += 1
print(answer)

Solution (Python):


import math

import itertools
from collections import deque
from collections import Counter
import heapq
from fractions  import gcd

import bisect
n=int(input())
ans=0
for i in range(1,n+1,2):
    s=set()
    for j in range(1,int(pow(i,0.5)+1)):
        if i%j==0:
            s.add(j)
            s.add(i//j)
    if len(s)==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:
        ans += 1
    if ans == 8:
      count += 1
  ans = 0
print(count)

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

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


def divisors(num):
    array = []
    limit = int(num ** 0.5) + 1
    for i in range(1, limit):
        if num % i == 0:
            div1 = i
            div2 = num//i
            array.append(div1)
            if div1 != div2:
                array.append(div2)
    array.sort()
    return array


def main():
    n = int(input())
    ans = 0
    for i in range(1, n+1, 2):
        count = len(divisors(i))
        if count == 8:
            ans += 1

    print(ans)


if __name__ == "__main__":
    main()

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

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

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):
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())
num = 0
for i in range(1, N+1):
  if i % 2 == 0:
    pass
  else:
    a = 0
    for j in range(1, i+1):
      if i % j == 0:
        a += 1
    if a == 8:
      num += 1
print(num)

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

result = 0
for i in range(n):
    num = i*2
    if num > n:
        break
    hasndivisors = 0
    for divisor in range(n):
        
        if (num+1)/(divisor+1) == (num+1)//(divisor+1):
            hasndivisors += 1
    
    if hasndivisors == 8:
        result += 1

print(result)

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

    if divisor_counter == 8:
        counter += 1
print(counter)

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

if N < 105:
  ans = 0
elif N == 105:
  ans = 1
else:
  ans = 1
  for n in range(106, N+1):
    if n % 2 == 0:
      continue
    count = 0
    for i in range(1, int(n**(1/2))+1):
      if n % i == 0:
      	count += 1
    if count == 4:
      ans += 1
print(ans)

Solution (Python):
prime = [3, 5, 7, 11, 13, 17]
N = int(input())
ans = 0
for i in range(1, N+1, 2):
    a = 1; x = i
    for j in range(6):
        n = prime[j]    
        w = 0
        while x%n == 0:
            x = x//n
            w += 1 
        a *= w + 1
        if x  == 1:
            break
    if a == 8:
        ans += 1
print(ans)

Solution (Python):
def factorization(n):
    retlist = []
    tmp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if tmp % i == 0:
            cnt = 0
            while tmp % i == 0:
                cnt += 1
                tmp //= i
            retlist.append([i, cnt])

    if tmp != 1:
        retlist.append([tmp, 1])

    if retlist == []:
        retlist.append([n, 1])

    return retlist

n = int(input())
ans = 0
for i in range(1,n+1,2):
    d = factorization(i)
    count = 1
    for k,val in d:
        count *= val+1
    if count == 8:
        ans += 1
print(ans)

Solution (Python):






































def calculation(lines):
    
    N = int(lines[0])
    cnt = 0
    for i in range(N+1):
        if i % 2 == 1:
            if get_yakusu_cnt(i) == 8:
                cnt += 1
    return [cnt]


def get_yakusu_cnt(n):
    
    if n % 81 == 0:
        n3 = 4
    elif n % 27 == 0:
        n3 = 3
    elif n % 9 == 0:
        n3 = 2
    elif n % 3 == 0:
        n3 = 1
    else:
        n3 = 0
    
    if n % 125 == 0:
        n5 = 3
    elif n % 25 == 0:
        n5 = 2
    elif n % 5 == 0:
        n5 = 1
    else:
        n5 = 0
    
    if n % 49 == 0:
        n7 = 2
    elif n % 7 == 0:
        n7 = 1
    else:
        n7 = 0
    
    if n % 121 == 0:
        n11 = 2
    elif n % 11 == 0:
        n11 = 1
    else:
        n11 = 0
    
    if n % 169 == 0:
        n13 = 2
    elif n % 13 == 0:
        n13 = 1
    else:
        n13 = 0
    return (n3+1)*(n5+1)*(n7+1)*(n11+1)*(n13+1)



def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines



def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['105']
        lines_export = [1]
    if pattern == 2:
        lines_input = ['7']
        lines_export = [0]
    return lines_input, lines_export



def get_mode():
    import sys
    args = sys.argv
    if len(args) == 1:
        mode = 0
    else:
        mode = int(args[1])
    return mode



def main():
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    
    
    
    
    
    
    
    



if __name__ == '__main__':
    main()

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

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



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

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

Solution (Python):
if __name__ == '__main__':

	n = int(input())

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

	print(cnt)

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 x in range(n+1):
  if x%2==1:
    
    s=make_divisors(x)
    if len(s)==8:
      ans+=1
    
print(ans)

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


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


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

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

ans = 0

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

    count = 0

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

    if count == 8:
        ans += 1

print(ans)

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

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

Solution (Python):
N=int(input())
res = 0
def checkOdd(N):
  k = 0
  for i in range(1,N+1):
    if N % i ==0:
      k += 1
  if k == 8:
    return True
  else:
    return False
 
if N<104:
  print(res)
else:
  for i in range(105,N+1,2):
    if checkOdd(i):
      res += 1
  print(res)

Solution (Python):


def main():

    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)


if __name__ == "__main__":
    main()

Solution (Python):

def divisor_count(n:int) -> int:
  count = 0
  for x in range(1, n+1):
    if n % x == 0:
      count += 1
  
  return count

def solve(n: int) -> int:
  
  result = 0
  for x in range(1, n+1, 2):
    if divisor_count(x) == 8:
      result += 1
  return result
  
N = int(input())
print(solve(N))

Solution (Python):

def divisor_count(n:int) -> int:
  count = 0
  for x in range(1, n+1):
    if n % x == 0:
      count += 1
  
  return count

def solve(n: int) -> int:
  
  result = 0
  for x in range(1, n+1):
    if x&1 and divisor_count(x) == 8:
      result += 1
  return result
  
N = int(input())
print(solve(N))

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

print(ans)

Solution (Python):
N = int(input())
a = [0 for _ in range(N + 10)]

for i in range(1, N + 5):
    temp = i
    while(temp <= N):
        a[temp] += 1
        temp += i
ans = 0
for i in range(1, N + 1, 2):
    if a[i] == 8:  ans += 1
print(ans)

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

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

score=0

for i in range((n+1)//2):
    i=i*2+1
    yakusuu1 = []
    yakusuu2 = []
    d=1
    while d*d <= i:
        if i%d==0:
            yakusuu1.append(d)
            
            if d!= i//d: 
                yakusuu2.append(i//d)
        
        d=d+1
    yakusuu = yakusuu1+yakusuu2[::-1]
    
    
    if len(yakusuu) == 8:
        score = score+1
print(score)

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

ans = 0
for n in range(1,int(N/2)+1):
    if 2*n+1 > N:
        break
    for i in range(1,int(N**(1/2)/2)+1):
        for j in range(i+1,int(N**(1/2)/2)+1):
            for k in range(j+1,int(N**(1/2)/2)+1):
                if 2*n+1 == (2*i+1)*(2*j+1)*(2*k+1):
                    ans += 1

print(ans)

Solution (Python):
N=int(input())
ans=0
for i in range(1,N+1,2):
    n=0
    for j in range(1,N+1,2):
        if i%j==0:
            n+=1
    if n==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):
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):
import sys
read = sys.stdin.read
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7

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

    print(ans)




if __name__ == '__main__':
    main()

Solution (Python):


N = int(input())


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

    ans += (div_count == 8)


print(ans)

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

Solution (Python):
"""
全探索
"""
n = int(input())
ans = 0
for num in range(1,n+1) :
    count = 0
    for i in range(1,num+1) :
        if num%i == 0 :
            count += 1
    if count == 8 and num%2 :
        ans += 1
print(ans)

Solution (Python):

import math

N = int(input())


def is_8(num):
    if num < 1:
        return False
    elif num == 1:
        return False
    else:
        divisor_list = set()
        divisor_list.add(1)
        
        for i in range(2, int(math.sqrt(num)) + 1):
            if num % i == 0:
                divisor_list.add(num // i)
                divisor_list.add(i)
        
        divisor_list.add(num)
        if len(divisor_list) == 8:
            return True

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

print(cnt)

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


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(readline())
l = []
for i in range(n+1):
    if len(make_divisors(i)) == 8 and i % 2 == 1:
        l.append(i)
print(len(l))

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

Solution (Python):
import math
def yakusu(n):
    count = 0
    for i in range(1,int(math.sqrt(n))+1+1):
        if n % i == 0:
            count += 2
    return count
N = int(input())
c = 0
for i in range(1,N+1,2):
    if yakusu(i) == 8:
        c+=1

print(c)

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

count = 0
total_count = 0

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

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

Solution (Python):
if __name__ == '__main__':
	n = int(input())

	cnt = 0
	ans = 0
	for x in range(1,n+1,2):
		cnt = 0
		for y in range(1,x+1):
			if x % y == 0:
				cnt += 1
		if cnt == 8:
			ans += 1

	print(ans)

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

if N >= 195:
    ans = 5
elif N >= 189:
    ans = 4
elif N >= 165:
    ans = 3
elif N >= 135:
    ans = 2
elif N >= 105:
    ans = 1
else:
    ans = 0

print(ans)

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

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

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

print(count)

Solution (Python):
S = int(input())
ans = 0
count = 0
for i in range(1, S+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):
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]
  
N = int(input())

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

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

Solution (Python):
import sys


def main():
    input = sys.stdin.buffer.readline
    n = int(input())
    cnt = [0] * (n + 1)
    for i in range(1, n + 1):
        for j in range(i, n + 1, i):
            cnt[j] += 1
    ans = len([i for i in range(1, n + 1, 2) if cnt[i] == 8])
    print(ans)


if __name__ == "__main__":
    main()

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

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

Solution (Python):
def mkdiv(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
n=int(input())

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

Solution (Python):
import math
def main():
  n = int(input())
  array=[]
  ans=0
  for i in range(1,n+1,2):
    num=0
    for j in range(1,i+1,2):
      if i%j==0:
        num+=1
    if num==8:
      ans+=1
  print(ans)
main()

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

cnt = 0
def primes(num):
  arr = []
  for i in range(1,int(num*(0.5))+1):
    if num%i == 0 and i not in arr:
      arr.append(i)
      if num//i not in arr:
        arr.append(num//i)
  return arr
      
for i in range(1,n+1,2):
  if len(primes(i))==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)

    divisors.sort()
    return divisors

count = 0

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

print(ans)

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 != 0:
        ans += 1
print(ans)

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

Solution (Python):


N = int(input())

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

print(count)

Solution (Python):
import sys
input = lambda: sys.stdin.readline().rstrip("\r\n")

n = int(input())

def num_divisors_table(n):
    table = [0] * (n + 1)
    
    for i in range(1, n + 1):
        for j in range(i, n + 1, i):
            table[j] += 1
    
    return table

table = num_divisors_table(n)
ans = 0
for i in range(1, n + 1, 2):
    if table[i] == 8:
        ans += 1
print(ans)

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

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

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

print(result)

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




def divnum(n):
    res=0
    for i in range(1,n+1):
        if n%i==0:
            res+=1
    if res==8:
        return True
    else:
        return False
count=0
for i in range(1,n+1):
    if i%2!=0 and divnum(i):
        count+=1
print(count)

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

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

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

ans = 0
for i in range(1, N+1):
    count = 0
    if i%2 is 0:
        continue
    for j in range(1, i):
        if (i/j).is_integer():
            count += 1
        if j == i-1 and count == 7:
            ans += 1
print(ans)

Solution (Python):
from math import sqrt, ceil
n = int(input())
ans = 0
for i in range(1, n+1, 2):
    score = 0
    for d in range(1, ceil(sqrt(i))+1):
        p, m = divmod(i, d)
        if m == 0:
            if p != d:
                score += 2
            else:
                score += 1
    if score == 8:
        ans += 1
print(ans)

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

        if tmp == 8:
            ans += 1
    print(ans)
    return

resolve()

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

def resolve():
    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)
    return

resolve()

Solution (Python):
def Div(N):
    L = []
    R = []
    I = 1
    while I*I<=N:
        if N%I==0:
            L.append(I)
            if I!=(N//I):
                R.append(N//I)
        I += 1
    return L+R[::-1]

N = int(input())
Count = 0
for T in range(1,N+1,2):
    if len(Div(T))==8:
        Count += 1
print(Count)

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

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

for n in range(N+1):
  if n%2==1:
    Y = 0
    for m in range(1,N+1):
      if n%m==0:
        Y+=1
    if Y==8:
      ans+=1
    
print(ans)

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

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

    divisors.sort()
    return divisors

n = int(input())


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

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

def divisor(n):
    res = []
    i = 1
    while i*i <= n:
        if n % i == 0:
            res.append(i)
            if i != n//i:
                res.append(n // i)
        i += 1
    return res

ans = 0
for i in range(1, N+1, 2):
    res = len(divisor(i))

    ans += 1 if res == 8 else 0

print(ans)

Solution (Python):
def cnt(N):
    res = 0
    for i in range(1,N+1):
        if N % i == 0:
            res += 1
    return res

N = int(input())

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

print(ans)

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

Solution (Python):
from math import sqrt

def yakusuu8(n):
    lst = []
    m = int(sqrt(n)) + 2
    for i in range(2, m):
        if n % i == 0:
            j = 1
            while True:
                if n % i == 0:
                    n //= i
                    j += 1
                else:
                    lst.append(j)    
                    break
    if n != 1:
        lst.append(2)
        
    yakusuu = 1
    for i in range(len(lst)):
        yakusuu *= lst[i]
    
    if yakusuu == 8:
        return True
    else:
        return False

n = int(input())

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

else:
    ans = 0
    for i in range(105, n + 1)[::2]:
        ans += yakusuu8(i)
    print(ans)

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

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

totalcount = 0

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

Solution (Python):
import sys

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

Solution (Python):
import collections
n = int(raw_input())
count = 0
cc= collections.Counter()
for i in range(1,n + 1):
	j = i
	while(j <= n):
		cc[j] += 1
		j +=i
	if i % 2 and cc[i] == 8 :
		count +=1
print count

Solution (Python):
from math import sqrt

N = int(input())
ans = 0
for M in range(105,N+1,1):
    if M%2==0:
        continue 
    count=0
    for i in range(1,int(sqrt(M))+2,1):
        if M % i ==0:
            if M % i == 0:
                count+=2
    if count==8:
        ans+=1
print(ans)

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

A = [0]*(N+1)
for i in range(1, N+1):
    for j in range(i, N+1, i):
        A[j] += 1

count = 0
for i in range(1, N+1):
    if i%2 == 1 and A[i] == 8:
        count += 1
print(count)

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

N = int(input())

s = list(range(1,N+1,2))
ans = 0
for i in s:

    if len(make_divisors(i)) == 8:
        ans += 1
print(ans)

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

table = ['x'] + ([0] * N)
for i in range(1,N+1):
    for j in range(i,N+1,i):
        table[j] += 1

ans = 0

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

print(ans)

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

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

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

Solution (Python):
import sys

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