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

def make_divisor(n):
    divisors = []
    for i in range(1, int(n**.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):
    if len(make_divisor(i)) == 8 and  i%2 == 1:
        print(i)
        exit()
print(0)

Submission status: Wrong Answer

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



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

print(ans_counter)

Submission status: Wrong Answer

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

if in_num < 105:
	print(0)

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

	print(ans_counter)

Submission status: Wrong Answer

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

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

print(ans_counter)

Submission status: Wrong Answer

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

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

print(ans_counter)

Submission status: Wrong Answer

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

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

print(ans_counter)

Submission status: Wrong Answer

Solution code:
def make_divisors(n: int) -> list:
    return_list = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            return_list.append(i)
            if i != n // i:
                return_list.append(n//i)

    return return_list
N = int(input())
cnt = 0
for i in range(1,N+1,2):
    if len(make_divisors(i)) == 8:
        cnt += 1
        print(i)
print(cnt)

Submission status: Wrong Answer

Solution code:
A=[3*5*7,3*5*11,3*3*3*5,3*5*13]
N=int(input())
print(len([x for x in A if x<=N]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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, 7, 9, ...
# ④1, 3, 5, 13, ...
n = int(input())
if n < 105: print(0)
elif n < 135: print(1)
elif n < 165: print(2)
elif n < 184: print(3)
elif n < 195: print(4)
else: print(5)

Submission status: Wrong Answer

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: Wrong Answer

Solution code:
n = int(input())
cnt, ans = 0, 0
if n == 105:
    print(1)
elif n <= 104:
    print(0)
else:
    for x in range(107,200,2):
        cnt = 0
        for y in range(1,x+1):
            if x % y == 0:
                cnt += 1
        if cnt == 8:
            ans += 1
    print(ans+1)

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 0

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

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

con = 0
ans = 0

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

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

con = 0
ans = 0

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

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
cnt, ans = 0, 0
if n == 105:
    print(1)
elif n <= 104:
    print(0)
else:
    for x in range(107,n+1,2):
        for y in range(1,x+1):
            if x % y == 0:
                cnt += 1
        if cnt >= 8 and x % 2 != 0:
            ans += 1
    print(ans+1)

Submission status: Wrong Answer

Solution code:
n = int(input())
cnt, ans = 0, 0
if n == 105:
    print(1)
elif n <= 104:
    print(0)
else:
    for x in range(106,n+1,2):
        for y in range(1,x+1):
            if x % y == 0:
                cnt += 1
        if cnt >= 8:
            ans += 1
    print(ans+1)

Submission status: Wrong Answer

Solution code:
n = int(input())
cnt, ans = 0, 0
if n == 105:
    print(1)
elif n <= 104:
    print(0)
else:
    for x in range(106,n+1):
        for y in range(1,x+1):
            if x % y == 0:
                cnt += 1
        if cnt >= 8:
            ans += 1
    print(ans+1)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

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

Submission status: Wrong Answer

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

prime = [3,5,7,11,13,17,19,23,29]

ans_list = list(itertools.permutations(prime,3))
ans = []
for i in range(len(ans_list)):
    k = 1
    for j in range(3):
        k *= ans_list[i][j]
    if k <= N:
        ans.append(k)
print(len(list(set(ans))))

Submission status: Wrong Answer

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

prime = [3,5,7,11,13,17,19,23]

ans_list = list(itertools.permutations(prime,3))
ans = []
for i in range(len(ans_list)):
    k = 1
    for j in range(3):
        k *= ans_list[i][j]
    if k <= N:
        ans.append(k)
print(len(list(set(ans))))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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 n%j==0:
            cnt+=1
    if cnt==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("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
import math
import collections
def prime_factor_table(n):
    table = [0] * (n + 1)

    for i in range(2, n + 1):
        if table[i] == 0:
            for j in range(i + i, n + 1, i):
                table[j] = i

    return table

def prime_factor(n, prime_factor_table):
    prime_count = collections.Counter()

    while prime_factor_table[n] != 0:
        prime_count[prime_factor_table[n]] += 1
        n //= prime_factor_table[n]
    prime_count[n] += 1
    keys, values = zip(*prime_count.most_common())

    return values

N = int(input())
table = prime_factor_table(N)
ans = 0
for i in range(1,N+1,2):
    if prime_factor(i,table) == (1,1,1):
        ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
def divisor(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 table

N = int(input())
total = 0

for n in range(1, N + 1, 2):
    print(n)
    if len(divisor(n)) == 8:
        total += 1

print(total)

Submission status: Wrong Answer

Solution code:
def divisor(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 table

N = int(input())
total = 0

for n in range(1, N + 2, 2):
    if len(divisor(n)) == 8:
        total += 1

print(total)

Submission status: Wrong Answer

Solution code:
N = int(input())

total = 0

for n in range(1, N + 2, 2):
    i = 0

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

    if i == 8:
        total += 1

print(total)

Submission status: Wrong Answer

Solution code:
N = int(input())
cnt=0
y=[]

for i in range(1,N+1,2):
    for j in range(1,i+1):
        if i%j == 0:
            y.append(j)
    if len(y)==8:
        cnt += 1
        print(y)
    y.clear()
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
cnt=0
y=[]

for i in range(1,N+1,2):
    for j in range(1,i+1):
        if i%j == 0:
            y.append(j)
    new_y=set(y)
    if len(new_y)==8:
        cnt += 1
        new_y.clear()
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
cnt=0
y=[]

for i in range(1,N+1,2):
    for j in range(1,i+1):
        if i%j == 0:
            y.append(j)
            new_y=set(y)
            continue
    if len(new_y)==8:
        cnt += 1
        new_y.clear()
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
cnt=0
y=[]

for i in range(1,N+1,2):
    for j in range(1,i+1):
        if i%j == 0:
            y.append(j)
    if len(y)==8:
        cnt += 1
        y.clear()
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
cnt=0
y=[]

for i in range(1,N+1,2):
    for j in range(1,i):
        if i%j == 0:
            y.append(j)
    if len(y)==8:
        cnt += 1
        y.clear()
print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())


def count_divisors(target):
    _i = 1
    _count = 0
    while _i*_i <= target:
        if target % _i == 0:
            _count += 1
            if _i != target // _i:
                _count += 1
        _i += 1
    return _count


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

print(count)

Submission status: Wrong Answer

Solution code:
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

n = i()

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

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

Submission status: Wrong Answer

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]

n = int(input())
c = len(make_divisors(n))
if n % 2 == 1 and (c== 8 or c == 16):
    print(1)
else:
    print(0)

Submission status: Wrong Answer

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]

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

Submission status: Wrong Answer

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]

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
def abc106b_105():
    n = int(input())
    if n < 105:
        print(0)
        return
    cnt = 1
    for i in range(106, n + 1):
        yaku_cnt = 0
        for j in range(1, i + 1):
            if i % j == 0:
                yaku_cnt += 1
        if yaku_cnt == 8:
            cnt += 1

    print(cnt)
abc106b_105()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
a=0
ans=0
if n < 105:
  print(0)

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

Submission status: Wrong Answer

Solution code:
n=int(input())
a=0
ans=0
if n < 105:
  print(0)

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

Submission status: Wrong Answer

Solution code:
n=int(input())
a=0
ans=0
if n < 105:
  print(0)

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

Submission status: Wrong Answer

Solution code:
n = int(input())    

ans = 0
ans_num = 0

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

print(ans_num)

Submission status: Wrong Answer

Solution code:
import math
from collections import Counter
n=int(input())



def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)

    return a
ans=0
for i in range(1,n+1):
  s=Counter(prime_factorize(i))
  cnt=0
  for j in s.values():
    cnt+=j+1
    
  if cnt==8:
    ans+=1
  else:
    continue
    
print(ans)

Submission status: Wrong Answer

Solution code:
# coding: utf-8

num = int(input())
if num == 105:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# coding = SJIS

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:
# coding = SJIS

n = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())
if (1 <= N < 105):
    print(0)
if (105 <= N < 135):
    print(1)
if (135 <= N < 155):
    print(2)
if (155 <= N < 189):
    print(3)
if (189 <= N < 195):
    print(4)
if (195<= N <= 200):
    print(5)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(res)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

li = [3,5,7,11,13,17,19,23,29,31]
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
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
 
def check_divisor(number):
    divisors = 0
    for j in range(1, number+1, 2):
        if not (number%j):
            divisors += 1
            if divisors == 9: return False
    if divisors == 8: return True
    else: return False

count = 0
for i in range(1, N+1, 2):
	if check_divisor(i):
		count += 1

Submission status: Wrong Answer

Solution code:
N = int(input())
 
def check_divisor(number):
  divisors = 0
  for j in range(1, number+1, 2):
    if not (number%j):
      divisors += 1
      if divisors == 9: return False
    if divisors == 8: return True
    else: return False

count = 0
for i in range(1, N+1, 2):
  if check_divisor(i):
    count += 1

Submission status: Wrong Answer

Solution code:
def main():
    n = int(input())
    count = 0
    x_list =[3**3*5, 3**3*7, 3*5*7, 3*5*11]
    for one in x_list:
        if one<=n:
            count+=1
    print(count)

if __name__=="__main__":
    main()

Submission status: Wrong Answer

Solution code:
#abc106b
n = int(input())
ans = 0

for i in range(1,n+1):
    if i % 2 != 0:
        cnt = 0
        for ni in range(1,i+1):
            if n % ni == 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):
    cnt = 0
    for j in range(1, i+1):
        if n % 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
    for j in range(1, i+1):
        if n % j == 0:
            cnt += 1
    if cnt == 8:
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 0
yakusu = 0

for i in range(1,n+1):
    if n % i == 0:
        yakusu += 1
    if yakusu == 8:
        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 n in range(106,N+1):
        if n%2:
            K=n//2
            y=0
            #print(n,K)
            for k in range(2,K+1):
                if n%k==0:
                    y+=1
                    #print(k)
            if y==6:
                #print(n)
                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 n in range(106,N+1):
        if n%2:
            K=n//2
            y=0
            for k in range(2,K):
                if n%k==0:
                    y+=1
            if y==6:
                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 n in range(106,N+1):
        K=n//2
        y=0
        for k in range(2,K):
            if n%k==0:
                y+=1
        if y==6:
            ans+=1
    print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
if N<=105:
    print(1)
else:
    ans=0
    for n in range(106,N+1):
        K=n//2
        y=0
        for k in range(2,K):
            if n%k==0:
                y+=1
        if y==6:
            ans+=1
    print(ans)

Submission status: Wrong Answer

Solution code:
def main():
    N = int(input())

    ans = 0
    for i in range(1, N + 1):
        if i % 2 != 0:
            arr = factorization(i)
            if len(arr) == 3:
                ans += 1
    print(ans)

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])
    if arr==[]:
        arr.append([n, 1])
    return arr

if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
def main():
    N = int(input())
    
    ans = 0
    for i in range(1, N + 1):
        if i % 2 != 0:
            arr = factorization(N)
            if len(arr) == 8:
                ans += 1
    print(ans)
            
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])
    if arr==[]:
        arr.append([n, 1])
    return arr

if __name__ == '__main__':
    main()

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

def count_up_divisor(check_num):
    cnt = 0
    for i in range(1, check_num + 1):
        # 1からnを順に探索して、nの約数かどうか判断して、約数の時はカウント
        if n % i == 0:
            cnt += 1
    return cnt

for i in range(1, n + 1):
    if count_up_divisor(i) == 8:
        have_8_divisors += 1

print(have_8_divisors)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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
else:
  for i in range(105,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: Wrong Answer

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: Wrong Answer

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: Wrong Answer

Solution code:
N = int(input())
# (a * b * c) or (d * d * d * e)
# (a, b, c) = (3, 5, 7) -> 105
# (a, b, c) = (3, 5, 11) -> 265 out
# (d, e) = (3, 5) -> 135
# (d, e) = (3, 7) -> 189
# (d, e) = (3, 11) -> 297 out
# (d, e) = (5, 3) -> 375 out
# therefore: 105, 135, 189

print(0) if N < 105 else print(1) if N < 135 else print(2) if N < 189 else print(3)

Submission status: Wrong Answer

Solution code:
n=input("n=")

s=0
yakusu=0



for i in range(1,int(n)+1):
    s=0
    if i%2!=0:
        for k in range(1,i+1):
            if i%k==0:
                s+=1    
    if s==8:
        yakusu+=1         

print(yakusu)

Submission status: Wrong Answer

Solution code:
n=input("n=")

s=0
yakusu=0



for i in range(1,int(n)+1):
    s=0
    if i%2!=0:
        for k in range(1,i):
            if i%k==0:
                s+=1    
    if s==8:
        yakusu+=1         

print(yakusu)

Submission status: Wrong Answer

Solution code:
import sys

def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

N = I()

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

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

Submission status: Wrong Answer

Solution code:
import sys

def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

N = I()

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

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

Submission status: Wrong Answer

Solution code:
import sys

def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

N = I()

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

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

Submission status: Wrong Answer

Solution code:
import sys

def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())

N = I()

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

ans = 0
for i in range(105,N+1):
    cnt = 0
    for q in range(1,int(N**0.5)+1):
        if i % q == 0:
            cnt += 1
    if cnt == 4:
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
def check(n):
  d=[]
  for i in range(1,int(n**0.5)+1,2):
    if n%i==0:
      d.append(i)
      if i!=n//i:
        d.append(n//i)
  if len(d)==8: return True
  else: return False

print(int(check(int(input()))))

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 0
for i in range(8, n+1):
    #8回割れるかどうか
    divisor_cnt = 0
    for j in range(1, n+1):
        if i % j == 0 and j % 2 == 1:
            divisor_cnt += 1
    if divisor_cnt == 8:
        print(i)
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
def main():
    N = int(input())
    ans = 1
    if N < 105:
        print(0)
    elif N == 105:
        print(1)
    else:
        for i in range(106, N+1):
            temp = 0
            for j in range(1, N+1):
                if i % j == 0:
                    temp += 1
            if temp == 8:
                ans += 1
        print(ans)
main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
ret = 0
for x in range(11, int(input()) + 1, 2):
    n = 2
    for y in range(2, x // 2 + 1):
        if x % y == 0:
            n += 1
    if n == 8:
        ret += 1
        print(x)
print(ret)