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:
n=int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

ans = 0
for i in (105, n + 1, 2):
    if i % 3 == 0 and i % 5 == 0:
        ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
print(1if int(input())>104else 0)

Submission status: Wrong Answer

Solution code:
n = int(input())
if n < 3*5*7:
    print("0")
elif n < 3*5*9:
    print("1")
elif n < 3*5*11:
    print("2")
elif n < 3*5*13:
    print("3")
elif n < 3*7*9:
    print("4")
else:
    print("5")

Submission status: Wrong Answer

Solution code:
n = int(input())
if n < 3*5*7:
    print("0")
elif n < 3*5*9:
    print("1")
elif n < 3*5*11:
    print("2")
elif n < 3*5*13:
    print("3")
else:
    print("4")

Submission status: Wrong Answer

Solution code:
n = int(input())
if n < 3*5*7:
    print("0")
elif n < 3*5*11:
    print("1")
elif n < 3*5*13:
    print("2")
else:
    print("3")

Submission status: Wrong Answer

Solution code:
n = int(input())
if n < 3*5*7:
    print("0")
elif n < 3*5*11:
    print("1")
elif n < 3*5*13:
    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())
if n < 105:
  print("0")
else:
  print("1")

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 < 185:
  print(0)
elif n < 165:
  print(1)
else:
  print(2)

Submission status: Wrong Answer

Solution code:
N = int(input())

S = [3*5*7, 3*5*11, 3*5*13, 3**3*5]

ans = 0
for s in S:
    if s <= N:
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

S = [3*5*7, 3**3*5]

ans = 0
for s in S:
    if s <= N:
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

def divisor_num(n):
    ans = 0
    for i in range(1, n):
        if ans % i == 0:
            ans += 1
    return ans

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

Submission status: Wrong Answer

Solution code:
N = int(input())

def divisor_num(n):
    ans = 0
    for i in range(1, n):
        if ans % i == 0:
            ans += 1
    return ans

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

Submission status: Wrong Answer

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

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:
n = int(input())
ans = (n >= 105) + (n >= 165) + (n >= 195)
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [105, 165, 195]
ans = a.index(n) + 1 if n in a else 0
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())

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

print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())

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

print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=[0]*n
for i in range(1,n+1):
    if i%2!=0:
        for k in range(1,i+1):
            if i%k==0:
                ans[i-1]+=1
#print(ans)
print(ans.count(5))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
l = [i for i in range(1, n + 1) if i % 2 == 1]
print(l)
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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
#h, w = map(int,input().split())
#ls = list(map(int,input().split()))
#ls = [list(map(int,input().split())) for i in range(n)]
#ls = [input() for i in range(h)]

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

Submission status: Wrong Answer

Solution code:
N = int(input())
t = N//2+1
n = [2*i+1 for i in range(t)]
ans = 0
for num in n:
    count = 0
    for i in range(1, num+1):
        if num%i==0:
            count += 1
    if count==8:
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
n = [ 2*i+1 for i in range(N//2+1)]
ans = 0
for num in n:
    count = 0
    for i in range(1, num+1):
        if num%i==0:
            count += 1
    if count==8:
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
n = [2*i+1 for i in range(N//2+1)]
ans = 0
for num in n:
    count = 0
    for i in range(1, 201):
        if num%i==0:
            count += 1
    if count==8:
        ans += 1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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:
N = int(input())
if N < 105:
    print(0)
else:
    A = 0
    for i in range(104,N):
        Y = 1
        for j in range(1,i):
            if i % j == 0:
                Y += 1
        if Y == 8:
            A += 1
    print(A)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
if 105 <= n < 165:
  ans = 1
elif 165 <= n < 195:
  ans = 2
elif 195 <= n:
  ans = 3
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:
N = int(input())
ans = 0

#奇数判定
for i in range(1, N+1, 2):
    cnt = 0
    #約数判定
    for j in range(1, i+1):
        if j % i == 0:
            cnt += 1
        if cnt == 8:
            ans += 1

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

l = [0]*201
for i in range(1, N+1):
    l[i] = len([i%x for x in range(1, i+1)])
print(l.count(8))

Submission status: Wrong Answer

Solution code:
N=int(input())
nums=[]
if N<104:
  print(0)
for i in range(104,N+1):
  ans=[]
  for a in range(i):
    if N%(a+1) == 0:
      ans.append(a+1)
  if len(ans)==8:
    nums.append(i)
print(len(nums))

Submission status: Wrong Answer

Solution code:
N=int(input())
nums=[]
for i in range(104,N+1):
  ans=[]
  for a in range(i):
    if N%(a+1) == 0:
      ans.append(a+1)
  if len(ans)==8:
    nums.append(i)
print(len(nums))

Submission status: Wrong Answer

Solution code:
N = int(input())

result = 0


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

Submission status: Wrong Answer

Solution code:
def f(n):
    if n == 1:
        return 1
    ans = set()
    div = 3
    while n > 1:
        if n % div == 0:
            n //= div
            ans.add(div)
        else:
            div += 2
    return 2**len(ans)


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
 
if n<105:
    print(0)
elif n>104 and n<135:
    print(1)
else:
    print(2)

Submission status: Wrong Answer

Solution code:
n=int(input())

if n<105:
  print(0)
else:
  print(1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

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

print(count)

Submission status: Wrong Answer

Solution code:
def solve(n,i,flg):
    if n%i != 0:
        return flg
    else:
        flg += 1
    return solve(int(n/i),i,flg)
if __name__ == '__main__':

    n = int(input())
    if n < 105:
        print(0)
    
    else:
            
        so = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97]
        count = 0
        for k in range(105,n,2):
            
            cnt_list = []
            for j in so:
                cnt = solve(k,j,0)
                cnt_list.append(cnt)
            cnt_list.sort(reverse=True)
            
            if (cnt_list[:4] == [7,0,0,0]) or (cnt_list[:4] == [3,1,0,0]) or (cnt_list[:4] == [1,1,1,0]) :
                count += 1
            else:
                pass
        print(count)

Submission status: Wrong Answer

Solution code:
# 入力
N=int(input())

for i in range(26):
  for j in range(15):
    if N==i*4+j*7:
      # パターンが見つかった
      print('Yes')
      exit()

# パターンが見つからなかった
print('No')

Submission status: Wrong Answer

Solution code:
# 素因数分解
N = int(input())
ans = 0
s = 0
L = N
for i in range(1,N+1,2):
    divisors=[0]*(N+1)
    cnt = 1
    # 素因数分解
    for i in range(2,N+1):
        while True:
            if L % i == 0:
                divisors[i] += 1
                L //= i
                if L == 1:
                    s = 1 #1はこれ以上素因数を産まない
                    break
            else:
                break

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
cnt2 = 0
for n in range(1,N+1,2):
    cnt = 0
    for i in range(1,int(math.sqrt(n))):
        if n % i == 0:
            cnt += 1
    if cnt == 4:
        cnt2 += 1

print(cnt2)

Submission status: Wrong Answer

Solution code:
n = int(input())
count = 0
for i in range(1, n+2):
    if i % 2 == 0:
        continue
    c = 0
    for j in range(1,  i + 1):

        if i % j == 0:
            c += 1
    if c == 8:
        count += 1
print(count)

Submission status: Wrong Answer

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


l = list(range(n + 1))[1::2]

num = 0
for i in l:
    if len(make_divisors(i)) == 8:
        print(i)
        num += 1

print(num)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from sys import stdin

N = int(stdin.readline().rstrip())

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:
from sys import stdin

N = int(stdin.readline().rstrip())

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 numpy as np
def factor(x):
    ans = []
    for i in range(1, int(np.sqrt(x))):
        if x % i ==0:
            ans.append(i)
            ans.append(int(x/i))
    return sorted(ans)
n = int(input())
count = 0
if n < 105:
    print(count)
else:
    for i in range(105, n+1,2):
        if len(factor(i))==8:
            count +=1
    print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
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())
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())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
n=int(input())
c=0
a=[3, 5, 7, 11, 13]
for i in range(105,n+2,2):
  d=0
  for j in a:
    if i%j==0:
      d+=1
  if d==3:
    c+=1
print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
q=[]
for i in range(3,int(n**.5)+2,2):
  if all(i%c>0 for c in q):q+=[i]
l=len(q)
print(l*(l-1)*(l-2)//6)

Submission status: Wrong Answer

Solution code:
n=int(input())
q=[]
for i in range(3,int(n**.5)+1,2):
  if all(i%c>0 for c in q):q+=[i]
l=len(q)
print(l*(l-1)*(l-2)//6)

Submission status: Wrong Answer

Solution code:
import math
def num_divisors_trial_division(n):
    num = 0
    for i in range(1, int(math.sqrt(n) + 1e-9) + 1):
        if n % i == 0:
            num += 1
            if n != i**2:
                num += 1
    
    return num

N = int(input())
if N == 105:
    print("1")
    exit()
elif N < 105:
    print("0")
    exit()
lists = []
cnt = 0
for i in range(105,N):
    if i % 2 == 1:
        if num_divisors_trial_division(i) == 8:
            cnt += 1
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N >= 105:
    print("1")
elif N < 105:
    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())
if n<=105:
  print(1)
  exit()

ans = 1
for i in range(107, 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)

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

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=0
s=[3,5,7,11,13]
c=0
for i in range(105,n+2,2):
  for j in s:
    if i%j==0:
      c=c+1
  if c==3:
    ans=ans+1
  c=0
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=0
s=[3,5,7,11,13]
c=0
for i in range(105,n+2,2):
  for j in s:
    if i%j==0:
      c=c+1
  if c==3:
    ans=ans+1
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
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+2, 2):
    if len(make_divisors(i)) == 8:
        ans += 1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import sqrt,ceil
N=int(input())
if N<105:
    print("0")
    exit()
ans=0
for n in range(105,N+1):
    cnt=0
    if n%2==0:
        continue
    for i in range(1,ceil(sqrt(N))):
        if n%i==0:
            cnt+=1
    if cnt==4:
        ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int ( input())
ans = 0
test = (3,5,7,11,13)
for i in range ( 105,n+1,2) :
  div = 0
  for d in test :
    if i % d == 0 :
      div += 1
  if div == 3 and i % 9 != 0:
    ans += 1
  elif i % 9 == 27:
    ans += 1
print (ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
if n < 105:
    print(0)
elif n == 105:
    print(1)
else:
    ans = 1
    for i in range(106,n+1):
        if i%2!=0:
            yaku = 0
            for j in range(1,i+1):
                if i%j==0:
                    yaku+=1
            if yaku == 4:
                ans+=1
    print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
if n < 105:
    print(0)
elif n == 105:
    print(1)
else:
    ans = 1
    for i in range(106,n+1):
        if i%2!=0:
            yaku = 0
            for j in range(1,int(i**(1/2))):
                if i%j==0:
                    yaku+=1
            if yaku == 4:
                ans+=1
    print(ans)

Submission status: Wrong Answer

Solution code:
print(sum([sum([i % j == 0 for j in range(2, i)]) == 6 for i in range(105, int(input()) + 1)]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
a=[3,5,7,11,13]
s={a[i]*a[j]*a[k]for i in range(len(a)-2)for j in range(i+1,len(a)-1)for k in range(j+1,len(a))if a[i]*a[j]*a[k]<=n}
print(len(s))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

# 約数列挙
def divisor(n):
  result = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      result.append(i)
      if i != n // i:
        result.append(n//i)
  return result

count = 0
for j in range(N):
  if N%2==0:
    continue
  if len(divisor(j)) == 8:
    count += 1
print(count)

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())
l = []

for i in range(1,n+1):
    l.append(n%i) 

if l.count(0)==8:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
a=int(input())
b=[3,5,7,11,13,17,19]
c=d=0
if a<105:a=104
for i in range(103,a):
    for j in b:
        if a%j==0:c+=1
    if c==3:d+=1
    c=0
print(d)

Submission status: Wrong Answer

Solution code:
a=int(input())
b=[3,5,7,9,11,13,15,17,19]
c=d=0
if a<105:a=105
for i in range(104,a):
    for j in b:
        if a%j==0:c+=1
    if c==3:d+=1
    c=0
print(d)

Submission status: Wrong Answer

Solution code:
a=int(input())
b=[3,5,7,11,13,17,19]
c=d=0
if a<105:a=105
for i in range(104,a):
    for j in b:
        if a%j==0:c+=1
    if c==3:d+=1
    c=0
print(d)

Submission status: Wrong Answer

Solution code:
n=int(input())
c=0
for i in range(1,n+2,2):
  s=sum([i%q==0 for q in range(1,int(i**.5)+1)])
  if s==4:c+=1
print(c)

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())
for i in range(1,N+1):
    cnt = 0
    ans = 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:
def f(n):
    a = []
    for i in range(1,n+1):
        if n%i == 0:
            a.append(i)
    return a

n = int(input())
count = 0
for i in range(1,n+1):
    ff = f(i)
    if len(ff) == 8:
        count+=1
print(count)

Submission status: Wrong Answer

Solution code:
# ABC106B - 105
n = int(input())
odd = []
odd_divs = []

for i in range(1, n + 1):
    if i % 2 == 1:
        odd.append(i)
        
print(odd)
for i in range(len(odd)):
    count = 0
    for j in range(1, odd[i] + 1):
        if odd[i] % j == 0:
            count += 1            
    odd_divs.append(count)
    
print(odd_divs.count(8))

Submission status: Wrong Answer

Solution code:
N = int(input())
oddprime = []
for i in range(3, N + 1, 2):
  com = False
  for p in oddprime:
    if p > i ** 0.5:
      break
    if i % p == 0:
      com = True
      break
  if not com:
    oddprime.append(i)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
count=0
for i in range(1):
    for j in range(1):
        for k in range(1):
            for l in range(1):
                for m in range(1):
                    if i*3+j*5+k*7+l*11+m*13<=N and i+j+k+l+m==3:
                        count+=1
print(count)

Submission status: Wrong Answer

Solution code:
N=int(input())
count=0
for i in range(1):
    for j in range(1):
        for k in range(1):
            for l in range(1):
                for m in range(1):
                    if i*3+j*5+k*7+l*11+m*13<=N:
                        count+=1
print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
count_ans = 0
for i in range(n//2 + 1):
  count_y = 0
  for j in range(2*i+2):
    if j > 0:
      if (2 * i + 1)%j == 0:
        count_y += 1
  if count_y == 8:
    count_ans += 1
print(count_ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
c=0
for k in range(105,n+1):
  a=[]
  for i in range(1,k+1):
    if 0==n%(i+1):
      a.append(i+1)
      a.append(n//(i+1))
  c+=len(set(a))==8
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)
elif(n < 194):
    print(3)
else:
    print(4)

Submission status: Wrong Answer

Solution code:
n = int(input())

if(n < 105):
    print(0)
elif(n < 134):
    print(1)
elif(n <= 165):
    print(2)
elif(n <= 194):
    print(3)
elif(195 <= n):
    print(4)

Submission status: Wrong Answer

Solution code:
n = int(input())

if(n < 105):
  print(0)
else:
  print(1)

Submission status: Wrong Answer

Solution code:
n = int(input())
array = []
answer = []
for i in range(1,n,2):
    for j in range(2,i):
        if(i % j == 0):
            array.append(j)
            if(len(array) == 8):
                answer.append(i)

print(len(answer))

Submission status: Wrong Answer

Solution code:
#105 B
N=int(input())
if N<105:
    print(0)
elif 105<= N <415:
    print(1)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

print(ans)