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.



Sample input:
105


Sample output:
1

Submission status: Wrong Answer

Solution code:
import math

N = int(input())

def make_prime_list(num):
    if num < 2:
        return []

    prime_list = [i for i in range(num + 1)]
    prime_list[1] = 0 # 1は素数ではない
    num_sqrt = math.sqrt(num)

    for prime in prime_list:
        if prime == 0:
            continue
        if prime > num_sqrt:
            break

        for non_prime in range(2 * prime, num, prime):
            prime_list[non_prime] = 0

    return [prime for prime in prime_list if prime != 0]
def search_divisor_num_1(num):
    if num < 0:
        return None
    elif num == 1:
        return 1
    else:
        num_sqrt = math.floor(math.sqrt(num))
        prime_list = make_prime_list(num_sqrt)

        divisor_num = 1
        for prime in prime_list:
            count = 1
            while num % prime == 0:
                num //= prime
                count += 1
            divisor_num *= count

        if num != 1:
            divisor_num *= 2

        return divisor_num


list(map(search_divisor_num_1,list(range(1,N + 1))[:: 2])).count(8)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

if (0 <= N) and (N <105):
  print(0)
elif (105 <= N) and (N < 145):
  print(1)
elif (145 <= N) and (N < 165):
  print(2)
elif (165 <= N) and (N < 189):
  print(3)
elif (189 <= N) and (N < 189):
  print(4)
else:
  print(5)

Submission status: Wrong Answer

Solution code:
N = int(input())
if(N >= 105):
  print(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
N = int(input())

if N >= 195:
    print("4")
elif N >= 165:
    print("3")
elif N >= 135:
    print("2")
elif N >= 105:
    print("1")
else:
    print("0")

Submission status: Wrong Answer

Solution code:
N=int(input())

A=[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]

ans=0
for j in range(N):
    en=j+1
    if en%2==0:
        pass
    else:
        B=[0 for i in range(len(A))]
        for i in range(len(A)):
            if en%A[i]==0:
                B[i]+=1
                en=en/A[i]
        
        f=1
        for i in range(len(B)):
            f=f*(B[i]+1)
        
        if f==8:
            ans+=1

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

if N <= 104 and N >= 1:
  print(0)
elif N >= 105:
  print(1)
elif N >= 135:
  print(2)
elif N >= 145:
  print(3)
elif N >= 165:
  print(4)
elif N >= 189:
  print(5)
elif N >= 195:
  print(6)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 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:
            ans += 1
            print(i)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())
rr = 0

for j in range(n // 2 + 1):
    r = 0

    for i in range(2 * j + 1):
        if (2 * j + 1) % (i + 1) == 0:
            r += 1

    if r == 8:
        rr += 1

print(rr)

Submission status: Wrong Answer

Solution code:
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:
    print(4)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
for x in range(1,N):
    count = 0
    a,b,c = False, False, False
    while x % 2 == 0:
        count += 1
        x = x // 2
        a = True
    while x % 3 == 0:
        count += 1
        x = x // 3
        b = True
    while x % 5 == 0:
        count += 1
        x = x // 5
        c = True
    count = count + a + b + c
    if count == 8:
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
if n <= 104 or n%2 == 0:
    ans = 0
elif n >= 105 and n < 135:
    ans = 1
elif n >= 135 and n < 165:
    ans = 2
elif n >= 165 and n < 189:
    ans = 3
elif n >= 189 and n < 195:
    ans = 4
elif n >= 195 and n <= 200:
    ans = 5
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
# A, B = map(int, input().split())
# A = list(map(int, input().split()))
# d = [list(map(int, input().split())) for _ in range(N)]
# s = input()

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

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

if (0 <= N) and (N <105):
  print(0)
elif (105 <= N) and (N < 145):
  print(1)
elif (145 <= N) and (N < 165):
  print(2)
elif (165 <= N) and (N < 195):
  print(3)
else:
  print(4)

Submission status: Wrong Answer

Solution code:
# 105 = 3 * 5 * 7
# 1, 3, 5, 7, 15, 21, 35, 105
# 3 つの 素数を1回ずつ掛けてできる数
# 3, 5, 7, 11, 13, 17
# 3 * 5 * 11 = 165
# 3 * 5 * 13 = 195

N = int(input())

if N >= 195:
    print(3)
elif N >= 165:
    print(2)
elif N >= 105:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
import math

def make_prime_list_2(num):
    if num < 2:
        return []

    # 0のものは素数じゃないとする
    prime_list = [i for i in range(num + 1)]
    prime_list[1] = 0 # 1は素数ではない
    num_sqrt = math.sqrt(num)

    for prime in prime_list:
        if prime == 0:
            continue
        if prime > num_sqrt:
            break

        for non_prime in range(2 * prime, num, prime):
            prime_list[non_prime] = 0

    return [prime for prime in prime_list if prime != 0]
def search_divisor_num_1(num):
    if num < 0:
        return None
    elif num == 1:
        return 1
    else:
        num_sqrt = math.floor(math.sqrt(num))
        prime_list = make_prime_list_2(num_sqrt)

        divisor_num = 1
        for prime in prime_list:
            count = 1
            while num % prime == 0:
                num //= prime
                count += 1
            divisor_num *= count

        if num != 1:
            divisor_num *= 2

        return divisor_num

N = int(input())
list(map(search_divisor_num_1,list(range(1,N + 1))[:: 2])).count(8)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N < 105:
  print(0)
elif N < 135:
  print(1)
elif N < 189:
  print(2)
else:
  print(3)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans_list = []
for i in range(1, n + 1):
    count = 0
    for j in range(1, i + 1):
        if n % j == 0:
            count += 1
    if count == 8:
        ans_list.append(i)
if len(ans_list) > 0:
    print(len(ans_list))
else:
    print(0)

Submission status: Wrong Answer

Solution code:
def ans():
  n = int(input())
  count = 0
  ans = 0
  for i in range(1,n+1):
    if n % i == 0:
      count += 1
    if count == 8 and n % 2 != 0:
      ans += 1
  print(ans)
  return

ans()

Submission status: Wrong Answer

Solution code:
N = int(input())						# 5


ans=0
for j in range(1,N+1):
	count=0
	for i in range(1, j+1):
		if (j/i)==(j//i):
			count+=1
	else:
		if(count==8): 
			ans+=1
#			print(j, end=',')
#print()
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
for x in range(105, N+1):
    cnt = 1
    for y in range(2, x+1):
        if x % y == 0:
            c = 0
            while x % y == 0:
                c += 1
                x //= y
            cnt *= c+1
    if cnt == 8:
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
# 105 = 3 * 5 * 7
# 1, 3, 5, 7, 15, 21, 35, 105
# 3 つの 素数を1回ずつ掛けてできる数
# 3, 5, 7, 11
# 3 * 5 * 11 = 165

# 105以下では1つ(105のみ)なら, 200以下の整数なら, そういう奇数は105のみ?

N = int(input())

if N >= 165:
    print(2)
elif N >= 105:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
n = int(input())

k = [i for i in range(1, n + 1) if i % 2 == 1]

res = 0
c = 0
for i in k:
    l = 0
    cnt = 0
    
    for j in k[0:c]:
        if j % k[l] == 0:
            cnt += 1
            
        l += 1
        
    if cnt == 8:
       res += 1
       
    c += 1

print(res)

Submission status: Wrong Answer

Solution code:
a = int(input())

if a>=3*5*13:
    print(3)
elif a>=3*5*11:
    print(2)
elif a>=105:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
N = int(input())
if   N<105: ans = 0
elif N<135: ans = 1
elif N<165: ans = 2
else:       ans = 3
print(ans)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
if n >= 195:
	print("3")
elif n >= 165:
	print("2")
elif n >= 105:
	print("1")
else:print("0")

Submission status: Wrong Answer

Solution code:
N = int(input())
if N < 105:
    print(0)
elif N < 165:
    print(1)
else:
    print(2)

Submission status: Wrong Answer

Solution code:
n=int(input())
if n<105:
    print(0)
elif n<135:
    print(1)
elif n<189:
    print(2)
else:
    print(3)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
if n < 105:
    print(0)
elif 105 <= n < 135:
    print(1)
elif 135 <= n < 189:
    print(2)
elif 189 <= n:
    print(3)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
N = int(input())


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

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())
# A, B = map(int, input().split())
# A = list(map(int, input().split()))
# d = [list(map(int, input().split())) for _ in range(N)]
# s = input()

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

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

if (n<105) :
   print(0)
elif (n<135) :
   print(1)
elif (n<165) :
   print(2)
else :
   print(3)

Submission status: Wrong Answer

Solution code:
n = int(input())

if n < 105:
    print(0)
elif n < 165:
    print(1)
else:
    print(2)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N<=104:
    print(0)
elif N<=134:
    print(1)
elif N<=164:
    print(2)
elif N<=188:
    print(3)
else:
    print(4)

Submission status: Wrong Answer

Solution code:
n = int(input())

if n >= 105:
    print(1)
else:
    print(0)

exit(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
b=[3*5*7, 3*5*9, 3*5*11, 27*7, 3*5*13]
print(b)
a=0
for i in range(len(b)):
    if b[i]<=n:
        a+=1
print(a)

Submission status: Wrong Answer

Solution code:
N = int(input())

if (0 <= N) and (N <105):
  print(0)
elif (105 <= N) and (N < 165):
  print(1)
elif (165 <= N) and (N < 195):
  print(2)
else:
  print(3)

Submission status: Wrong Answer

Solution code:
N = int(input())

if N < 105:
    print(0)
elif N < 135:
    print(1)
elif N < 165:
    print(2)
elif N < 195:
    print(3)
else:
    print(4)

Submission status: Wrong Answer

Solution code:
n = int(input())
rr = 0

for j in range(n):
    r = 0

    for i in range(j + 1):
        if n % (i + 1) == 0:
            r += 1

    if r == 8:
        rr += 1

print(rr)

Submission status: Wrong Answer

Solution code:
from sys import stdin
N = int(stdin.readline().rstrip())

count = 0
if N < 105:
    pass
else:
    for i in range(105, N+1):
        if i % 2 == 0:
            pass
        else:
            divisor = 0
            for j in range(1, i+1):
                if i % j == 0:
                    divisor += 1
            if divisor == 8:
                print(i)
                count += 1
print(count)

Submission status: Wrong Answer

Solution code:
#encoding utf-8

n = int(input())

count = 0
if n >= 105:
    count += 1
if n >= 165:
    count += 1
if n >= 195:
    count += 1
print(count)

Submission status: Wrong Answer

Solution code:
import numpy as np

N = int(input())

if N < 105:
    print(0)
elif N == 105:
    print(1)
else:
    num = np.array([i for i in range(105, N+1, 2)])
    count = np.zeros(len(num))

    for i in range(1, N+1):
        mask = num % i == 0
        count += mask
        
    print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-


def solve():
    n = int(input())
    ans = 0
    if n >= 105:
        ans += 1
    print(ans)


if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:
# 105, 135, 189

n = int(input())
ans = 0

if n >= 105: #3 5 7
    ans+=1
if n >= 135: # 3 3 3 5
    ans+=1
if n >= 189: # 3 3 3 7
    ans+=1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

if n < 105:
    print(0)
elif n < 189:
    print(1)
else:
    print(2)

Submission status: Wrong Answer

Solution code:
li=list(map(int, input().split()))

if li[0]<105:
    print(0)
elif li[0] < 135:
    print(1)
elif li[0] < 165:
    print(2)
elif li[0] < 185:
    print(3)
elif li[0] < 189:
    print(4)
else:
    print(5)

Submission status: Wrong Answer

Solution code:
N = int(input())

if N < 105:
    print(0)
elif N < 165:
    print(1)
else:
    print(2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
if(n < 105):
  print(0)
elif(n < 164):
  print(1)
elif(n < 194):
  print(2)
else:
  print(3)

Submission status: Wrong Answer

Solution code:
n = int(input())
l = [105,165,195]
ans = 0
for i in l:
    if i <= n:
        ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
a = int(input())
v = [105, 128, 135, 165, 189, 195]
frag = 1
for i in range(6):
    if v[i] > a:
        print(i)
        frag = 0
        break
if frag == 1:
    print(6)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-


def solve():
    n = int(input())
    ans = 0
    # 3, 5, 7 105
    # 3, 5, 11 165
    # 3, 5, 13 195
    if n >= 105:
        ans += 1
    if n >= 165:
        ans += 1
    if n >= 195:
        ans += 1
    print(ans)


if __name__ == "__main__":
    solve()

Submission status: Wrong Answer

Solution code:
n=int(input())
p=0
def f(n):
    a=0
    for i in range(2,n):
        if n%i==0:
            a+=1
    if a==6:
        return True
    else:
        return False
        
if n<105:
    print(0)
else:
    for i in range(105,n+1):
        if f(i)==True:
            p+=1
    print(p)

Submission status: Wrong Answer

Solution code:
n = int(input())
if n>=195:
    print(3)
elif n>=165:
    print(2)
elif n>=105:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
n=int(input())
b=[3*5*7, 3*5*9, 3*5*11, 3*5*13]
a=0
for i in range(len(b)):
    if b[i]<=n:
        a+=1
print(a)

Submission status: Wrong Answer

Solution code:
n = int(input())
rr = 0

for j in range(n):
    r = 0

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

    if r == 8:
        rr += 1

print(rr)

Submission status: Wrong Answer

Solution code:
N=int(input())
if N<105:
    print(0)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
n_max = int(input())

num_ans = 0
for n in list(range(1,n_max+2,2)):
    n_ori = n
    yaku = []
    for k in range(3,100):
        if n%k == 0:
            n = n/k
            yaku.append(k)

    ans = 2**len(yaku)
    waru = [yaku.count(y) for y in yaku]
    for w in waru:
        ans/=w
    if ans == 8:
        num_ans += 1
print(num_ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
cnt = 0

for i in range(1, n + 1):
    copied = i
    count = 0
    if copied // 2 != 0:
        for j in range(1, n + 1):
            if copied // j == 0:
                copied = copied // j
                count += 1

        if count == 8:
            cnt += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
if (N < 105):
    print(0)
else:
    print(1)

Submission status: Wrong Answer

Solution code:
import sys
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()

N=ni()

def yaku(num):
  i = 0
  for j in range(num//2):
    if num%(j+1) ==0:
      i+=1
  return i+1

if N<105:
  print(0)
elif N==105:
  print(1)
else:
  ans = 1
  for i in range(106,N+1):
    if yaku(i) == 8:
      ans+=1
  print(ans)

Submission status: Wrong Answer

Solution code:
str=input()
n=int(str)
c=0
for num in range(1,n):
    if n%num==0:
        c+=1
print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# 105 = 3 * 5 * 7
# 1, 3, 5, 7, 15, 21, 35, 105
# 3 つの 素数を1回ずつ掛けてできる数
# 3, 5, 7, 11

# 105以下では1つ(105のみ)なら, 200以下の整数なら, そういう奇数は105のみ?

N = int(input())

if N >= 105:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
n = int(input())


def factorize(n):
    fct = []  # prime factor
    b, e = 2, 0  # base, exponent
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct


def divisorize(fct):
    b, e = fct.pop()  # base, exponent
    pre_div = divisorize(fct) if fct else [[]]
    suf_div = [[(b, k)] for k in range(e + 1)]
    return [pre + suf for pre in pre_div for suf in suf_div]

def num(fct):
    a = 1
    for base, exponent in fct:
        a = a * base**exponent
    return a


ans = 0
for i in range(105, n+1):
    fct = factorize(i)
    if len(divisorize(fct)) == 8:
       ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
li=list(map(int, input().split()))

if li[0]<105:
    print(0)
elif li[0] < 135:
    print(1)
elif li[0] < 165:
    print(2)
elif li[0] < 185:
    print(3)
else:
    print(4)

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[3*5*7,3*5*11]
print(sum(1 for i in l if i<=n))

Submission status: Wrong Answer

Solution code:
n = int(input())

if n < 105:
    ans = 0
elif n < 135:
    ans = 1
elif n < 189:
    ans = 2
else:
    ans = 3

print(ans)

Submission status: Wrong Answer

Solution code:
def run(n):
    if n < 105:
        return 0
    elif n < 135:
        return 1
    elif n < 189:
        return 2
    else:
        return 3


def read_line():
    n = int(input())
    return n


def main():
    n = read_line()
    print(run(n))


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
a = int(input())

if a<105:
    print(0)
elif 105<= a < 165:
    print(1)
else:
    print(2)

Submission status: Wrong Answer

Solution code:
N = int(input())

if N > 104:
  print("1")
else:
  print("0")

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

if N >= 195:
    print(3)
elif N >= 165:
    print(2)
elif N >= 105:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
n=int(input())
if n<105:
    print(0)
elif n<135:
    print(1)
elif n<165:
    print(2)
else:
    print(3)

Submission status: Wrong Answer

Solution code:
a=[105,110,114,128,130,135,136,138,152,154,165,170,174,182,184,186,189,190,195]
b=int(input())
sum=0
for i in a:
    if b>=i:
        sum=sum+1
print(sum)

Submission status: Wrong Answer

Solution code:
def countFactors(n):
  count = 0
  for i in range(1, n + 1):
    if n % i == 0:
      count += 1
  return count

X = int(input())

count = 0
for i in range(1, X + 1, 2):
  if countFactors(i) == 8:
    print(i)
    count += 1

print(count)

Submission status: Wrong Answer

Solution code:
a = int(input())


if a <= 104:
    print(0)
elif a >= 105 and a< 165:
    print(1)

elif a>= 165 and a< 185:
    print(2)
elif a>= 185 and a< 189:
    print(3)
elif a>= 189 and a < 195:
    print(4)
elif a<= 200:
    print(5)

Submission status: Wrong Answer

Solution code:
def i1():
 return int(input())
def i2():
 return [int(i) for i in input().split()]
n=i1()
if n>=105:
   print(1)
else:
   print(0)

Submission status: Wrong Answer

Solution code:
n = int(input())
print(len([_ for _ in [105, 135, 165, 189] if _ <= n]))

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print(res)

Submission status: Wrong Answer

Solution code:
n=int(input())
c=0
if(n<105):print(0)
if(n==105):print(1)
if(n>105):
    for i in range(105,n+1):
        d=0
        for j in range(1,i+1):
            if(i%j==0):d+=1
        if(d==8):c+=1

    print(c)

Submission status: Wrong Answer

Solution code:
n = int(input())
if(n < 105):
  print(0)
elif(n < 134):
  print(1)
elif(n < 164):
  print(2)
else:
  print(3)

Submission status: Wrong Answer

Solution code:
n = int(input())
if(n<27):
    print("0")
elif(n<105):
    print("1")
elif(n<125):
    print("2")
elif(n<135):
    print("3")
elif(n<165):
    print("4")
elif(n<189):
    print("5")
else:
    print("6")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
"""
3^3*5
3*5*7
3^3*7
3*5*11

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

Submission status: Wrong Answer

Solution code:
#encoding utf-8

n = int(input())

if n >= 105:
    count = 1
else:
    count = 0
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N<=104:
    print(0)
elif N<=164:
    print(1)
else:
    print(2)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N<105:
    print(0)
elif N<165:
    print(1)
elif N<195:
    print(2)
else:
    print(3)

Submission status: Wrong Answer

Solution code:
A=int(input())

answer=0
if A<=104:
  print(0)
else:
  for i in range(105,A+1,2):
    count=0
    for j in range(1,i+1):
      if i%j==0:
        count+=1
    if count==8:
      answer+=1
print(answer)

Submission status: Wrong Answer

Solution code:
import bisect
print(bisect.bisect([105,115,165,189,195], int(input())))

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print(res)

Submission status: Wrong Answer

Solution code:
n = int(input())
if n < 105:
    print(0)
else:
    ans = 0
    for i in range(105, n + 1):
        cnt = 0
        for j in range(1, i + 1):
            if i % j == 0:
                cnt += 1
        if cnt == 8:
            ans += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N < 105:
    print(0)
else:
    ans = 0
    for i in range(N, 104, -1):
        tmp = sum((i%j==0)*1 for j in range(1, i+1))
        if tmp == 8:
            ans += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
a = int(input())

if a >= 195:
    print("3")
elif a >= 165:
    print("2")
elif a >= 105:
    print("1")
else:
    print("0")

Submission status: Wrong Answer

Solution code:
n = int(input())
print(len([_ for _ in [105, 165, 189] if _ <= n]))

Submission status: Wrong Answer

Solution code:
N = int(input())
x = 0
for i in range(1,N+1):
    if N % i == 0:
        x += 1
if x == 8:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
n = int(input())

if n >= 105:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
n = int(input())

count = 0
ans = 0

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

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
if(n < 105):
  print(0)
elif(n < 164):
  print(1)
else:
  print(2)

Submission status: Wrong Answer

Solution code:
n=int(input())
if n<105:
    print(0)
elif n<135:
    print(1)
elif n<165:
    print(2)
else:
    print(3)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input().strip())

c = 0
for n in range(1, N+1):
  d = 0
  for i in range(1, n+1):
    if i * i > n:
      break
    if n % i == 0:
      d += 1
      if d >= 9:
        break
  if d == 8:
    c += 1

print(c)

Submission status: Wrong Answer

Solution code:
n = int(input())

if (n >= 105):
  print(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
count=0
n=int(input())
for i in range(1,n+2,2):
    k=1
    num=1
    while(k*k<=i):
        if(i%k==0):
            num+=1
        if(i//k!=i and i%(i//k)==0):
            num+=1
        k+=1
    if(num==8):
        count+=1
print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())

print(1 if n >= 105 else 0)

Submission status: Wrong Answer

Solution code:
a = int(input())
if a >= 105:
    print("1")
else:
    print("0")

Submission status: Wrong Answer

Solution code:
n = int(input())

if n<105:
    print(0)
elif n<135:
    print(1)
else:
    print(2)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

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

Submission status: Wrong Answer

Solution code:
N=int(input())
s=0
t=0
for i in range(1,N+1):
    if N%i==0:
        s+=1
if s==8:
    t+=1
print(t)

Submission status: Wrong Answer

Solution code:
n=int(input())
if n<105:
  print(0)
elif n<165:
  print(1)
elif n<195:
  print(2)
else:
  print(3)

Submission status: Time Limit Exceeded

Solution code:
in_num = int(input())
check_num = 0
ans_counter = 0

while check_num <= in_num:
	i = 1
	div_counter = 0
	while i < check_num /2:
		if check_num % i == 0:
			div_counter += 1
		i += 2
	if div_counter == 8:
		ans_counter += 1

print(ans_counter)

Submission status: Time Limit Exceeded

Solution code:
N = int(input())
count = 0
for i in range(1, N + 1):
    c = 0
    while i*i <= N:
        if i*i == N:
            c += 1
        elif N % i == 0:
            c += 2
    if c == 8:
        count += 1
print(count)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
l = [i for i in range(1, n + 1) if i % 2 == 1]
cnt = 0
for w in l:
    i = w
    fct = []
    b, e = 3, 0
while b * b < w:
    while i % b == 0:
        i = i // b
        e = e + 1
        if e > 0:
            fct.append((b, e))
            b, e = b + 1, 0
if i > 1:
    fct.append((i, 1))
if len(fct) > 1:
    r = 1
    for j in fct:
        r = r * (j[1] + 1)
elif len(fct) == 1:
    r = fct[0][1] + 1
else:
    r = 0
if r == 8:
    cnt += 1
print(cnt)

Submission status: Time Limit Exceeded

Solution code:
from collections import defaultdict
N = int(input())
ans = 0
for i in range(N + 1):
  if i % 2 == 0:
    continue
  t, j, dic, r = i, 2, defaultdict(int), 1
  while True:
    while t % j == 0:
      t /= j
      dic[j] += 1
    if j * j > i:
      break
  if t > 1:
    dic[t] += 1
  for key in dic:
    r *= dic[key] + 1
  if r == 8:
    ans += 1
print(ans)

Submission status: Time Limit Exceeded

Solution code:
n = int(input())
ans = []

i = 1
while i <= n:
  count = 0
  for j in range(1, i + 1):
    if i % j == 0:
      count = count + 1
  
  if count == 8:
    ans.append[i]

print(len(ans))

Submission status: Time Limit Exceeded

Solution code:
s = 0
answer = 1
d = {}
N = int(input())
n = N

if n < 105:
    print("0")
else:
    if n == 105 or n == 106:
        print("1")
    for i in range(107,N+1,2):
        for j in range(2,i+1):
            s = 0
            while s == 0:
                if i % j == 0:
                    if str(j) in d:
                        d[str(j)] += 1
                    else:
                        d[str(j)] = 1
                else:
                    s = 1
        r = 1
        for k in d:
            r *= (k+1)
        if r == 8:
            answer += 1
        
        print(answer)