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 yakusu(m):
  cnt=1
  for i in range(1,(m//2)+1):
    if m%i==0:
      cnt+=1
  return cnt
ans=0
n=int(input())
for j in range(1,n+1):
  if yakusu(j)==8 and n%2!=0:
    ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

if N < 105:
    print(0)
else:
    ans = 1
    for i in range(107, N+1, 1):
        count = 0
        if i % 2 ==0:
            continue
        print(i)
        for j in range(3, i, 2):
            if i % j == 0:
                count += 1
            if count > 6:
                break
        if count == 6:
            ans += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

if N < 105:
    print(0)
else:
    ans = 1
    for i in range(107, N+1, 1):
        count = 0
        for j in range(3, i+1, 1):
            if i % j == 0:
                count += 1
            if count > 7:
                break
        if count == 7:
            ans += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

if N < 105:
    print(0)
else:
    ans = 1
    for i in range(107, N+2, 2):
        count = 0
        for j in range(3, i+2, 2):
            if i % j == 0:
                count += 1
            if count > 7:
                break
        if count == 7:
            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,N+1):
    if j // i == 0:
      cnt += 1

  if cnt == 8:
    ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

yakusuu8ko = [3*5*7, 3*5*11, 3**3*5, 3**3*7]
print(len([n for n in yakusuu8ko if n<=N]))

Submission status: Wrong Answer

Solution code:
N = int(input())

if N < 3*5*7:
  ans = 0
elif N < 3**3*5:
  ans = 1
elif N < 3*5*11:
  ans = 2
elif N < 3**3*7:
  ans = 3
else:
  ans = 4

print(ans)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import numpy as np
import math
n = int(raw_input())
count = 0
for i in range(101,n+2,2):
	cuenta = 0
	for j in range(1,int(math.floor(i**0.5)+1),2):
		if i == j ** 2:
			cuenta += 1
		elif i % j == 0:
			cuenta += 2

	if cuenta == 8:
		count += 1

print count

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())
if(N>=165):
  print(2)
elif(N>=105):
  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())
if N < 105:
    print(0)
elif N < 3*5*11:
    print(1)
elif N < 3*5*13:
    print(2)
else:
    print(3)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N < 105:
    print(0)
elif N < 3*5*11:
    print(1)
else:
    print(2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 1
k = 107
i = 1
count = 0
if n < 105:
    print(0)
else:
    while k <= n:
        while i <= k:
            if k % i == 0 :
                count += 1
            if count == 8:
                ans += 1
                break   
            i += 2
        i = 1
        k += 2
    print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 1
k = 106
i = 1
count = 0
if n < 105:
    print(0)
else:
    while k <= n:
        while i <= k:
            if k % i == 0 :
                count += 1
            if count == 8:
                ans += 1
                break   
            i += 1
        i = 1
        k += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 1
k = 106
i = 1
count = 0
if n < 105:
    print(0)
else:
    while k <= n:
        while i <= k:
            if n % i == 0 :
                count += 1
            if count == 8:
                ans += 1
                break   
            i += 1
        i = 1
        k += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 1
k = 106
i = 3
count = 0
if n < 105:
    print(0)
else:
    while k <= n:
        while i <= k:
            if n % i == 0 :
                count += 1
            if count == 8:
                ans += 1
                break   
            i += 1
        i = 1
        k += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 1
k = 106
i = 3
count = 0
if n < 105:
    print(0)
else:
    while k <= n:
        while i <= k:
            if n % i == 0 :
                count += 1
            if count == 8:
                ans += 1
                break   
            i += 1
        i = 3
        k += 1
    print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = 1
k = 106
i = 3
count = 0
if n < 105:
    print(0)
else:
    while k < n:
        while i < k:
            if n % i == 0 :
                count += 1
            if count == 8:
                ans += 1
                break   
            i += 1
        i = 3
        k += 1
    print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = 0
for j in range(1,N+1):
    temp = 0
    for i in range(j+1):
        if i==0:continue
        if N%i == 0:
            temp += 1
    # print(temp)
    if temp==8:
        ans += 1

print(ans)

Submission status: Wrong Answer

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



odd_list = [i for i in range(1, N+1) if i % 2 ==  1]


odd_list2 = [i for i in range(105, N+1) if i % 2 ==  1]

for j in odd_list2:
    c = 0
    for i in odd_list:
        if j % i == 0:
            c += 1
            if c == 8:
                ans += 1
                break

        
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
y_list = []
for i in range(1,N):
    if N%2 != 0:
        if N%i == 0:
            y_list.append(N/i)
if len(y_list)-6>0:
    print(len(y_list)-6)
else:
    print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def yakusu(n):
  a=[]
  for i in range(1,n+1):
    if n%i==0:a.append(i)
  return a
a=0;n=int(input())
for i in range(1,n+1):a+=(1if len(yakusu(i))==8else 0)
print(a)

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

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

list_yakusuu = []

cnt = 0
for i in range(1,N+1):
  list_yakusuu = []
  if i % 2 == 0:
    continue
    
  for j in range(1,i+1):
    if i % j == 0:
      list_yakusuu.append(j)
  
  if len(list_yakusuu) == 8:
    print(i)
    cnt += 1

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N=int(input())

n=0
m=0
for i in range(N):
    for j in range(N):
        if (i+1)%(j+1)==0:
            n+=1
    if n==8:
     m+=1
    n=0
    
print(m)

Submission status: Wrong Answer

Solution code:
N=int(input())

n=0
m=0
for i in range(N):
    for j in range(N):
        if (i+1)%(j+1)==0:
            n+=1
    if n==8:
     m+=1
    
print(m)

Submission status: Wrong Answer

Solution code:
N=int(input())

n=0
m=0
for i in range(N+1):
    for j in range(N):
        if i%(j+1)==0:
            n+=1
    if n==8:
     m+=1
    
print(m)

Submission status: Wrong Answer

Solution code:
#coding: utf-8
import collections
N = int(input())
inner = 1
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
count_dict = collections.Counter(factorize(N))
for i in count_dict.keys():
    inner *= (count_dict[i] + 1)
if N % 2 != 0 and inner == 8:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
#coding: utf-8
import collections
N = int(input())
inner = 2
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
count_dict = collections.Counter(factorize(N))
for i in count_dict.keys():
    inner += (count_dict[i] + 1)
if N % 2 != 0 and inner == 8:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
#coding: utf-8
import collections
N = int(input())
inner = 2
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
count_dict = collections.Counter(factorize(N))
print(count_dict)
for i in count_dict.keys():
    inner += (count_dict[i] + 1)
if N % 2 != 0 and inner == 8:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
#coding: utf-8
import collections
N = int(input())
inner = 2
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
count_dict = collections.Counter(factorize(N))
print(count_dict)
for i in count_dict.keys():
    inner += (count_dict[i] + 1)
if N % 2 == 0 and inner == 8:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
#coding: utf-8
import collections
N = int(input())
inner = 2
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
count_dict = collections.Counter(factorize(N))
print(count_dict)
for i in count_dict.keys():
    inner += (count_dict[i] + 1)
print(1 if inner == 8 else 0)

Submission status: Wrong Answer

Solution code:
#coding: utf-8
import collections
N = int(input())
inner = 2
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
count_dict = collections.Counter(factorize(N))
print(count_dict)
for i in count_dict.keys():
    inner += (count_dict[i] + 1)
print(inner)

Submission status: Wrong Answer

Solution code:
#coding: utf-8
import collections
N = int(input())
inner = 1
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
count_dict = collections.Counter(factorize(N))
for i in count_dict.keys():
    inner *= (count_dict[i] + 1) 
print(inner)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

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

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
if N>105:
    ans=1
    for i in range(106,N+1,2):
        g=0
        for j in range(1,i+1):
            if i%j==0:
                g+=1
        if g==8:
            ans+=1
    print(ans)
elif N==105:
    print(1)
else:
    print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

count = 0
divi_count = 0
for n in range(105, N+1, 2):
    for divi in range(1, n+1, 2):
        if n%divi == 0:
            divi_count += 1
    if divi_count == 8:
        count += 1
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())

if N%2 != 0:
    NN = N+1
if N%2 == 0:
    NN = N

count = 0
divi_count = 0
for n in range(105, NN, 2):
    for divi in range(1, n+1):
        if n%divi == 0:
            divi_count += 1
    if divi_count == 8:
        count += 1
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())

if N%2 != 0:
    NN = N+1
else:
    NN = N

count = 0
divi_count = 0
for n in range(105, NN, 2):
    for divi in range(1, n+1):
        if n%divi == 0:
            divi_count += 1
    if divi_count == 8:
        count += 1
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

count = 0
divi_count = 0
for n in range(105, N+1, 2):
    for divi in range(1, n+1):
        if n%divi == 0:
            divi_count += 1
    if divi_count == 8:
        count += 1
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())

count = 0
divi_count = 0
for n in range(1, N+1, 2):
    for divi in range(1, n+1):
        if n%divi == 0:
            divi_count += 1
    if divi_count == 8:
        count += 1
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())

count = 0
divi_count = 0
for n in range(105, N+1, 2):
    for divi in range(1, n+1):
        if n%divi == 0:
            divi_count += 1
    if divi_count == 8:
        count += 1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#ABC106 B
#まずnを素因数分解できないとならない
#1.エラトステネスのふるいで200以下の素数を全部列挙する
import math

def allprimes(N):
	primes = []
	for i in range(N):
		primes.append(i+1)
	i = 2
	while i <= math.sqrt(N):
		index = 0
		while True:
			index += 1
			if index == 1:
				continue
			else:
				if index * i <= N:
					#合成数をぜんぶ0に置換
					primes[index*i-1] = 0
				else:
					break
		i += 1
	return sorted(list(set(primes)))[2:]

#2.ある整数kが与えられたときにそれを素因数分解できるようになる

primes = allprimes(200)

def factor(k):
	#素数配列primeが存在することが前提
	nprimes = {}
	for prime in primes:
		nprimes[prime] = 0
	for prime in primes:
		if k < prime:
			break
		else:
			while True:
				if k % prime != 0:
					break
				else:
					k = int(k / prime)
					nprimes[prime] += 1
	return nprimes

#3.1以上N以下の整数を順次素因数分解して約数の個数をチェック
result = 0
for n in range(int(input())):
	if n+1 == 1 or (n+1) % 2 == 0:
		#nが1か偶数だったらスキップ
		continue
	#素数のべき乗の多い順番に列挙
	else:
		nps = sorted(factor(n+1).values())
		print(n+1,nps[:-5:-1],result)
		if nps[:-3:-1] == [7,0] or nps[:-4:-1] == [3,1,0] or nps[:-5:-1] == [1,1,1,0]:
			result += 1

print(result)

Submission status: Wrong Answer

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

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

print(len(ans))

Submission status: Wrong Answer

Solution code:
from math import sqrt


def divisors(n: int) -> list:
    sq = int(sqrt(n))
    l, m, r = [], [], []
    if sq * sq == n:
        m = [sq]
    else:
        sq += 1

    for i in range(1, sq):
        if n % i == 0:
            l.append(i)
            r = [n // i] + r

    return l + m + r


def one_hundred_and_five(N: int) -> int:
    count = 0
    for n in range(105, N + 1):
        if len(divisors(n)) == 8:
            count += 1
    return count


if __name__ == "__main__":
    N = int(input())
    ans = one_hundred_and_five(N)
    print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
 
c = 0
cnt =[0]*n
l = 0
 
for i in range(1,n+1,2):
	for j in range(1,n+1):
		if i % j == 0:
			c+=1	
            
	cnt[j-1] = c 
    
	if cnt[j-1] == 8:
		l += 1
	c = 0

print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def solve(string):
    n = int(string)
    return "0" if n < 105 else "1" if n < 135 else "2" if n < 165 else "3" if n < 189 else "4"


if __name__ == '__main__':
    print(solve(input()))

Submission status: Wrong Answer

Solution code:
def solve(string):
    n = int(string)
    return "0" if n < 105 else "1" if n < 135 else "2" if n < 165 else "3" if n < 198 else "5"


if __name__ == '__main__':
    print(solve(input()))

Submission status: Wrong Answer

Solution code:
def solve(string):
    n = int(string)
    return "0" if n < 105 else "1" if n < 135 else "2" if n < 165 else "3" if n < 198 else "4"


if __name__ == '__main__':
    print(solve(input()))

Submission status: Wrong Answer

Solution code:
def solve(string):
    n = int(string)
    return "0" if n < 105 else "1" if n < 135 else "2" if n < 198 else "3"


if __name__ == '__main__':
    print(solve(input()))

Submission status: Wrong Answer

Solution code:
def solve(string):
    n = int(string)
    return "0" if n < 105 else "1" if n < 198 else 2


if __name__ == '__main__':
    print(solve(input()))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
s = 0
for i in range(1,N,2):
  t = 0
  for j in range(1,i+1,2):
    if not i%j:
      t+=1
  if t==8:
    s+=1

print(s)

Submission status: Wrong Answer

Solution code:
N=int(input())
# 105 = 3 * 5 * 7
# 165 = 3 * 5 * 11
# 195 = 3 * 5 * 13
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())
result = 0
count = 0
for i in range(1,N+1,2):
  for j in range(1,i+1):
    if N % j == 0:
      result = result + 1
  if result == 8:
    count = count + 1
  result = 0
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
N=int(input())
def dnum(n):
  ret=0
  for i in range(1,int(math.sqrt(n))):
    if n%i==0:
      ret+=1
  return ret

ans=0

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
c=0
a=3
while a<=n:
    b=a*(a+2)*(a+4)
    if b<=n:
        c+=1
        a+=2
    else:
        break
    break
print(c)

Submission status: Wrong Answer

Solution code:
n=int(input())
c=0
a=3
while a<=n:
    b=a*(a+2)*(a+4)
    if b<=n:
        c+=1
        a+=2
    else:
        break
print(c)

Submission status: Wrong Answer

Solution code:
n=int(input())
c=0
a=3
while a<=n:
    b=a*(a+2)*(a+4)
    if b<=n:
        c+=1
        a+=1
    else:
        break
    break
print(c)

Submission status: Wrong Answer

Solution code:
n=int(input())
c=0
a=3
while a<=n:
    b=a*(a+2)*(a+4)
    if b<=n:
        c+=1
        a+=1
    else:
        break
print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=[s for s in range(int(input())+1)]
print(a.count(105)+a.count(165)+a.count(195))

Submission status: Wrong Answer

Solution code:
a=[s for s in range(int(input())+1)]
print(a.count(30)+a.count(105))

Submission status: Wrong Answer

Solution code:
print((105in (s for s in range(int(input())+1)))*1)

Submission status: Wrong Answer

Solution code:
N=int(input())

eight=[105, 135, 165, 195]

print(len(list(filter(lambda x:x<=N, eight))))

Submission status: Wrong Answer

Solution code:
N=int(input())

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

if N<135:
  print('1')
  exit()

if N<189:
  print('2')
  exit()
  
if N<195:
  print('3')
  exit()

print('4')

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())
k=1
for i in range(1,n//2+1):
  if n % i == 0:
    k+=1
print(1 if k == 8 else 0)

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:
def main() -> None:
    N = int(input())
    l = [v for v in range(105, N + 1) if v % 2 == 1]
    c = 0 if N != 105 else 1
    tmp = 0
    for i in l:
        for j in range(1, N, 2):
            if i % j == 0:
                tmp = tmp + 1
        if tmp == 8:
            c = c + 1
            tmp = 0
        else:
            tmp = 0
    print(c)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import itertools

n=int(input())

count=0

X=[3,5,7,11,13]

X=list(list(itertools.combinations(X,3)))

for i in range(10):
    if X[i][0]*X[i][1]*X[i][2]<=n:
        count+=1
        
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
if N < 105:
    print(0)
    exit()
elif N == 105:
    print(1)
    exit()
else:
    dP ={2,3,5,7}
    for i in range(10,int(200**0.5)+2):
        bF = True
        for j in dP:
            if 0 == i % j :
                bF = False
                break
        if bF:
            dP.add(i)
    aP = sorted(list(dP - {2}))
    iL = len(aP)
    aN = []
    for i in range(iL):
        for j in range(i+1,iL):
            for k in range(j+1,iL):
                aN.append(aP[i]*aP[j]*aP[k])
    aN.sort()
    for i in range(len(aN)):
        if N < aN[i]:
            print(i)
            exit()

Submission status: Wrong Answer

Solution code:

N = int(input())
if N < 105:
    print(0)
    exit()
elif N == 105:
    print(1)
    exit()
else:
    dP ={2,3,5,7}
    for i in range(10,int(200**0.5)+2):
        bF = True
        for j in dP:
            if 0 == i % j :
                bF = False
                break
        if bF:
            dP.add(i)
    aP = sorted(list(dP - {2}))
    iL = len(aP)
    aN = []
    for i in range(iL):
        for j in range(i+1,iL):
            for k in range(j+1,iL):
                aN.append(aP[i]*aP[j]*aP[k])
    aN.sort()
    for i in range(len(aN)):
        if N <= aN[i]:
            print(i)
            exit()

Submission status: Wrong Answer

Solution code:
class Solver(object):
    def __init__(self):
        self.n = int(input())
        self.primes = Solver.generate_primes(self.n)

    def solve(self):
        count = 0
        for i in range(2, self.n+1):
            if i % 2 != 0:
                factors = self.prime_factorize(i)
                if self.has_eight(factors):
                    # print(i, factors)
                    count += 1
        print(count)
    
    def has_eight(self, factors):
        return len(set(factors)) == 3

    def prime_factorize(self, n):
        factor = []
        for i in self.primes:
            if i > n:
                break
            if n % i == 0:
                factor.append(i)
                n = int(n/i)
                while n % i == 0:
                    factor.append(i)
                    n = int(n/i)
        return factor

    @staticmethod
    def generate_primes(length):
        """Generate prime from 1 to length, inclusive"""
        primes = []
        if length < 2:
            return primes
        numbers = range(2, length+1)  # 2 .. length
        i = numbers[0]
        while True:
            primes.append(i)
            new_numbers = []
            for j in numbers:
                if j % i != 0:
                    new_numbers.append(j)
            numbers = new_numbers
            if len(numbers) == 0:
                break
            i = numbers[0]
        return primes


if __name__ == "__main__":
    s = Solver()
    s.solve()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
count_yakusu=0
count_number=0
for i in range((N-105)//2+1):
  for j in range((i+105)//2+1):
    if((i+105) % (2*j+1)==0):
      count_yakusu+=1
    else:continue
  if(count_yakusu==8):
    count_number+=1
  else:continue
print(count_number)

Submission status: Wrong Answer

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