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:
def is_ans(n:int) -> int:
    count = 0
    for i in range(1,n+1):
        if n%i == 0:
            count += 1
    return count

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

count=0
mitasuN=[]
for i in range(1,N,2):
    tmp_s = make_divisors(i)
    # print(tmp_s)
    if len(tmp_s)==8:
        count+=1
        mitasuN.append(i)
# print(mitasuN)
print(count)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
def input(): return sys.stdin.readline().rstrip()

def main():
    N=int(input())
    tmp=0
    ans=0
    for i in range(1,N+1):
        if N%i==0:
            tmp+=1
    if tmp==8:
        ans+=1
    print(ans)

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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 i % j == 0:
            cnt += 1
    print(i,cnt)
    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,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: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import sqrt
N = int(input())
ans = 0
for i in range(7, N+1):
  if i%2==0:
    continue
  c = 0
  for j in range(1, int(sqrt(i))+1):
    if i%j==0:
      if i%j==j:
        c+=1
      else:
        c+=2
  if c==8:
    ans += 1
    print(i)
print(ans)

Submission status: Wrong Answer

Solution code:
from math import sqrt
N = int(input())
ans = 0
for i in range(7, N+1):
  if i%2==0:
    continue
  c = 0
  for j in range(1, int(sqrt(i))+1):
    if i%j==0:
      c+=2
  if c==8:
    ans += 1
    print(i)
print(ans)

Submission status: Wrong Answer

Solution code:
from math import sqrt
N = int(input())
ans = 0
for i in range(7, N+1):
  if i%2==0:
    continue
  c = 0
  for j in range(1, int(sqrt(i))-1):
    if i%j==0:
      c+=2
  if c==8:
    ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
from math import sqrt
N = int(input())
ans = 0
for i in range(7, N+1):
  if i%2==0:
    continue
  c = 0
  for j in range(1, int(sqrt(i))):
    if i%j==0:
      c+=2
  if c==8:
    ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
'''
制約 1< n< 200
'''
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())
for i in range(1, n+1, 2):
    if len(make_divisors(i)) == 8:
        print(i)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
n=int(input())

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

Submission status: Wrong Answer

Solution code:
import time, timeit

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

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

if __name__ == '__main__':
    n = int(input())
    c = 0
    for i in range(1, n + 1):
        if count_divisor(i) == 8:
            c += 1

Submission status: Wrong Answer

Solution code:
import math
N=int(input())
ans=0
for i in range((N+1)//2):
    odd=2*i+1
    cnt=0
    if type(math.sqrt(i)) is int:
        continue
    for k in range(1,math.ceil(math.sqrt(i))):
        if odd%k==0:
            cnt+=1
    if cnt==4:
        ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

for n in range(1,N+1):
    ct=0
    if n%2!=0 and NumOfFractional(n)==8:
        ct+=1
print(ct)

Submission status: Wrong Answer

Solution code:
#ABC106

n = int(input())

# (1+p)(1+q)(1+r)
# 2*2*2=8
# (1+p+p^2+p^3)(1+q)
# 4*2=8

# p = [3,5,7,11,13,17,19]

l = [1,3*5*7,3*5*11,3*5*13,3**3*5,3**3*7,201]

for i in range(6):
    if l[i] <= n < l[i+1]:
        print(i)
        break

Submission status: Wrong Answer

Solution code:
#ABC106

n = int(input())

# (1+p)(1+q)(1+r)
# 2*2*2=8
# (1+p+p^2+p^3)(1+q)
# 4*2=8

# p = [3,5,7,11,13,17,19]

# l = [3*5*7,3**3*5]

if n < 3*5*7:
    print(0)
elif n < 3**3*5:
    print(1)
else:
    print(2)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 1
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: Wrong Answer

Solution code:
def hantei(n):
    root_n = int(n**0.5 +0.5)
    
    if root_n**2 == n:
        return 0
    
    total = 0
    for i in range(1,root_n):
        if n % i == 0:
            total += 2
            
    return total
    
n = int(input())

total = 0
for i in range(1,n+1,2):
    if hantei(i) == 8:
        print(i)
        total += 1

print(total)

Submission status: Wrong Answer

Solution code:
def hantei8(n):
    root_n = int(n**0.5)
    
    if root_n**2 == n:
        return False
    
    total = 0
    for i in range(1,root_n):
        if n % i == 0:
            total += 2
            
    if total == 8:
        return True
    else:
        return False

n = int(input())

total = 0
for i in range(1,n+1,2):
    if hantei8(i):
        total += 1

print(total)

Submission status: Wrong Answer

Solution code:
N = int(input())

cnt = 0
cnt_cnt = 0


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

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
for j in range(2,n+1):
  if j %2 ==0:
    continue
  div = []
  for i in range(2,j+1):
    if j % i ==0:
      count = 0
      while j%i==0:
        j = j//i
        count += 1
      div.append(count)
    if j == 1:
      break
  if div == [1,1,1]:
    ans += 1
    
print(ans)

Submission status: Wrong Answer

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

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())
if n<105:
    print(0)
    exit()
ans=1
for i in range(106,n+1):
    l=make_divisors(i)
    if len(l)==8:
        ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
from math import *
from collections import deque, Counter, defaultdict
from fractions import gcd
input = lambda: sys.stdin.readline().rstrip()

def eprint(s):
    sys.stderr.write('DEBUG: {}'.format(s))
    return

def 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

def main():
    n = int(input())
    cnt = 0

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

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
N=int(input())

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

print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[105,165,195]
for i in range(3):
  if n<l[i]:
    print(i)
    exit()
print(3)

Submission status: Wrong Answer

Solution code:
def main(n):
    ans = 0
    p = [i for i in range(1, n + 1) if n % i == 0]

    if len(p) == 8:
        print(1)
    else:
        print(0)


if __name__ == "__main__":
    n = int(input())

    main(n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
# candidate_prime_num = [3,5,7,11,13]
# cnt = 0
# LENGTH_CANDIDADE= len(candidate_prime_num)
# for idx1, x in enumerate(candidate_prime_num):
# 
#     if idx1+1 > LENGTH_CANDIDADE:
#         continue
# 
#     idx2 = idx1+1
#     for y in candidate_prime_num[idx2:]:
# 
#         if idx2 + 1 > LENGTH_CANDIDADE:
#             continue
#         idx3 = idx2 +1
#         for z in candidate_prime_num[idx3:]:
#             if x* y * z <= N:
#                 cnt +=1
# print(cnt)
NUM_YAKUSU = 8
cnt_8_yakusu=0
for n in range(1,N+1,2):
    cnt_yakusu = 0
    for x in range(1,n,2):
        if n % x == 0:
            cnt_yakusu+=1
    if cnt_yakusu == NUM_YAKUSU:
        cnt_8_yakusu +=1
print(cnt_8_yakusu)

Submission status: Wrong Answer

Solution code:
N=int(input())
candidate_prime_num = [3,5,7,11,13]
cnt = 0
LENGTH_CANDIDADE= len(candidate_prime_num)
for idx1, x in enumerate(candidate_prime_num):

    if idx1+1 > LENGTH_CANDIDADE:
        continue

    idx2 = idx1+1
    for y in candidate_prime_num[idx2:]:

        if idx2 + 1 > LENGTH_CANDIDADE:
            continue
        idx3 = idx2 +1
        for z in candidate_prime_num[idx3:]:
            if x* y * z <= N:
                cnt +=1
print(cnt)

Submission status: Wrong Answer

Solution code:
x=2
try:
    print("10//x={}".format(10//x))
    print("try節おわりやよ～")
except TypeError:
    print("Type Errorやよ～")
else:
    #try節でErrorがなかった場合に読まれる
    print("Errorなかったやよ～おめでとやよ～")
finally:
    #想定内でも、想定外(exceptに書かれてない)エラーが発生しても、エラーを返す前に最後に読まれる
    print("おわりやよ～")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())
if N < 105:
    print(0)
else:
    ans = 1
    for a in range(107, N+1, 2):
        tmp = 1
        for b in range(2, a//2):
            if a % b == 0:
                tmp += 1
        if tmp == 8:
            ans += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N < 105:
    print(0)
else:
    ans = 1
    for a in range(106, N+1):
        tmp = 1
        for b in range(2, a//2+1):
            if a % b == 0:
                tmp += 1
        if tmp == 8:
            ans += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N < 105:
    print(0)
else:
    ans = 1
    for a in range(106, N+1):
        tmp = 1
        for b in range(2, a//2):
            if a % b == 0:
                tmp += 1
        if tmp == 8:
            ans += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n=INT()
    flg=0
    for i in range(n//7+1):
        if (n-i*7)%4==0:
            flg=1
    if flg==1:
        print('Yes')
    else:
        print('No')
if __name__ == '__main__':
    do()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

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

Submission status: Wrong Answer

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

def 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

l = len(divisor(n))

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#ABC105-B
n = int(input())
divisor_list = []
ans = 0
for i in range(1,n+1):
    if(i % 2 != 0):
        if(n % i == 0):
            divisor_list.append(i)
if(len(divisor_list) == 8):
    ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
stdin = sys.stdin
import itertools

mod = 10**9 + 7

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

n = ni()
ans = 0
for m in range(1, n+1, 2):
    s = set()
    for i in range(1, int(m**0.5)):
        if m % i == 0:
            s.add(i)
            s.add(m//i)
    if len(s) == 8:
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
import sys, math
def input():
    return sys.stdin.readline()[:-1]
from itertools import permutations, combinations
from collections import defaultdict, Counter
from math import factorial
from bisect import bisect_left # bisect_left(list, value)
#from fractions import gcd

sys.setrecursionlimit(10**7)
N = int(input())

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

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

Submission status: Wrong Answer

Solution code:
import math

n = int(input())

def cal_yakusuu(n):
    target = int(math.sqrt(n))
    cnt = 0
    for i in range(1, target+1):
        if n % i == 0:
            cnt += 1
    return cnt*2


if n < 105:
    print(0)
    exit()
elif n == 105:
    print(1)
    exit()
else:
    count = 1
    for i in range(107, n+1):
        if cal_yakusuu(i) == 8:
            count += 1
    print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
if n < 105:
    print(0)
    exit()
elif n == 105:
    print(1)
    exit()
else:
    num = 1
    for i in range(107, n, 2):
        count = 0
        for j in range(1, i):
            if i % j == 0:
                count += 1
        if count == 8:
            num += 1
print(num)

Submission status: Wrong Answer

Solution code:
n = int(input())

if n < 105:
    print(0)
    exit()
elif n == 105:
    print(1)
    exit()
else:
    num = 1
    for i in range(107, n, 2):
        count = 0
        for j in range(1, n):
            if i % j == 0:
                count += 1
        if count == 8:
            num += 1
print(num)

Submission status: Wrong Answer

Solution code:
n = int(input())

if n < 105:
    print(0)
    exit()
elif n == 105:
    print(1)
    exit()
else:
    num = 1
    for i in range(106, n):
        count = 0
        for j in range(1, n):
            if i % j == 0:
                count += 1
        if count == 8:
            num += 1
print(num)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def factorize(n):
    b = 2
    fct = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            fct.append(b)
        b = b + 1
    if n > 1:
        fct.append(n)
    return fct

def solve():
    N = int(input())
    
    c = 0
    for i in range(1, N+1, 2):
        f = factorize(i)
        l = []
        for j in f:
            l.append(j)
            l.append(N // j)
        l.append(N)
        l.append(1)
        s = len(set(l))
        if s == 8:
            c += 1

    return c

print(solve())

Submission status: Wrong Answer

Solution code:
N=int(input())

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

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

Submission status: Wrong Answer

Solution code:
N=int(input())

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

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

Submission status: Wrong Answer

Solution code:
import math
N=int(input())
ans=0
if N<105:
	print(0)
else:
	for i in range (105,N+1):
		tmp=[]
		if i%2==1:
			for j in range(1,int(math.sqrt(N)+1)):
				if i%j==0:
					tmp.append(j)
					tmp.append(1//j)
			if len(tmp)==8:
				#print(i)
				ans+=1
	print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
if N<105:
  print(0)
  exit()
cnt=1
for i in range(107,201,2):
  tmp=0
  for j in range(2,int(i**0.5)):
    if i%j==0:
      tmp+=2
  if tmp==8:
    cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())

def divisor(n):
  i = 2
  count = 0
  divs = []
  while n != 1:
    if n % i:
      divs.append(count)
      count = 0
      i+= 1
    else:
      n = n //i
      count += 1
  ans = 1
  for d in divs:
    ans *= d + 1
  return ans

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

Submission status: Wrong Answer

Solution code:
n = int(input())


def 約数(n):
	count = 0
	for i in range(1,n):
		if n%i == 0:
			count += 1
	if count == 8:
		return True
	else:
		return
if n == 105:
	print(1)
elif n < 105:
	print(0)
else:
	ans = 1
	for i in range(106,n+1):
		if i%2 !=0:
			if 約数(i):
				ans += 1


	print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())


def 約数(n):
	count = 0
	for i in range(2,n):
		while n%i == 0:
			n /= i
			count += 1
	if count == 8:
		return True
	else:
		return
if n == 105:
	print(1)
elif n < 105:
	print(0)
else:
	ans = 1
	for i in range(106,n+1):
		if i%2 !=0:
			if 約数(i):
				ans += 1


	print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())


def 約数(n):
	count = 0
	for i in range(2,int(n**0.5)+1):
		while n%i == 0:
			n /= i
			count += 1
	if count == 8:
		return True
	else:
		return
if n == 105:
	print(1)
elif n < 105:
	print(0)
else:
	ans = 1
	for i in range(106,n+1):
		if i%2 !=0:
			if 約数(i):
				ans += 1


	print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 0
for i in range(1, 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:
        print(i)
        ans += 1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
count = 0
ans = 0
ans_list = [i for i in range(n) if i%2!=0]
for i in ans_list:
  for j in range(1,n):
    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(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline

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

Submission status: Wrong Answer

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

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

for i in range(105, n + 2, 2):
    divisors = []
    for j in range(1, i + 1):
        if i % j == 0:
            divisors.append(j)

    if len(divisors) == 8:
        ans.append(i)

print(len(ans))

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    ans = [0] * 201
    cnt = 0
    a = [0] * 201
    if n % 2 == 0:
        print(0)
        return
    else:
        for i in range(1,n+1):
            if i % 2 == 0:
                a[i] = a[i-1]
            else:
                cnt = 0
                for j in range(1,i+1):
                    if i % j == 0:
                        cnt += 1
                if cnt == 8:
                    a[i] = a[i-1] + 1
                else:
                    a[i] = a[i-1]

        print(a[n])



if __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
def gp():
	yield 2
	yield 3
	n=6
	while 1:
		yield n-1
		yield n+1
		n+=6
	

def resolve():
	nn=int(input())
	l=[]
	ans=0
	for n in range(1,nn+1)[::2]:
		s=1
		pl=gp()
		for i in pl:
			k=0
			while n%i==0:
				k+=1
				n//=i
			s*=k+1
			if n==1:
				break
		if s==8:
			ans+=1
	print(ans)

Submission status: Wrong Answer

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


def solve(N: int):

    result = 0
    for i in range(1, N + 1, 2):
        if len(make_divisors(i)) == 5:
            result += 1
    print(result)
    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)

    # divisors.sort()
    return divisors


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)


if __name__ == "__main__":
    main()

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)
elif N >= 195:
    print(4)

Submission status: Wrong Answer

Solution code:
N = int(input())


## 約数の列挙O(√N)
def divisor(n): #nの約数を全て求める
    i = 1
    table = []
    while i * i <= n:
        if n%i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = list(set(table))
    return len(table)
  
i = 1
answer = 0
while i < N:
  if divisor(i) == 8:
    answer += 1
  i += 2
print(answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
X=int(input())
print(int(X>104))

Submission status: Wrong Answer

Solution code:
X=int(input())
print(X>104)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

read = sys.stdin.buffer.read
input = sys.stdin.buffer.readline
inputs = sys.stdin.buffer.readlines

# mod=10**9+7
# rstrip().decode('utf-8')
# map(int,input().split())
# import numpy as np

def main():
	n=int(input())
	ans=0
	if n>=105:
		ans+=1
	if n>=135:
		ans+=1
	if n>=165:
		ans+=1
	if n>189:
		ans+=1
	
	print(ans)
	
	
if __name__ == "__main__":
	main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
oddl = list(map(int, (i for i in range(1, n, 2))))


def eight(n):
    i = 1
    cnt = 0
    while i <= n:
        if n % i == 0:
            cnt += 1
        i += 1
    if i == 8:
        return 1
    else:
        return 0


for i in oddl:
    ans += eight(i)
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
if N < 105:
  print("0")
elif N == 105:
  print("1")
else:
  ans = 0
  for i in range(105,N+1,2):
    nn = i
    c = 0
    s = 2
    while s*s<=i:
      if nn%s==0:
        c += 1
        nn //= s
        while nn%s==0:
          nn //= s
      s+=1
    if nn!=1 and nn!=s:
      c += 1
    if c == 3:
      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 = 0
  for i in range(105,N+1):
    nn = i
    c = 0
    s = 2
    while s*s<=i:
      if nn%s==0:
        c += 1
        nn //= s
        while nn%s==0:
          nn //= s
      s+=1
    if nn!=1 and nn!=s:
      c += 1
    if c == 3:
      ans += 1
  print(ans)

Submission status: Wrong Answer

Solution code:
import sys, math
def input():
    return sys.stdin.readline()[:-1]
from itertools import permutations, combinations
from collections import defaultdict, Counter
from math import factorial
from bisect import bisect_left # bisect_left(list, value)
#from fractions import gcd

sys.setrecursionlimit(10**7)
N = int(input())

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

Submission status: Wrong Answer

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


def main():
    N = int(input())
    result = 0
    for i in range(1, N + 1):
        if N % i == 0:
            result += 1
    print(1 if result == 8 else 0)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
N=map(int,input().split())
cnt=0
l=[3*5*7,3*5*9,3*5*11,3*5*13,3*7*9]
for n in N:
  cnt+=(n in l)
print(cnt)

Submission status: Wrong Answer

Solution code:
N=map(int,input().split())
cnt=0
l=[3*5*7,3*5*9,3*5*11,3*5*13]
for n in N:
  cnt+=(n in l)
print(cnt)

Submission status: Wrong Answer

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

def factors(a):
    b = int(math.sqrt(a))
    f = []
    for i in range(1, b+1):
        if a % i == 0:
            f.append(i)
            f.append(a//i)
    return len(f)

def solve():
    if n < 105:
        print(0)
        return
    ans = 0
    for i in range(105, n+1):
        if factors(i) == 8:
           ans += 1
    print(ans)
solve()

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
ans=0
N=int(input())
if N<105:
    print(0)
    exit(0)
for i in range(104,N):
    if i%2==1 and len(make_divisors(i))==8:
        ans+=1
print(ans)