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<125:
  print(1)
elif n<135:
  print(2)
elif n<165:
  print(3)
else:
  print(4)

Submission status: Wrong Answer

Solution code:
N=int(input(""))
T=0
for i in range(N):
    if N%(i+1)==0:
        if i%2==0:
            T=T+1
        else:
            T=T
    else:
        T=T
print(T)

Submission status: Wrong Answer

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

print(answer)

Submission status: Wrong Answer

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

print(answer)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]
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());print((N>=195)+(N>=165)+(N>=105))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
if 104<n<135:
  print(1)
elif 134<n<165:
  print(2)
elif 164<n<189:
  print(3)
elif 188<n<195:
  print(4)
else:
  print(5)

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(1,i+1):
        if n % j == 0:
            count += 1
    if count == 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)
 
    return divisors


n = int(input())
ans = 0
if n < 105:
    print(0)
else:
    for i in [i for i in range(105,n+1) if i %2 ==1]:
        m = make_divisors(i)
        if len(m) == 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)
 
    return divisors


n = int(input())
ans = 0
if n < 105:
    print(0)
else:
    for i in range(105,n+2,2):
        m = make_divisors(i)
        if len(m) == 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)
 
    return divisors


n = int(input())
ans = 0
if n < 105:
    print(0)
else:
    for i in range(105,n+1,2):
        m = make_divisors(i)
        if len(m) == 8:
            ans += 1

print(ans)

Submission status: Wrong Answer

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


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

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


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
n = int(input())

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

    if len(cnt) == 6:
        ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
import math

n = int(input())

ans = 0
for i in range(1, n+1, 2):
    v = i
    cnt = set()
    for j in range(2, int(math.sqrt(n))):
        while v % j == 0:
            cnt.add(j)
            v /= j
    if len(cnt) == 3:
        ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
ans=0
L=[105,165,195]
for l in L:
    if n>=l:
        ans+=1
    else:
        break
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, i+1):
        if j % 2 == 0 and i % j == 0:
            cnt += 1
            if cnt == 8:
                ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
cnt = 0
d = []
for i in range(1,n+1):
    if n%i ==0:
        cnt+=1
    d .append(cnt)
print(d.count(8))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
# 3*5*7, 3*5*11, 3*5*13
if n < 3*5*7:
    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:
import math
N = int(input())
cnt = 0
for j in range(1, N+1, 2):
    ans = []
    for i in range(1, math.ceil(j**0.5)+1):
        if j%i == 0:
            if j//i == i:
                ans.append(i)
            else:
                ans.append(i)
                ans.append(j//i)
    if len(ans) == 8:
        cnt += 1
    print(ans)
    ans = []
print(cnt)

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:
num = int(input())

import math

def find_factors (n): 
    limit = int(math.sqrt(n)+1)
    count = 0
    list=[]
    for i in range (1,limit):
        if n % i ==0:
            list.append(i)
            list.append (int(n/i))
            count = len(list)
    return count

if num >105:
    ccount = 1
    temp = 107
    while temp <= num:
        if find_factors(temp)==8:
            ccount +=1
            print (temp)
        temp+=2
    print (ccount)
elif num ==105:
    print ("1")
elif num < 105:
    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)
elif n <= 195:
  print(2)

Submission status: Wrong Answer

Solution code:
anslist=(3*5*7,
         3*5*11,
         3*5*13,
        3*5**3,5*3**3,7*3**3)

n=int(input())
cnt=0
for i in range(1,n,2):
  if i in anslist:
    cnt+=1
    
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
a = int(N/27)
if a>=7:
  print(2+1)
  exit()
elif a>=5:
  print(1+1)
  exit()
elif 105<=N:
  print(1)
  exit()
print(0)

Submission status: Wrong Answer

Solution code:
N = int(input())
a = int(N/27)
if a>=7:
  print(2+1)
elif a>=5:
  print(1+1)
elif 105<=N:
  print(1)

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:
iog = [105, 135, 165, 189, 195]

n = int(input())
iog.append(n)
iog.sort()
print(iog.index(n))

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())
s=0
for i in range(1,n+1):
    for j in range(1,i+1):
        a=0
        if i%j==0:
            a+=1
    if a==8:
        s+=1
print(s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import sqrt, ceil

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

Submission status: Wrong Answer

Solution code:
n = int(input())
count = 0

for i in range(1, n):
  if i % 2 == 1:
    divisors_count = 0
    for a in range(1, i):
      if i % a == 0:
        divisors_count += 1
    if divisors_count == 8:
      count += 1

print(count)

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:
# ABC106b
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

n = int(input())

ans = 0

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

Submission status: Wrong Answer

Solution code:
n=int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
if n >= 195:
 print(3)
if n >= 165:
 print(2)
if n >= 105:
 print(1)
if n > 104:
 print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import collections

n = int(input())


def eratosthenes(n):
    sieve = [True for _ in range(n + 1)]
    sieve[0] = False
    sieve[1] = False

    def _update(p):
        if sieve[p]:
            for i in range(p * 2, n + 1, p):
                sieve[i] = False

    _update(2)
    p = 3
    while p * p <= n:
        _update(p)
        p += 2
    return sieve


sieve = eratosthenes(n)

res = 0
for k in range(1, n + 1, 2):
    counter = collections.Counter()
    for i in range(1, n + 1):
        if sieve[i]:
            while n % i == 0:
                counter[i] += 1
                n //= i
    p = 1
    for v in counter.values():
        p *= v + 1
    if p == 8:
        res += 1

print(res)

Submission status: Wrong Answer

Solution code:
import collections

n = int(input())


def eratosthenes(n):
    sieve = [True for _ in range(n + 1)]
    sieve[0] = False
    sieve[1] = False

    def _update(p):
        if sieve[p]:
            for i in range(p * 2, n + 1, p):
                sieve[i] = False

    _update(2)
    p = 3
    while p * p <= n:
        _update(p)
        p += 2
    return sieve


sieve = eratosthenes(n)

res = 0
for k in range(1, n + 1):
    counter = collections.Counter()
    for i in range(1, n + 1):
        if sieve[i]:
            while n % i == 0:
                counter[i] += 1
                n //= i
    p = 1
    for v in counter.values():
        p *= v + 1
    if p == 8:
        res += 1

print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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:
#ABC106B
n = int(input())
ans = 0
for i in range(1,n+2,2):
    tmp = 0
    for j in range(1,i+1):
        if i%j == 0:
            tmp += 1
    if tmp == 8:
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
print(5 if n>194 else 4 if n>188 else 3 if n>164 else 2 if n>133 else 1 if n>104 else 0)

Submission status: Wrong Answer

Solution code:
l = [ 3**7, 3*3*3*5, 3*5*7, 3*5*11, 3*5*13, 3*5*17, 3*7*11, ]
N = int(input())
r = len(list(filter(lambda i: i <= N, l)))
print(r)

Submission status: Wrong Answer

Solution code:
n=int(input())
print(3 if n>188 else 2 if n>134 else 1 if n>104 else 0)

Submission status: Wrong Answer

Solution code:
N=int(input())

x=0
for i in range(1,N+1,2):
    y=0
    for j in range(i//2):
        if i % (j+1) == 0:
            y+=1
    if y+1 == 8:
        x+=1
    print(i,y+1)

Submission status: Wrong Answer

Solution code:
N=int(input())

x=0
for i in range(N//2):
    if N % (i+1) == 0:
        x += 1

print(1 if x+1 == 8 else 0)

Submission status: Wrong Answer

Solution code:
def num_divisors(n):
  res = 0
  i = 2
  while i * i <= n:
    if n % i == 0:
      res += 1
      res += 1 if i * i != n else 0
    i += 1
  return res


N = int(input())
res = 0
for n in range(1, N + 1):
  if num_divisors(n) == 8:
    res += 1
print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print(ans)

Submission status: Wrong Answer

Solution code:
import sys
stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

n = ni()
c = 0
for num in range(3, n+1, 2):
    d = 0
    for i in range(1, int((num)**0.5)):
        if num % i == 0:
            d += 2
    if num % int((num)**0.5) == 0:
        d += 1
    
    if d == 8:
        c += 1
print(c)

Submission status: Wrong Answer

Solution code:
N= int(input())
print(3 if N >194 else 2 if N > 164 else 1 if N > 104 else 0)

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())
L=[2,3,5,7,11,13,17,19,23,29,31,37]
c=0
for i in range(1,n+1,2):
    d=0
    for l in L:
        if i%l==0:
            d+=1
    if d==3:
        c+=1
print(c)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


if __name__ == "__main__":
    test()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def main():
    N = int(input())
    if N < 105: return 0
    else: return 1

if __name__ == '__main__':
    print(main())

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
n=int(input())
import fractions

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#200以下で約数が8つの自然数は24, 30, 40, 42, 54, 56, 66, 70, 78, 88, 102, 104, 105, 110, 114, 128, 130, 135, 136, 138, 152, 154, 165, 170, 174, 182, 184, 186, 189, 190, 195
#うち奇数であるものは105,135,189,195
n = int(input())

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

Submission status: Wrong Answer

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

if ans > 0:
    print(ans)
else:
    print(0)

Submission status: Wrong Answer

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

if k == 8:
    print(k)
else:
    print(0)

Submission status: Wrong Answer

Solution code:
N = int(input())

count = 1
for N in range(106,200):
    for s in range(1,N):
        if N % 2 != 0 and N % s == 0:
            count += 1
        if count == 8:
            print(N)

Submission status: Wrong Answer

Solution code:
def div(n):
  d=0
  for i in range(1, n+1):
    if n%i==0:
      d+=1
  return d

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#約数8個なので、8、2*4、2*2*2
#8の場合、最小の奇数は3^7で200より大きい
#2*4の場合、最小の奇数は3^3*5^1、次は3^3*7^1、それより大きい場合は200より大きくなる
#2*2*2の場合、最小の奇数は3^1*5^1*7^1、3^1*5^1*11^1,3^1*5^1*13^1それより大きい場合は200より大きくなる

n=int(input())

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

Submission status: Wrong Answer

Solution code:
import math
import copy
import sys

inputa = input().split()
# inputb = input().split()
# inputc = input().split()

a = int(inputa[0])
# b = int(inputa[1])
# c = int(inputa[2])

# x = int(inputb[0])
# y = int(inputb[1])

# inputaList = [int(n) for n in inputa]

# inputb = input().split()
# inputbList = [int(n) for n in inputb]
#
# inputList = []
# inputNumList = []
# for i in range(a):
#     inputNum = input()
#     inputNumList = list(inputNum)
#     inputList.append(inputNumList)

# inputList = [int(n) for n in inputList]

# b = [int(n) for n in inputb]
# c = [int(n) for n in inputc]

anscnt = 0
for i in range(1, a+2, 2):
    cnt = 0

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

    if cnt == 8:
        anscnt += 1

print(int(anscnt))

Submission status: Wrong Answer

Solution code:
import math
import copy
import sys

inputa = input().split()
# inputb = input().split()
# inputc = input().split()

a = int(inputa[0])
# b = int(inputa[1])
# c = int(inputa[2])

# x = int(inputb[0])
# y = int(inputb[1])

# inputaList = [int(n) for n in inputa]

# inputb = input().split()
# inputbList = [int(n) for n in inputb]
#
# inputList = []
# inputNumList = []
# for i in range(a):
#     inputNum = input()
#     inputNumList = list(inputNum)
#     inputList.append(inputNumList)

# inputList = [int(n) for n in inputList]

# b = [int(n) for n in inputb]
# c = [int(n) for n in inputc]

anscnt = 0
for i in range(1, a+2):
    cnt = 0

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

    if cnt == 8:
        anscnt += 1

print(anscnt)

Submission status: Wrong Answer

Solution code:
import math
import copy
import sys

inputa = input().split()
# inputb = input().split()
# inputc = input().split()

a = int(inputa[0])
# b = int(inputa[1])
# c = int(inputa[2])

# x = int(inputb[0])
# y = int(inputb[1])

# inputaList = [int(n) for n in inputa]

# inputb = input().split()
# inputbList = [int(n) for n in inputb]
#
# inputList = []
# inputNumList = []
# for i in range(a):
#     inputNum = input()
#     inputNumList = list(inputNum)
#     inputList.append(inputNumList)

# inputList = [int(n) for n in inputList]

# b = [int(n) for n in inputb]
# c = [int(n) for n in inputc]

anscnt = 0
for i in range(1, a+2, 2):
    cnt = 0

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

    if cnt == 8:
        anscnt += 1

print(anscnt)

Submission status: Wrong Answer

Solution code:
import math
import copy
import sys

inputa = input().split()
# inputb = input().split()
# inputc = input().split()

a = int(inputa[0])
# b = int(inputa[1])
# c = int(inputa[2])

# x = int(inputb[0])
# y = int(inputb[1])

# inputaList = [int(n) for n in inputa]

# inputb = input().split()
# inputbList = [int(n) for n in inputb]
#
# inputList = []
# inputNumList = []
# for i in range(a):
#     inputNum = input()
#     inputNumList = list(inputNum)
#     inputList.append(inputNumList)

# inputList = [int(n) for n in inputList]

# b = [int(n) for n in inputb]
# c = [int(n) for n in inputc]

anscnt = 0
for i in range(1, a+2, 2):
    cnt = 0


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

    if cnt == 8:
        anscnt += 1

print(anscnt)

Submission status: Wrong Answer

Solution code:
N = int(input())

count = 0

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

Submission status: Wrong Answer

Solution code:
n = int(input())
count = 0
for i in range(1, n+1):
    if i%3 ==0 and i%5 == 0 and i%7 ==0:
        count+=1
    
    elif i%27==0 and i%5==0:
        count+=1
    
    elif i%27==0 and i%7 ==0:
        count+=1

print(count)

Submission status: Wrong Answer

Solution code:
n = int(input())
count = 0
if n%3 ==0 and n%5 == 0 and n%7 ==0:
    count+=1
elif n%27==0 and n%5==0:
    count+= 1
elif n%27==0 and n%7 ==0:
    count+=1
print(count)

Submission status: Wrong Answer

Solution code:
N=int(input())
odds = [i*2+1 for i in range(100)]
cnt=0
for odd in odds:
  if odd==105: print(odd)
  if odd>N:
    break
  temp_cnt=0
  for lil_odd in odds:
    if odd==105: print("lil_odd :",lil_odd)
    if lil_odd>odd:
      if temp_cnt==8:
        cnt+=1
      break
    if odd%lil_odd==0:
      if odd==105: print("True")
      temp_cnt+=1
  if odd==105: print("temp_cnt :",temp_cnt)
print(cnt)

Submission status: Wrong Answer

Solution code:
#200以下で約数が8つの自然数は105,135とのみ
n = int(input())

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

# n = 200

# l = [int(i) for i in range(1,n+1) if i%2 == 1]

# for i in range(98):
#     if l[i]*l[i+1]*l[i+2] <= 200:
#         print('xyz',l[i]*l[i+1]*l[i+2])

# for i in range(99):
#     if (l[i]**3)*l[i+1] <= 200:
#         print('xxxy',(l[i]**3)*l[i+1])

# for i in range(99):
#     if (l[i+1]**3)*l[i] <= 200:
#         print('xyyy',(l[i+1]**3)*l[i])

Submission status: Wrong Answer

Solution code:
N = int(input())
M = [105,135,165,195]
T = 0
for i in range(4):
  if N >= M[i]:
    T += 1
print(T)

Submission status: Wrong Answer

Solution code:
N = int(input())
M = [105,125,165,195]
T = 0
for i in range(4):
  if N >= M[i]:
    T += 1
print(T)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
ans = [105,135,165,189]
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())
a=0

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

Submission status: Wrong Answer

Solution code:
n = int(input())
a = [105, 135, 165, 195]
count = 0
for i in a:
  if 1 <= i <= n:
    count += 1
print(count)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
if 1<=n<=104:
    print(0)
elif n<134:
    print(1)
elif n<164:
    print(2)
elif n<188:
    print(3)
elif n<194:
    print(4)
else:print(5)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
cnt=0
if N <105:
  cnt =0
else:
  if N%2==0:
    for i in range(105,N,2):
      temp=0
      for j in range(3,N,2):
        if i%j==0:
          temp+=1
      if temp==8:
        cnt+=1
  else:
    for i in range(105,N+1,2):
      temp=0
      for j in range(1,N+3,2):
        if i%j==0:
          temp+=1
      if temp==8:
        cnt+=1

print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
cnt=0
if N <105:
  cnt=0
else:
  if N%2==0:
    for i in range(105,N,2):
      temp=0
      for j in range(3,15,2):
        if i%j==0:
          temp+=1
      if temp==3:
        cnt+=1
  else:
    for i in range(105,N+1,2):
      temp=0
      for j in range(3,15,2):
        if i%j==0:
          temp+=1
      if temp==3:
        cnt+=1
 
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
cnt=0
if N <105:
  print(0)
else:
  if N%2==0:
    for i in range(105,N,2):
      temp=0
      for j in range(3,15,2):
        if i%j==0:
          temp+=1
      if temp==3:
        cnt+=1
  else:
    for i in range(105,N+1,2):
      temp=0
      for j in range(3,15,2):
        if i%j==0:
          temp+=1
      if temp==3:
        cnt+=1

print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
cnt=0
if N <105:
  print(0)
else:
  for i in range(105,N,2):
    temp=0
    for j in range(3,15,2):
        if i%j==0:
            temp+=1
    if temp==3:
        cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
cnt=1
if N <105:
  print(0)
else:
  for i in range(107,N,2):
    temp=0
    for j in range(3,15,2):
        if i%j==0:
            temp+=1
    if temp==3:
        cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())
cnt=0
if N <105:
  print(0)
else:
  for i in range(107,N,2):
    temp=0
    for j in range(3,15,2):
        if i%j==0:
            temp+=1
    if temp==3:
        cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
N =int(input())
cnt =1
temp = 0
if N <105:
  print(0)
else:
  if N%2 ==0:
    n = N+1
    for i in range(107,n,2):
      temp=0
      for j in range(3,15,2):
        if i%j==0:
          temp+=1
      if temp==3:
        cnt+=1
  else:
    n = N+2 
    for i in range(107,n,2):
      temp=0
      for j in range(3,15,2):
        if i%j==0:
          temp+=1
      if temp==3:
        cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
N =int(input())
cnt =1
temp = 0
if N <105:
  print(0)
else:
  if N%2 ==0:
    n = N-1
    for i in range(107,N,2):
      for j in range(3,15,2):
        if i%j==0:
          temp+=1
      if temp==4:
        cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
N =int(input())
cnt =1
temp = 0
if N <105:
  print(0)
else:
  if N%2 ==0:
    n = N-1
    for i in range(107,N,2):
      for j in range(3,14,2):
        if i%j==0:
          temp+=1
      if temp==4:
        cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
N =int(input())
cnt =0
temp = 0
if N <105:
  print(0)
else:
  if N%2 ==0:
    n = N-1
    for i in range(107,N,2):
      for j in range(3,14,2):
        if i%j==0:
          temp+=1
      if temp==4:
        cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
def numf(a):
  c = 0
  for i in range(1, a+1):
    c += (a % i == 0)
  return c
 
n = int(input())
 
c = 0
for i in range(2, n+1, 2):
  c += (numf(i) == 8)
print(c)

Submission status: Wrong Answer

Solution code:
def numf(a):
  c = 0
  for i in range(1, a+1):
    c += (a % i == 0)
  return c

n = int(input())

c = 0
for i in range(1, n+1):
  c += (numf(i) == 8)
print(c)