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:
#!/usr/bin/env python

from collections import deque
import itertools as it
import sys
import math

sys.setrecursionlimit(10000000)

N = input()

if N < 105:
    print 0
elif N < 135:
    print 1
elif N < 189:
    print 2
else:
    print 3

#for num in range(1, N + 1, 2):
#    for i in range(200):

Submission status: Wrong Answer

Solution code:
import math
n = int(input())

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


sum = 0
for i in range(n+1):
  if n % 2 !=0 and search_divisor_num_1(n) == 8:
    sum += 1
print(sum)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
n = int(input())

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


sum = 1
if n < 105:
  print("0")
  exit()
elif n == 105:
  print("1")
  exit()
else:
  for i in range(106,n+1):
    if n % 2 !=0 and search_divisor_num_1(n) == 8:
      sum += 1
print(sum)

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())
count = 0
ans = 0

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

print(ans)

Submission status: Wrong Answer

Solution code:
import math

N=int(input())
end=int(math.sqrt(N))
cnt=0
num=0
for j in range(1,N,3):
    for i in range(1,N+1):
        if N%i==0 :
            cnt=cnt+1
    if cnt==8 :
        num+=1

print(num)

Submission status: Wrong Answer

Solution code:
import math

N=int(input())
end=int(math.sqrt(N))
cnt=0
num=0
for j in range(N):
    for i in range(1,N+1):
        if N%i==0 :
            cnt=cnt+1
    if cnt==8 :
        num+=1

print(num)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = 0
if n >= 105:
    a += 1
if n >= 135:
    a += 1
if n >= 165:
    a += 1
if n >= 195:
    a += 1
print(a)

Submission status: Wrong Answer

Solution code:
num = int(input())
if num < 105 :
    print(0)
elif num>=105 and num<165:
    print(1)
elif num>=165 and num<195:
    print(2)
elif num>=195 and num<=200:
    print(3)

Submission status: Wrong Answer

Solution code:
import functools
N = int(input())

if N < 105:
  print(0)

def has_eight(n):
  d = {}
  for i in [ i for i in range(3,n)]:
    if n == 1:
      break
    while n % i == 0:
      n = n / i
      if i in d:
        d[i] += 1
      else:
        d[i] = 1
 
  if len(d) != 0 and functools.reduce(lambda x, y: x * y, [i + 1 for i in d.values()]) == 8:
    return True
  else:
    return False

c = 0
for n in [i for i in range(105,N+1) if i % 2 != 0]:
  if has_eight(n):
    c += 1

print(c)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = 0
if n >= 105:
    a += 1
if n >= 165:
    a += 1
if n >= 195:
    a += 1
print(a)

Submission status: Wrong Answer

Solution code:
a=int(input())
if a<105:print(0)
else:print(sum([1 for i in range(105,a+1) if len([1 for I in range(1,a+1)if i%I==0])==8]))

Submission status: Wrong Answer

Solution code:
a=int(input())
if a<105:print(0)
else:print(sum([1 for i in range(105,a+1) if len([1 for I in range(2,100)if i%I==0])==6]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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


        if cnt == 8:
            ans += 1        

print(ans)

Submission status: Wrong Answer

Solution code:
# coding:utf-8
list=[0]*1000
for i in range(1,201,1):
    m=1
    while m*i<=200:
        print(m*i)
        list[m*i]+=1
        m+=1
n=int(input())
ct=0
for i in range(1,n+1,2):
    if list[i]==8:
        ct+=1
print(ct)

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:
#coding:utf-8
n=int(input())
count=0
ans=0
for i in range(1,n+2,2):
  for j in range(1,i+1,2):
    if(i%j==0):
      count+=1
  if(count==8):
    ans+=1
  count=0
print(ans)

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 %2 == 0:
  n -= 1
if n < 105:
  print(0)
else:
  ans = 0
  for i in range(n,103,-2):
    count = 1
    for j in range(1,n//3+2,2):
      nj = n%j
      if nj == 0:
        count += 1
      if count == 9:
        ans -= 1
      if count == 8:
        ans += 1
  print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())+1
yakusuu = 0
for i in range(1,int((N-N%2)/2)+2):
    cnt = 0
    ii = 1+ 2*(i-2)
    for j in range(1,ii):
        if ii % j == 0:
            cnt = cnt+1
    cnt = cnt+1
    print(str(ii)+"の約数は"+str(cnt)+"個")
    if cnt == 8:
        yakusuu = yakusuu + 1
print(yakusuu)

Submission status: Wrong Answer

Solution code:

n = int(input())
a = 0
if n >= 105:
    a += 1
if n >= 165:
    a += 1
if n >= 195:
    a += 1
print(a)

Submission status: Wrong Answer

Solution code:
import math

N=int(input())
end=int(math.sqrt(N))
cnt=0
for i in range(1,N+1):
    if N%i==0 :
         cnt=cnt+1

print(cnt)

Submission status: Wrong Answer

Solution code:
a = int(input())
 
b=0#約数の個数
 
for i in range(1,a+1):#i:1~inputまで,奇数だけ
  if i % 2 == 1:
  #ある数Niについて約数を数える
    yakusuu = 0
    for j in range(1,i+1):
      if i+1 % j == 0:
          yakusuu += 1
    if yakusuu == 8:
      b += 1
print(b)

Submission status: Wrong Answer

Solution code:
n=int(input())

print(1 if n >= 105 else 0)

Submission status: Wrong Answer

Solution code:
#107b
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())
if n %2 == 0:
  n -= 1
if n < 105:
  print(0)
else:
  ans = 0
  for i in range(n,103,-2):
    count = 1
    for j in range(1,101,2):
      nj = n%j
      if nj == 0:
        count += 1
      if count == 9:
        ans -= 1
      if count == 8:
        ans += 1
  print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np

def Count(n,divisor):
    print (divisor <= n).sum()

EightDivisors = np.array([3*5*7, 3*5*11, 3*5*13, 3*7*11, 3**3 *5])


n = int(raw_input())
Count(n, EightDivisors)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=int(input())
c=[i for i in [I for I in range(2,100)] if a%i==0]
print(len(set([a//I for I in c]+c+[a,1])))

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:
#107b
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:
n = int(input())
if n %2 == 0:
  n -= 1
if n < 105:
  print(0)
else:
  ans = 0
  for i in range(n,103,-2):
    count = 1
    for j in range(1,101,2):
      nj = n%j
      if nj == 0:
        count += 1
      if count == 9:
        ans -= 1
    if count == 8:
      ans += 1
  print(ans)

Submission status: Wrong Answer

Solution code:
x=int(input())
if(x<105):
    print ("0")
elif(x==105):
    print ("1")
else:
    f=1
    for j in range(107,x+1):
        if(j % 2 != 0):
            c=0
            for i in range(1, j + 1):
                if x % i == 0:
                    c=c+1
            if(c==8):
                f=f+1
    print(f)

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(4)
elif n < 195 :
    print(5)
else:
    print(6)

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())
 
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 < 195):
  print(4)
else:
  print(5)

Submission status: Wrong Answer

Solution code:
import numpy as np

def Count(n,divisor):
    print (divisor <= n).sum()

EightDivisors = np.array([3*5*7, 3*5*11, 3*5*13, 3*7*11])


n = int(raw_input())
Count(n, EightDivisors)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N <= 104:
    print(0)
else:
    ki = []
    for i in range(105, N + 1):
        if N % 2 == 1:
            ki.append(i)
    yakusuu = []
    for i in ki:
        count = 0
        for j in range(1, i + 1):
            if i % j == 0:
                count += 1
        if count == 8:
            yakusuu.append(i)
    print(len(yakusuu))

Submission status: Wrong Answer

Solution code:
import functools
N = int(input())

d = {}
for i in [ i for i in range(3,N)]:
  if N == 1:
    break
  while N % i == 0:
    N = N / i
    if i in d:
      d[i] += 1
    else:
      d[i] = 1

if len(d) != 0 and functools.reduce(lambda x, y: x * y, [i + 1 for i in d.values()]) == 8:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
if n %2 == 0:
  n -= 1
if n < 105:
  print(0)
else:
  ans = 0
  for i in range(n,103,-2):
    count = 1
    for j in range(1,99,2):
      nj = n%j
      if nj == 0:
        count += 1
      if count == 9:
        ans -= 1
    if count == 8:
      ans += 1
  print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

Ans = 0

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

print(Ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
countans = 1
if(N < 105):
  print(0)
else:
    for i in range(107, N+1, 2):
        count = 0
        for j in range(1, int(N/2)):
            if(i%j == 0):
                count += 1
        if(count == 8):
            countans += 1
    print(countans)

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,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 < 105 :
    print(0)
elif n < 165 :
    print(1)
elif n < 195 :
    print(2)
else:
    print(3)

Submission status: Wrong Answer

Solution code:
import functools
N = int(input())

d = {}
for i in [ i for i in range(3,N) if i % 2 != 0]:
  if N == 1:
    break
  while N % i == 0:
    N = N / i
    if i in d:
      d[i] += 1
    else:
      d[i] = 1

if len(d) != 0 and functools.reduce(lambda x, y: x * y, [i + 1 for i in d.values()]) == 8:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
n=int(input())
count=0
if n>=105:
    count=count+1
if n>=165:
    count=count+1
if n>=195:
    count=count+1
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
countans = 1
if(N < 105):
  print(0)
else:
    for i in range(106, N+1, 2):
        count = 0
        for j in range(1, int(N/2)):
            if(i%j == 0):
                count += 1
        if(count == 8):
            countans += 1
    print(countans)

Submission status: Wrong Answer

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

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:
import functools
N = int(input())

d = {}
for i in [ i for i in range(3,int(N/3 + 1)) if i % 2 != 0]:
  if N == 1:
    break
  while True:
    if N % i != 0:
      break
    N = N / i
    if i in d:
      d[i] += 1
    else:
      d[i] = 1

if len(d) != 0 and functools.reduce(lambda x, y: x * y, [i + 1 for i in d.values()]) == 8:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
import functools
N = int(input())

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

d = {}
for i in [ i for i in range(3,int(N/3 + 1)) if i % 2 != 0]:
  if N == 1:
    break
  while True:
    if N % i != 0:
      break
    N = N / i
    if i in d:
      d[i] += 1
    else:
      d[i] = 1

if len(d) != 0 and functools.reduce(lambda x, y: x * y, [i + 1 for i in d.values()]) == 8:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
a = int(input())

b=0#約数の個数

for i in range(1,a+1, 2):#i:1~inputまで,奇数だけ
  #ある数Niについて約数を数える
  yakusuu = 0
  for j in range(1,i+1):
    if i+1 % j == 0:
        yakusuu += 1
  if yakusuu == 8:
  	b += 1
print(b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

print(count)

Submission status: Wrong Answer

Solution code:
N=int(input())

ans=0
if N>=105:
    ans+=1
if N>=135:
    ans+=1
if N>=189:
    ans+=1

print(ans)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
import numpy as np

def Count(n,divider):
    count = 0
    for div in divider:
        if n%div == 0:
            count+=1
    print count


divider = []

for k in range(3):
    for j in range(3):
        for i in range(3):
            divider.append(3**k * 5**j * 7**i)
            divider.append(3**k * 5**j * 11**i)
            divider.append(3**k * 5**j * 13**i)

divider = list(set(divider))
divider.sort()

divider = np.array(divider)
divider = divider[divider<200]

n = int(raw_input())
Count(n, divider)

Submission status: Wrong Answer

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

if N < 105:
    ans = 0
else:
    ans = 0
    for i in range(103,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())

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

print(count)

Submission status: Wrong Answer

Solution code:
nums = list(map(int, input().split()))
n = nums[0]
if n < 105 :
    print(0)
elif n>=105 and n<165:
    print(1)
elif n>=165 and n<195:
    print(2)
else:
    print(3)

Submission status: Wrong Answer

Solution code:
n=int(input())
res=0
for i in range(1,n+1,2):
    y=1
    for j in range(3,12):
        cnt=1
        while i%j==0:
            cnt+=1
            i//=j
        y*=cnt
    if y==8:
        res+=1
print(res)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
if n < 105:
  print(0)
else:
  ans = 0
  for i in range(n,103,-2):
    count = 1
    for j in range(1,99,2):
      nj = n%j
      if nj == 0:
        count += 1
      if count == 9:
        ans -= 1
      if count == 8:
        ans += 1
  print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print(result)

Submission status: Wrong Answer

Solution code:
n = int(input())
if n < 105:
  print(0)
else:
  ans = 0
  for i in range(n,103,-2):
    count = 1
    for j in range(1,99,2):
      nj = n%j
      if nj == 0:
        count += 1
      if count == 9:
        ans -= 1
    if count == 8:
      ans += 1
  print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

if N >= 195:
    print("5")
if N >= 189:
    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:
li=int(input())

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

Submission status: Wrong Answer

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

b=0#約数の個数

for i in range(1,a+1):#1~inputまで
  #ある数Niについて約数を数える
  yakusuu = 1
  for j in range(1,i+1):
    if i+1 % j == 0:
        yakusuu += 1
  if yakusuu == 8:
  	b += 1
print(b)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N<=104:
    print(0)

else:
    ki=[]
    for i in range(105,N+1):
        if N % 2 == 1:
            ki.append(i)

    yakusuu=[]
    for i in ki:
        for j in range(i):
            count=0
            for k in range(1, i):
                if i % k == 0:
                    count+=1
        if count ==7:
            yakusuu.append(i)
    print(len(yakusuu))

Submission status: Wrong Answer

Solution code:

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

Submission status: Wrong Answer

Solution code:
x = [3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59]

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 < 165:
  print(1)
elif N < 195:
  print(2)
else:
  print(3)

Submission status: Wrong Answer

Solution code:
#107b
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())

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

print(result)

Submission status: Wrong Answer

Solution code:
n = int(input())
if n < 105:
  print(0)
else:
  ans = 0
  for i in range(n,103,-2):
    count = 1
    for j in range(1,99,2):
      nj = n%j
      if nj == 0:
        count += 1
      if count == 9:
        break
    if count == 8:
      ans += 1
  print(ans)

Submission status: Wrong Answer

Solution code:
a = int(input())

b=1#約数の個数

for i in range(1,a+1):#1~inputまで
  #ある数Niについて約数を数える
  yakusuu = 0
  for j in range(1,i+1):
    if i+1 % j == 0:
        yakusuu += 1
  if yakusuu == 8:
  	b += 1
print(b)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
import math

def main():
    n = int(sys.stdin.readline().rstrip())
    if n < 105:
        print(0)
    else:
        m = n//2
        z = [(i, 1) for i in range(107,n+1, 2)]
        for i in range(3, n, 2):
            z = list(map(lambda x: (x[0], x[1]+1) if x[0]%i==0 else x, z))
        c = len(list(filter(lambda x: x[1]==8, z)))
        print(c+1)
if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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


def main(n):
    if n < 105:
        print(0)
        return
    so_list = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71]
    chi_list = [0 for _ in range(len(so_list))]
    retval = 0
    for a in range(105,n + 1):
        t = a
        t_count = 0
        for s in range(len(so_list)):
            so = so_list[s]
            # print(s, so, t, t%so)            
            if 0 == t%so:
                #print(9)
                t_count += 1
            while 0 == t%so:
                #print(10)
                t /= so
                # chi_list[s] += 1
                t_count += 1
            if t == 1:
                if t_count == (8 - 2):
                    retval += 1
                break
    print(int(retval))
            
    
if __name__ == '__main__':
    try:
        n = int(input().strip())
        main(n)
    except EOFError:
        pass

Submission status: Wrong Answer

Solution code:
inp = input()
n = int(inp)

if  n < 104:
  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)
elif 195 <= n:
  print(5)

Submission status: Wrong Answer

Solution code:
A=int(input())
ans = 0
for i in range(1,A+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)
elif 105 <= N and N < 135:
    print(1)
elif 135 <= N and N < 165:
    print(2)
elif 165 <= N and N < 189:
    print(3)
elif 189 <= N :
    print(4)

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())
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:
from collections import defaultdict
def f(n):
  dd=defaultdict(int)
  c=[2,3,5,7,11,13,17,19,23,29,31]
  i=0
  while i<5 and n//c[i]:
    while i<5 and n%c[i]==0:
      dd[c[i]]+=1
      n=n//c[i]
    i+=1
  r=1
  for i in dd.values():
    r*=(i+1)
  return r

n=int(input())

l=[i for i in range(1,n+1,2)]
print(sum([1 for i in l if f(i)==8]))

Submission status: Wrong Answer

Solution code:
N = int(input())

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

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 
    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(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,list(range(1,N + 1))[:: 2])).count(8)

Submission status: Wrong Answer

Solution code:
n = int(input())
print(len([a for a in range(1,n+1) if a in [105,135,165,195]]))

Submission status: Wrong Answer

Solution code:
ip = input()
inputNum = int(ip)
totalCount = 0
for i in range(1,inputNum + 1):
    count = 0
    for j in range(1,i+1):
        if i % j == 0:
            count = count + 1
    if count == 8:
            totalCount = totalCount + 1

print(totalCount)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#107b
n=int(input())
if n<105:
    print(0)
else:
    print(1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from collections import defaultdict
def f(n):
  dd=defaultdict(int)
  c=[2,3,5,7,11]
  i=0
  while i<5 and n//c[i]:
    while i<5 and n%c[i]==0:
      dd[c[i]]+=1
      n=n//c[i]
    i+=1
  r=1
  for i in dd.values():
    r*=(i+1)
  return r

n=int(input())
l=[i for i in range(1,n+1,2)]
print(sum([1 for i in l if f(i)==8]))