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

Submission status: Wrong Answer

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

    # divisors.sort()
    return divisors
ans=0
N=int(input())
if N<105:
    print(0)
    exit(0)
for i in range(105,N)[::2]:
    if len(make_divisors(i))==8:
        ans+=1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
p=[3,5,7,11,13]
x=[]
for i in range(5):
	for j in range(i):
		for k in range(j):
			if n >= p[i]*p[j]*p[k]:
				x.append(i*j*k)
cnt=len(x)
if  135 <= n <189:
	cnt += 1
elif   n  <= 189:
	cnt += 2
else:
	pass
print(cnt)

Submission status: Wrong Answer

Solution code:
n=int(input())
p=[3,5,7,11,13]
x=[]
for i in range(5):
	for j in range(i):
		for k in range(j):
			if n >= p[i]*p[j]*p[k]:
				x.append(i*j*k)
cnt=len(x)
if n >= 135:
	cnt += 1
elif 189 > n >= 135:
	cnt += 2
else:
	pass
print(cnt)

Submission status: Wrong Answer

Solution code:
n=int(input())
p=[3,5,7,11,13]
x=[]
for i in range(5):
	for j in range(i):
		for k in range(j):
			if n >= p[i]*p[j]*p[k]:
				x.append(i*j*k)
cnt=len(x)
if n >= 135:
	cnt += 1
else:
	pass
print(cnt)

Submission status: Wrong Answer

Solution code:
#A = list(map(int, input().split()))
N = int(input())
ans = 0
if N>=195:
    ans = 4
elif N>=165:
    ans = 3
elif N>=135:
    ans = 2
elif N>=105:
    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:
n = int(input())
l = []
for j in range(1,n+1):
    if j%2 != 0:
        l.append(j)
a = 0
b = 0
for i in l:
    if n%i == 0:
        a += 1
else:
    if a == 8:
        b += 1
print(b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

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:
#!/usr/bin/env python3
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
n = int(input())
a = [105,135,165,189,195]

if a[0] > n: print(0)
elif a[0] <= n < a[1]: print(1)
elif a[1] <= n < a[2]: print(2)
elif a[2] <= n < a[3]: print(3)
elif a[3] <= n < a[4]: print(4)
elif a[4] >= n: print(5)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
n = int(input())
a = [105,135,165,189,195]

if a[0] > n: print(0)
elif a[0] <= n < a[1]: print(1)
elif a[1] <= n < a[2]: print(2)
elif a[2] <= n < a[3]: print(3)
elif a[3] <= n < a[4]: print(4)
elif a[3] >= n: print(5)

Submission status: Wrong Answer

Solution code:
#!/usr/bin/env python3
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
n = int(input())
a = [105,135,165,195]

if a[0] > n: print(0)
elif a[0] <= n < a[1]: print(1)
elif a[1] <= n < a[2]: print(2)
elif a[2] <= n < a[3]: print(3)
elif a[3] >= n: print(4)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())

sys.setrecursionlimit(10 ** 9)


def main():
    N = INT()
    
    if N < 105: print(0)
    elif N < 165: print(1)
    elif N < 195: print(2)
    else: print(3)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())

sys.setrecursionlimit(10 ** 9)


def main():
    N = INT()
    
    if N < 105: print(0)
    elif N < 165: print(1)
    else: print(2)


if __name__ == '__main__':
    main()

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())
cnt = 0
for i in range(1, n+1):
    if i%2==0:
        continue
    elif sum(make_divisors(i))==8:
        cnt = cnt + 1
print(cnt)

Submission status: Wrong Answer

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

n = int(input())
cnt = 0
for i in range(1, n+1):
    if i%2==0:
        continue
    else:
        tmp = prime_factorize(i)
        if sum(tmp) == 8:
            cnt += 1
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())

divisor_cnt = 0
num = 0
# Nは奇数と言う制約があるため、約数は奇数×奇数の組み合わせ
for i in range(1, N+1, 2):
    for j in range(1, N+1, 2):
        if i * j == N:
            divisor_cnt += 1
            if divisor_cnt % 8 == 0:
                num += divisor_cnt // 8
print(num)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = 0

if N >= 105:
  ans += 1
if N >= 165:
  ans += 1
if N >= 195:
  ans += 1
  
print(ans)

Submission status: Wrong Answer

Solution code:
def prime_factorize(n):
  i = 2
  p_nums = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      p_nums.append(i)
    i += 1
  if n > 1:
    p_nums.append(n)
  return p_nums
  
N = int(input())

con = 0

for i in range(1,N + 1,2):
  
  L = prime_factorize(i)
  if len(set(L)) == 3:
    con += 1

    
print(con)

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
if N < 105 :
    print(0)
elif N >= 105 and N<135 :
    print(1)
elif N>= 135 and N<165 :
    print(2)
elif N>=165 and N<189 :
    print(3)
else :
    print(4)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
if N < 105 :
    print(0)
elif N >= 105 and N<128 :
    print(1)
elif N>= 128 and N<135 :
    print(2)
elif N>=135 and N< 189 :
    print(3)
else :
    print(4)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
if N < 105 :
    print(0)
elif N >= 105 and N<135 :
    print(1)
elif N>= 135 and N<189 :
    print(2)
else :
    print(3)

Submission status: Wrong Answer

Solution code:

n = int(input())
a = 1
status = 0
count = 0
l = []

for i in range(1,n):
    if i % 2 == 0:
        break
    else:
        for j in range(1,n):
            a = 1
            if j % a == 0:
                count += 1
                a += 1
            else:
                break

            if count == 8:
                l.append(1)

print(sum(l))

Submission status: Wrong Answer

Solution code:

n = int(input())
a = 1
status = 0
count = 0
l = []

for i in range(1,n):
    if i % 2 ==0:
        break
    else:
        for j in range(1,n):
            if j % a == 0:
                count += 1
            else:
                break

            if count == 8:
                l.append(1)

print(sum(l))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
 
import math
import itertools
import sys
import copy
 
# 入力
#A, B, C, D = map(int, input().split())
#L = list(map(int, input().split()))
#S = list(str(input()))
N = int(input())

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=0
if n>=105:
  ans+=1
if n>=135:
  ans+=1
if n>=165:
  ans+=1
if n>=195:
  ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
#N個以下
ans=0
if N<=104:
  ans=0
elif N==105:
  ans=1
else:#106から調べる
  ans=1
  for i in range(106,N+1):#その中のそれぞれの数値
    if i%2==0:
      continue
    cnt=0
    print(i)
    for j in range(1,i+1):
      if i%j==0:#素数の数を数える
        cnt+=1
        if cnt>8:
          break
    if cnt==8:
      ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
lst = [135, 189, 105, 165, 195]
tmp = 0

for i in range(5):
    if n<=lst[i]:
        tmp += 1

print(tmp)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
def make_divisors(n):
    divisors = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)
    return len(divisors)
cnt = 0
for i in range(1, N+1, 2):
    if make_divisors(i) == 5:
        cnt += 1
print(cnt)

Submission status: Wrong Answer

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


def solve(num):
        count = 0
        for i in range(1, int(math.sqrt(num)) + 1):
                if num % i == 0:
                        if (num // i) != i:
                                count += 2
                        else:
                                count += 1
        if count == 8:
                return 1
        else:
                return 0

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(cnt)

Submission status: Wrong Answer

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

cnt=0
for i in range(1,N+1):
    divsors = make_divisors(i)
    if i % 2 != 0 and len(divsors) == 8:
        cnt += 1

print(cnt)

Submission status: Wrong Answer

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

cnt=0
for i in range(N):
    divsors = make_divisors(i)
    if i % 2 != 0 and len(divsors) == 8:
        cnt += 1

print(cnt)

Submission status: Wrong Answer

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

cnt=0
for i in range(N):
    divsors = make_divisors(i)
    if len(divsors) == 8:
        cnt += 1

print(cnt)

Submission status: Wrong Answer

Solution code:
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)
    divisors.sort()
    return divisors
n=int(input())
ans=0
for i in range(2,n):
    num=divisor(i)
    if i%2==1 and len(num)==8:
        ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
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)
    divisors.sort()
    return divisors
n=int(input())
ans=0
for i in range(2,n):
    num=divisor(i)
    if len(num)==8:
        ans+=1
print(ans)

Submission status: Wrong Answer

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

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

else:
    print(1)

Submission status: Wrong Answer

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

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

else:
    print(1)

Submission status: Wrong Answer

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

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

else:
    print(1)

Submission status: Wrong Answer

Solution code:
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())
if n<104:
  print(0)
elif n<135:
  print(1)
elif n<165:
  print(2)
elif n<189:
  print(3)
elif n<195:
  print(4)
else:
  print(5)

Submission status: Wrong Answer

Solution code:
n=int(input())
if n<104:
  print(0)
if n<135:
  print(1)
if n<165:
  print(2)
if n<189:
  print(3)
if n<195:
  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())
ans=0
count=0
for i in range(n+1): 
  for j in range(1,i+1):    
    if n%i==0:
      ans+=1
  if ans==8 and j%2==1:
    count+=1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

if N < 105:
    print(0)
else:
    res = 1
    for i in range(106, N+1):
        if i % 2 == 1:
            continue
        else:
            sum = 0
            for j in range(1,i+1):
                if (i % j) == 0:
                    sum += 1

        if sum == 8:
            res += 1
    print(res)

Submission status: Wrong Answer

Solution code:
n = int(input())

#Nを素因数分解してリストに入れ、その組み合わせの総数が答え(順番を考えない)

"""素因数分解"""
def factrize(n):
    b = 2
    fct = []
    while b*b <= n:
        while n % b == 0:
            n //= b
            #もし素因数を重複させたくないならここを加えてfct.append(b)を消す
            if not b in fct:
                fct.append(b)
        b = b+1
    if n > 1:
        fct.append(n)
    return fct #リストが帰る

list1 = factrize(n)

ans = 0
for i in range(1,n+1,2):
    list1 = factrize(i)
    if len(list1) == 3:
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=0
a=0
for i in range(n):
    for j in range(n-i):
        if j !=0:
            if (n-i) % j == 0 :
                a += 1
    if a == 8:
        ans += 1
        break
    a = 0
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<165:
  print(2)
else:
  print(3)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

l = []

for i in range(5):
	for j in range(5):
		k = 3*(i*2+5)*(j*2+7)
		if k <= n:
			l.append(k)
			#print(3,i*2+5,j*2+7,k)

l =sorted(set(l))

print(len(l))

Submission status: Wrong Answer

Solution code:
N=int(input())
c8=0 # 約数が8個の奇数の数

# 各奇数について
for n in range((N-1)//2+1):
    c=0 # 約数の数

    for i in range(1,n+1): # 各数について、割り切れるかどうかを判定してゆく
        c+=int(n%i==0)

    if c==8: # 約数が8個なら
        c8+=1

print(c8)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

ans = 0

for val in range(n):
    if len(factorization(val)) == 8:
        ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
A = int(input())
k = 1
if A < 105:
  print(0)
elif A == 105 and A == 106:
  print(1)
else:
  for a in range(107,A+3,2):
    count = 0
    for i in range(1,A//2+3,2):
      if a % i == 0:
        count = count + 1
      elif count == 7 and A//2 <= i:
        k = 1+k
  print(k)

Submission status: Wrong Answer

Solution code:
A = int(input())
k = 1
if A < 105:
  print(0)
elif A == 105 or A == 106:
  print(1)
else:
  for a in range(107,A+3,2):
    count = 0
    for i in range(1,A+3,2):
      if a % i == 0:
        count = count + 1
      elif count == 8 and A == i:
        k = 1+k
  print(k)

Submission status: Wrong Answer

Solution code:
A = int(input())
k = 1
if A < 105:
  print(0)
elif A == 105 and A == 106:
  print(1)
else:
  for a in range(107,A+3,2):
    count = 0
    for i in range(1,A+3,2):
      if a % i == 0:
        count = count + 1
      elif count == 8 and A == i:
        k = 1+k
  print(k)

Submission status: Wrong Answer

Solution code:
A = int(input())
k = 1
if A < 105:
  print(0)
elif A == 105 and A == 106:
  print(1)
else:
  for a in range(107,A+3,2):
    count = 0
    for i in range(1,A+3,2):
      if a % i == 0:
        count = count + 1
      elif count == 8 and A == i:
        print(a)
        k = 1+k
  print(k)

Submission status: Wrong Answer

Solution code:
A = int(input())
k = 1
if A < 105:
  print(0)
elif A == 105 and A == 106:
  print(1)
else:
  for a in range(107,A+1,2):
    count = 0
    for i in range(1,A+1,2):
      if a % i == 0:
        count = count + 1
      elif count == 8 and A-1 <= i:
        print(a)
  print(k)

Submission status: Wrong Answer

Solution code:
A = int(input())
k = 1
if A < 105:
  print(0)
elif A == 105 and A == 106:
  print(1)
else:
  for a in range(107,A+1,2):
    count = 0
    for i in range(1,A+1,2):
      if a % i == 0:
        count = count + 1
      elif count == 8 and A-1 <= i:
        k = 1+k
  print(k)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
for i in range(1, N + 1, 2):
    res = 0
    for j in range(1, i):
        # if i < j * j:
        #     break
        if i % j == 0:
            if j != i / j:
                res += 2
            else:
                res += 1
    if res == 8:
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
l = [105, 135, 165, 195]
ans = 0
if N >= 105:
  for i in range(4):
    if l[i] <= N:
      ans += 1
    else:
      break

print(ans)

Submission status: Wrong Answer

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

  divisors.sort()
  return divisors
if N % 2 != 0 and len(make_divisors(N)) % 8 == 0:
  print(len(make_divisors(N)) // 8)
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<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())

ans = 0
for num in range(1, N + 1):
  count = 0
  if not num % 2:
    continue
  
  for i in range(1, N + 1):
    if not num % i:
      count += 1
    if count == 8:
      ans += 1
      continue
      
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = 0
for num in range(1, N + 1):
  count = 0
  if not num % 2:
    continue
  
  for i in range(1, N + 1):
    if not num % i:
      count += 1
    if count >= 8:
      ans += 1
      continue
      
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
m=int(n**0.5)+1
con_num=0
for i in range(1,m):
  if n%i==0:
    con_num+=1
    if i!=n//i:
      con_num+=1
if con_num==8 and n%2==1:
  print("1")
else:
  print("0")

Submission status: Wrong Answer

Solution code:
N = int(input())

def prime_factorize(n):
  i = 2
  p_nums = []
  while i * i <= n:
    while n % i == 0:
      n =  int(n / i)
      p_nums.append(i)
    i += 1
  if n > 1:
    p_nums.append(n)
  return p_nums

eights = []
nums = []

for i in range(105,200,2):
  p = prime_factorize(i)
  if len(p) == 3:
    eights.append(p)
    nums.append(i)
    
print(len([i for i in nums if i <= N]))

Submission status: Wrong Answer

Solution code:
N = int(input())

def prime_factorize(n):
  i = 2
  p_nums = []
  while i * i <= n:
    while n % i == 0:
      n =  int(n / i)
      p_nums.append(i)
    i += 1
  if n > 1:
    p_nums.append(n)
  return p_nums

eights = []
nums = []

for i in range(105,200,2):
  p = prime_factorize(i)
  if len(p) == 3:
    eights.append(p)
    nums.append(i)
    
print(len([i for i in nums if i < N]))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# ABC 106: B – 105
import itertools

n = int(input())

odd_primes = [3, 5, 7, 11, 13, 17, 19, 23]
the_number = 0

for comb in list(itertools.combinations(odd_primes, 3)):
    if comb[0] * comb[1] * comb[2] <= n:
        the_number += 1

print(the_number)

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

Submission status: Wrong Answer

Solution code:
# B - 105
N = int(input())

ans = 0
if N < 105:
    print(0)
    exit()
else:
    for i in range(1,N+2,2):
        count = 0
        for j in range(1, i+1):
            if i % j == 0:
                count += 1
            else:
                pass
        if count == 8:
            ans += 1
        else:
            pass

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())


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


counter = 0
for num in range(N):
    if yakusuu(num) == 8:
        counter += 1

print(counter)

Submission status: Wrong Answer

Solution code:
N = int(input())


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


for num in range(N):
    counter = 0
    if yakusuu(num) == 8:
        print(counter)

print(counter)

Submission status: Wrong Answer

Solution code:
def main(n):
    ans = 0

    if n % 2 == 0:
        print(ans)
        return

    numbers = set()

    for i in range(1, n + 1):

        if n % i == 0:
            numbers.add(i)

    if len(numbers) == 8:
        ans += 1

    print(ans)


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

    main(n)

Submission status: Wrong Answer

Solution code:

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

n = int(input())
ans = 0
for i in range(1,n+1):
  if countDiv(i) == 8:
    ans += 1

print(ans)

Submission status: Wrong Answer

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

    if len(divisors) == 8:
        return True
    else:
        return False


n = int(input())

if n < 105:
    print(0)
else:
    cnt = 0
    for i in (105, n+1, 2):
        if check(i):
            cnt += 1
    print(cnt)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
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:
    ans = 0
else:
    ans = 1
print(ans)

Submission status: Wrong Answer

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

    if len(divisors) == 8:
        return True
    else:
        return False


n = int(input())

if n < 105:
    print(0)
else:
    cnt = 0
    for i in (105, n+1):
        if check(i):
            cnt += 1
    print(cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())

if n >= 189:
  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 >= 189:
  print(2)
elif n>=135:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

#1以上N以下の奇数のうち, 正の約数をちょうど8個持つようなものの個数を求めよ.
#素因数のペアとして、357,3511,3513の3通りのみ
#105,165,195

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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