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: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

print(result)

Submission status: Accepted

Solution code:
n = int(input())

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

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

print(ans)

Submission status: Accepted

Solution code:
n = int(input())

ans = 0

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

print(ans)

Submission status: Accepted

Solution code:
import sys
import math
import collections
import itertools
import array
import inspect

# Set max recursion limit
sys.setrecursionlimit(10000)


# Debug output
def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))


# Binary converter
def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]


# --------------------------------------------

dp = None


def main():
    N = int(input())
    L = [105, 135, 165, 189, 195]

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


main()

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
n=int(input())

ans=0

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

print(ans)

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,datetime
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inpl(): return list(map(int, input().split()))
def inpl_s(): return list(input().split())

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

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

	if tmp == 8:
		ans += 1

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(raw_input())
cnt = 0
for i in range(1, n + 1, 2):
  if len([1 for it in range(1, i + 1) if i % it == 0]) == 8:
    cnt += 1

print cnt

Submission status: Accepted

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

print(sum(len(compute_divisors(i))==8 for i in range(1,int(input())+1, 2)))

Submission status: Runtime Error

Solution code:
import sys
import sympy

ans = 0
for i in range(1, int(input())+1):
    ans += 1 if i%2==1 and len(sympy.divisors(i)) == 8 else 0
print(ans)

Submission status: Runtime Error

Solution code:
# 105の約数は1, 3, 5, 7, 3 * 5, 3 * 7, 5 * 7, 3 * 5 * 7
# ほかにありえるのは
# ①1, 3, 5, 9, ...
# ②1, 3, 5, 11, ...
# ③1, 3, 5, 13, ...
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: Runtime Error

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<189:
  print(3)
elif:189<=a:
  print(4)

Submission status: Runtime Error

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<189:
  print(3)
elif:189<=a
  print(4)

Submission status: Runtime Error

Solution code:
import sympy

n = int(input())
count = 0
for i in range(1, n+1):
    if i % 2 == 1:
        if len(sympy.divisors(i)) == 8:
            # print(i)
            count += 1
print(count)

Submission status: Runtime Error

Solution code:
import sympy
def I(): return int(input())
N = I()
ans = 0
if N>=105:
    for i in range(105,N+1,2):
        if len(sympy.divisors(i))==8:
            ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
import sympy
n=int(input())
ans=0
for i in range(1,n+1,2):
    if sympy.divisor_count(i)==8:
        ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
import sympy
n = int(input())
c = 0
for i in range(1,n+1):
    if i % 2 == 1 and len(sympy.divisors(i))==8:
        c+=1
print(c)

Submission status: Runtime Error

Solution code:
import sympy
n = int(input())
if n % 2 == 1 and len(sympy.divisors(n))==8:
    print(1)
else:
    print(0)

Submission status: Runtime Error

Solution code:
import sympy
n = int(input())
if n % 2 == 0 and len(sympy.divisors(n))==8:
    print(1)
else:
    print(0)

Submission status: Runtime Error

Solution code:
def make_divisors(n):
    a,b =[],[]
    i = 1
    while i*i<=n:
        if n%i == 0:
            a.append(i)
            if i != n//i:
                b.append(n//i)
        i+= 1
    return a+b[::-1]

if i % 2 == 0 and len(make_divisors(int(input())))==8:
    print(1)
else:
    print(0)

Submission status: Runtime Error

Solution code:
import sympy
if i % 2 == 0 and len(sympy.divisors(int(input())))==8:
    print(1)
else:
    print(0)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sympy

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

print(cnt)

Submission status: Runtime Error

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

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

print(cnt)

Submission status: Runtime Error

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

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

print(cnt)

Submission status: Runtime Error

Solution code:
import numpy as np
from sys import stdinans=0
c=0
N = int(input().rstrip())
for i in range(N):
  c=0
  i+=1
  if i%2==1:
    for j in range(i):
      j+=1
      if i%j==0:
        c+=1
  if c==8:
    ans+=1

print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
L = [i for i in range(1, N+1) if i % 2 != 0]
ans = 0
if N < 105:
    print(0)
    sys.exit(0)
for num in L:
    counter = 1
    for i in range(1, num//2):
        if num % i == 0:
            counter += 1
    if counter == 8:
        ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())

li = [3,5,7,11,13]
ans = 0
for i in range(1,n+1):
    cnt = 0
    for j in range(10):
        if i%li[j]==0:
            cnt += 1
    if cnt ==3:
        ans +=1

if n>=135:
    ans += 1
if n>=189:
    ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
import sympy
N=int(input())
ans=0
for i in range(1,N+1,2):
    if len(sympy.divisors(i))==8:
        ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# モジュールのインポート
import sympy as sp

# 標準入力を取得
N = int(input())

# 求解処理
ans = 0
for n in range(1, N + 1, 2):
    if sp.divisor_count(n) == 8:
        ans += 1

# 結果出力
print(ans)

Submission status: Runtime Error

Solution code:
https://atcoder.jp/contests/abc106/scoreN = int(input())
#cnt = 0
ans = 0
for i in range(1, N+1, 2):
    cnt = 0 
    for j in range(1, i+1):
        if i % j == 0:
            cnt += 1
    if cnt == 8:
        ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
N=int(input())

ans=0
odd=[]
for i in range(1,N+1):
  if i%2!=0:
    odd.append(i)
    
if N  <104:
  pass
elif N=105:
  ans=1
else:
  ans=1
  for i in range(106,N+1):
    if i%2 !=0:
      tmp=0
      for j in odd:
        if i%j==0:
          tmp=+1
      if tmp==8:
        ans+=1
        
        
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())

import sympy

cnt=0
for i in range(1,N+1):
    if i%2==1 and sympy.divisor_count(i)==8:
        # print(i)
        cnt+=1

print(cnt)

Submission status: Runtime Error

Solution code:
import sympy

sympy.divisors(10**9)

n = int(input())
print(len(list(filter(lambda x: len(sympy.divisors(x)) == 8, range(1, n + 1,2)))))

Submission status: Runtime Error

Solution code:
import sympy

sympy.divisors(10**9)

n = int(input())
print(len(list(filter(lambda x: sympy.divisors(x) == 8, range(0, n + 1)))))

Submission status: Runtime Error

Solution code:
n = int(input())

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

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

print(ans

Submission status: Runtime Error

Solution code:
import sympy
n = int(input())
cnt = 0
for i in range(1, n+1):
  l = sympy.divisors(i)
  if (i % 2 != 0) and (len(l) == 8):
    cnt += 1
print(cnt)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sympy

N = int(input())

ans = 0
for i in range(1, int(N/2)+1):
    if len(sympy.divisors(2*i+1))==8:
        ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
def resolve():
    N = int(input())
    ans = 0
    for i in range(1, N+1, 2):
        tmp = make_divisors(i)
        if len(tmp) == 8:
            ans += 1
    print(ans)
    return

resolve()

Submission status: Runtime Error

Solution code:
import sympy
sympy.divisors(10**9)

n = int(input())
cnt = 0

for j in range(n+1):
    def make_divisors(j):
        lower_divisors, upper_divisors = [], []
        i = 1
        while i*i <= n:
            if n % i == 0:
                lower_divisors.append(i)
                if i != n // i:
                    upper_divisors.append(n//i)
            i += 1
        return lower_divisors + upper_divisors[::-1]
if len(make_divisors(j)) == 8:
    cnt += 1
print(cnt)

Submission status: Runtime Error

Solution code:
import sympy

n = int(input())
# print(f"{n}")

ans = 0
for i in range(1, n + 1):
    if i % 2 == 0:
        continue
    
    d_count = sympy.divisor_count(i)
    # print(f"{i} {d_count}")
    if d_count == 8:
        ans += 1
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

def yakusu(x):
    A=[]
    for i in range(1,x+1):
        if x%i==0:
            A.append()
    return(len(A))
    
n=int(input())

print(yakusu(n))

Submission status: Runtime Error

Solution code:
N=int(input())
count = 0
count2 = 0
for i in range(1,N+1):
    #print(i,"i")
    for j in range(1,N+1):
        #print(j,"k")
        if i % j == 0 :
            count += 1
            #print(count,"count")
    if count == 8 and i%2 != 0:
        count2 += 1
        ans = count2
    count = 0
    count2 = 0
print(ans)

Submission status: Runtime Error

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

print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
l = [105, 135, 165, 189, 195]
for i in range(5):
    if N < l[i]:
        print(i)
        exit(1)
print(5)

Submission status: Runtime Error

Solution code:
number = int(input())

num_eight_divisors = 0

numbers = list(range(9, number + 1, 2))

for i in range(9, number + 1, 2):
    divisors = [1, i]

    for j in range(2, i):
        q, mod = divmod(i, j)

        if mod == 0:
            divisors.append(j, q)

    if len(set(divisors)):
        num_eight_divisors = num_eight_divisors + 1

print(num_eight_divisors)

Submission status: Runtime Error

Solution code:
N = int(input())

def make_divisors(n):
    ans = 0
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            ans += 1
            if i != n // i:
                ans += 1
    return ans

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

print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())

ans = 0
import sympy
for i in range(1,N+1):
    if (i %2 ==1) and (len(sympy.divisors(i)) ==8):
        ans += 1

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:

def solve():
    ans = 0
    n=int(input())
    for i in range(1,n+1):
        div_list = []
        for j in range(1,int(i**0.5)+1):
            if i%j!=0:
                continue
            if i//j==j:
                div_list.append(j)
            else:
                div_list.append(i//j)
                div_list.append(j)
        if len(div_list)==8:
            ans=+=1
    print(ans)

if __name__ == '__main__':
    solve()

Submission status: Runtime Error

Solution code:

def solve():
    ans = 0
    n=int(input())
    for i in range(1,n+1):
        div_list = []
        for j in range(1,int(i**0.5)+1):
            if i%j!=0:
                continue
            if i//j==j:
                div_list.append(j)
            else:
                div_list.append(i//j)
                div_list.append(j)
        if len(div_list)=8:
            ans=+=1
    print(ans)

if __name__ == '__main__':
    solve()

Submission status: Runtime Error

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

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

print(a)

Submission status: Runtime Error

Solution code:
import sympy

n = int(input())

ans = 0
for i in range(1, n + 1, 2):
    if len(sympy.divisors(i)) == 8:
        ans += 1

print(ans)

Submission status: Runtime Error

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

for i in range(1,n+1):
    if len(sympy.divisors(i)) == 8 and i % 2 == 1:
        cnt += 1
print(cnt)

Submission status: Runtime Error

Solution code:
n=int(input())

a=[]
for i in range(1,201,2):
    s=0
    for j in range(1,int(i**0.5)+1):
        if i%j==0:
            s+=1
            if j != i//j:
                s+=1
    a.append(s)

ans=0
for i in range(n//2+1):
    if a[i]==8:
        ans+=1

print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
ans = 0
for num in range(1, n):
    if num%2 == 1:
        continue
    ls = []
    for i in range(num+1):
        if num%i == 0:
            ls.append(i)
    if len(ls) == 8:
        ans += 1
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(cnt)

Submission status: Runtime Error

Solution code:
n=int(input())
if n<105:
  print(0)
else:
  c=0
  for i in range(105,n+1,2):
    p=0
    for j in range(1,i//2+1,2):
      if i%j==0:
        p+=1
    if p==7:
      c+=1
print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
S = input()
K = int(input())
for i in range(K):
    if S[i] != 1:
        print(S[i])
        exit()
print(1)

Submission status: Runtime Error

Solution code:
import sys

n = int(sys.stdin.readline().rstrip("\n"))
count = 0
for num in range(27, n+1, 2):
    divisor = 1
    for p in range(1, num, 2):
        if num % p == 0:
            print(f"num: {num}, p: {p}")
            divisor += 1
    if divisor == 8:
        count += 1
print(count)

Submission status: Runtime Error

Solution code:
import sys

def main():
    N = int(input())
    
    cnt = 0
    for i in range(1, N+1, 2):
        prime_l = []
        for j in range(1, i+1, 2):
            if i%j==0:
                prime_l.append()
        if len(prime_l)==8:
            cnt+=1
    print(cnt)
main()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# そのまま問題文の通りにやるだけ
n = int(input())
ans = 0
for i in range(n):
    if n % i == 0:
        if n % 2 == 1:
            ans += 1
print(ans)

Submission status: Runtime Error

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

print(ans)

Submission status: Runtime Error

Solution code:
n, x = map(int, input().split())
while(n != 0 or x != 0):
    count = 0
    for i in range(1, n-1):
        for j in range(i+1, n):
            if x - i - j > j and x - i - j <= n:
                count += 1
    print(count)
    n, x = map(int, input().split())

Submission status: Runtime Error

Solution code:
n = int(input())

ret = 0


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

Submission status: Runtime Error

Solution code:
N=int(input())

if (N%4)==0:
    print("Yes")
    break
elif(N%7)==0:
    print("Yes")
    break
elif(N%11)==0:
    print("Yes")
    break
while N>0:
    i=1
    N=N-11*i
    if(N%4)==0 or (N%7)==0:
        print("Yes")
        break
    i=i+1
else:
    print("No")

Submission status: Runtime Error

Solution code:
n = int(input())

a = [0] * 100
b = [0] * 100
ans = 0

for i in range(100):
    a[i] = 2 * i + 1

for i in range(100):
    for j in range(2, 200):
        if a[i] % j == 0:
            b[i] += 1

for k in range(n+1):
    if b[k] == 7:
        ans += 1

print(ans)

Submission status: Runtime Error

Solution code:
N=int(input())
def yakusuu(n):
  num=0
  for i in range(1,n):
    if n%i==0:
      num=num+1
  return num==8
ans=0
for i in range(n):
  if def(i):
    ans=ans+1
print(ans)

Submission status: Runtime Error

Solution code:
#import math
N=int(input())
def yakusuu(n):
  num=_0
  for i in range(1,n):
    if n%i==0:
      num=num+1
  return num==8
ans=0
for i in range(n):
  if def(i):
    ans=ans+1
print(ans)

Submission status: Runtime Error

Solution code:
import sys;print(int(sys.argv[1][-6:-5])/2)

Submission status: Runtime Error

Solution code:
print(int(__file__[-6:-5])/2)

Submission status: Runtime Error

Solution code:
print(int(__file__[5])/2)

Submission status: Runtime Error

Solution code:
print(int(__file__[6])/2)

Submission status: Runtime Error

Solution code:
print(int(__file__[4])/2)

Submission status: Runtime Error

Solution code:
import re;print(int(re.sub('¥D',"",__file__))/2)

Submission status: Runtime Error

Solution code:
print __file__

Submission status: Runtime Error

Solution code:
n = int(input())
ans = 0
A = [i for i in range(n+1)]
A = A[1::2]
for i in range(len(A)):
    a=0
    for j in range(len(A)):
        if A[i] % j == 0:
            a += 1
    if a == 8:
        ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
A = [i for i in range(n)]
A = A[1::2]
ans = 0
for i in range(len(A)):
  a = 0
  for j in range(len(A)//2):
    if A[i] % j == 0:
      a += 1
      if a == 8:
        ans += 1
      if a == 9:
        ans -= 1
        break
print(ans)

Submission status: Runtime Error

Solution code:
import numpy as np

def number_of_divisor(n):
	import numpy as np
	result = []
	while n > 1:
		div = divisor(n)
		result.append(div)
		n //= div
	index, result = np.unique(result, return_counts=True)
	return np.prod(result+1)

def divisor(n):
    if n % 2 == 0:
        return 2
    elif n % 3 == 0:
        return 3
    maxitr = intSqrt(n)
    i = 1
    while True:
        i += 4
        if i > maxitr:
            return n
        elif n % i == 0:
            return i
        i += 2
        if i > maxitr:
            return n
        elif n % i == 0:
            return i

def intSqrt(n):
    x = 1
    while True:
        x2 = (x + n // x) // 2
        if x2 ** 2 <= n and abs(x - x2) <= 1:
            break
        x = x2
    return x2

def ABC106B(n):
    count = 0
    for i in range(3, n+1, 2):
        if number_of_divisor(i) == 8:
            count += 1
    print(count)

n = int(input())
ABC106B(n)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

if 104 >= n:
    print(0)
else:
    ans = 0
    for i in range(105,n+1):
        if i%2 == 0:
            continue
        cnt=0
        for j in range(1,i+1):
            if i%j == 0:
                cnt+=1
            
        if cnt == 8:
            ans+=1

print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())

if 104 >= n:
    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: Runtime Error

Solution code:
n = int(input())

if 104 >= n:
    print(0)
else:
    ans = 0
    for i in range(105,201):
        cnt=0
        for j in range(1,i+1):
            if i%j == 0:
                cnt+=1
            
        if cnt == 8:
            ans +=1

print(ans)

Submission status: Runtime Error

Solution code:
import math
def countYakusu(n):
  count = 0
  for i in range(math.floor(n**0.5)):
    if n % i == 0:
      count = count + 1
  return count == 8

N = int(input())
count = 0
for i in range(math.floor(N/2)):
  count = count + countYakusu(i*2+1)
print(count)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
from math import gcd

from math import factorial as f

from math import ceil,floor,sqrt


import bisect
import re
import heapq


from copy import deepcopy
import itertools

from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

yes = "Yes"
no = "No"

def main():
    n = ii()
    cnt = 0
    for i in range(1,n+1):
        if not i%2:
            continue
        tmp = 0
        for j in range(1,i+1):
            if not i%j:
                tmp+=1
        if tmp == 8:
            cnt+=1
    print(cnt)


main()

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

Solution code:
"""
方針
nは１<= n <= 200なので、
あらかじめ200まで全探索 O(n*2*√n)
"""
def countyakusu(n):
    cnt = 0
    for i in range(1,int(math.sqrt(n))+1):
        if n%i == 0:
            cnt += 1
            if i != n//i:
                cnt += 1
    return cnt
result = [0]*200
for i in range(1,201):
    if i%2 != 0:
        result[i-1] = countyakusu(i)

n = int(input())
cnt = 0
for i in range(n):
    if result[i] == 8:cnt += 1
print(cnt)

Submission status: Runtime Error

Solution code:
N = int(input())
c = 0
for  i in rrange(1,N+1):
  li = []
  if i < 10:
    continue
  else:
    k = i
    for j in range(2,int(i**(0.5)+1)):
      while k % j == 0:
        k = k/j
        li.append(j)
    if len(li) == 8:
      c += 1
print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import numpy as np
n = int(input())
ans = 1
for i in range(1,n+1):  
    if(i%2==0):
        continue
    count=0
    for j in range(1,i+1):
        if(i%j == 0):
            count += 1
    if(count == 7):
            ans+=1
print(ans)

import numpy as np
n = int(input())
ans =0
for i in range(1,n+1):  
    if(i%2==0):
        continue
    count=0
    for j in range(1,i+1):
        if(i%j == 0):
            count += 1
    if(count == 7):
            ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
import numpy as np
n = int(input())
for i in range(n):  
    if(n%2==0):
        break
    count=0
    for j in range(2,int(np.sqrt(i))+1):
        if(i%j == 0):
            count += 1
        if(count == 7):
            break
print(count)

Submission status: Runtime Error

Solution code:
n = int(input())
count=0
for i in range(2,sprt(n)+1):
    if(n%i == 0):
        count += 1
    if(count == 7):
        break
print(count)

Submission status: Runtime Error

Solution code:
import sys


def input():
    return sys.stdin.readline().strip()


sys.setrecursionlimit(10 ** 9)


def main():
    N = int(input())
    if N < 105:
        print(0)
        return

    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)

    cnt = 1
    for n in range(106, N + 1):
        d = make_divisors(n)
        if len(d) == 8:
            cnt += 1
    print(cnt)


if __name__ == "__main__":
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

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

Submission status: Runtime Error

Solution code:
N = int(input())

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

    # divisors.sort()
    return divisors
  
print(int(make_divisors(N)))

Submission status: Runtime Error

Solution code:
N=input()

answer=0
count=0
 
for i in range(1,N+1,2):
    for j in range(1,int(i**0.5)+1):
        if i%j==0:
            count+=1
    if count==4:
        answer+=1
    count=0
 
print(answer)

Submission status: Runtime Error

Solution code:
answer=0
count=0
 
for i in range(1,N+1,2):
    for j in range(1,int(i**0.5)+1):
        if i%j==0:
            count+=1
    if count==4:
        answer+=1
    count=0
 
print(answer)

Submission status: Runtime Error

Solution code:
answer=0
count=0

for i in range(1,int(N**0.5)+1):
    if N%i==0:
        count+=1
if count==4:
    answer+=1

print(answer)

Submission status: Runtime Error

Solution code:
N=input()

answer=0
count=0

for i in range(1,int(N**0.5)+1):
    if N%i==0:
        count+=1
if count==4:
    answer+=1

print(answer)

Submission status: Runtime Error

Solution code:
N = int(input())

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

    # divisors.sort()
    return divisors


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

Submission status: Runtime Error

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