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

Submission status: Wrong Answer

Solution code:

n = int(input())
ans = 0
for i in range(1,n+1,2):
    sm = sum(n % i == 0 for i in range(1,i+1))
    if sm == 8:
        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):
    temp=0
    for j in range(1,math.floor(math.sqrt(i))):
        if i%j==0:
            temp+=2
    if temp==8:
        ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

dp = [0] * 201
ans = 0

for i in range(1, n + 1):
    for j in range(105, n + 1):
        if j % i == 0:
            dp[j] += 1

for i in range(105, n + 1, 2):
    if dp[i] >= 8:
        print(i)
        ans += 1

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
from itertools import combinations
import math


def I(): return int(sys.stdin.readline().rstrip())


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


def S(): return sys.stdin.readline().rstrip()


def LS(): return list(sys.stdin.readline().rstrip().split())


N = I()
ans = 0
if N >= 105:
    for i in range(105, N+1, 2):
        yakusu = 0
        for q in range(1, N+1):
            if N % q == 0:
                yakusu += 1
        if yakusu == 8:
            ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())

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

Submission status: Wrong Answer

Solution code:
n=int(input())

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def solve(N):
    allcount=0
    if N<105:
        return allcount
    for i in range(105,N+1):
        count=0
        for j in range(1,i+1):
            if i%j==0:
                count += 1
        if count==8:
            allcount += 1
    return allcount


N=int(input())
print(solve(N))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def divsor(num):
  count=0
  for i in range(1,num+1):
    if num%i==0:
      count+=1
  return count
 
n=int(input())
 
if(n<=105):
  if(n==105):
    print(1)
  elif(n<105):
    print(0)
    exit()

res=1

for i in range(106,n+1):
  if(divsor(i)==8 and i%2==1):
    res+=1
  print(res)

Submission status: Wrong Answer

Solution code:
def divsor(num):
  count=0
  for i in range(1,num+1):
    if num%i==0:
      count+=1
  return count

n=int(input())

if(n<=105):
  if(n==105):
    print(1)
  elif(n<105):
    print(0)
res=1
for i in range(106,n+1):
  if(divsor(i)==8 and i%2==1):
    res+=1
  print(res)

Submission status: Wrong Answer

Solution code:
n=int(input())
res=0
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:
    res+=1
print(res)

Submission status: Wrong Answer

Solution code:
n=int(input())

count=0
ans=0
if n<=104:
    print('0')
else:
    for i in range(105,n+1):
        count=0
        for e in range(1,n+1):
            if i%2==0:
                break
            elif i%e==0:
                count+=1
        if count==8:
            ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())

count=0
ans=0
if n<=104:
    print('0')
else:
    for i in range(105,n+1):
        count=0
        for e in range(1,n+1):
            if i%2==0:
                continue
            elif i%e==0:
                count+=1
        if count==8:
            ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

def main():
    n = int(input())
    ans = 0
    for m in range(1, n + 1):
        if m % 2 == 0: continue
        factor = 0
        for j in range(1, int(m ** 0.5)):
            if m % j == 0: factor += 2
        if int(round(m ** 0.5)) ** 2 == m: factor += 1
        if factor == 8: ans += 1
        #print("factor[{}]={}".format(m, factor))
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

def main():
    n = int(input())
    ans = 0
    for i in range(n // 2 + 1):
        m = 2 * i + 1
        if m > n: break
        factor = 0
        for j in range(1, int(m ** 0.5)):
            if m % j == 0: factor += 2
        if int(round(m ** 0.5)) ** 2 == m: factor += 1
        if factor == 8: ans += 1
        #print("factor[{}]={}".format(m, factor))
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

def main():
    n = int(input())
    ans = 0
    for i in range(n // 2 + 1):
        m = 2 * i + 1
        if m > n: break
        factor = 0
        for j in range(1, int(m ** 0.5)):
            if m % j == 0: factor += 2
        if int(round(m ** 0.5)) ** 2 == m: factor += 1
        if factor == 8: ans += 1
        print("factor[{}]={}".format(m, factor))
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

def main():
    n = int(input())
    ans = 0
    for i in range(n // 2 + 1):
        m = 2 * i + 1
        factor = 0
        for j in range(1, int(m ** 0.5)):
            if m % j == 0: factor += 2
        if int(round(m ** 0.5)) ** 2 == m: factor += 1
        if factor == 8: ans += 1
        #print("factor[{}]={}".format(m, factor))
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
if N >= 195:
  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(3)
elif N >= 165:
  print(2)
elif N >= 105:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
import sys

n = int(sys.stdin.readline().rstrip("\n"))
count = 0
for num in range(27, n+1, 2):
    divisor = 0
    for p in range(1, num, 2):
        if num % p == 0:
            q = int((num - num % p)/ p)
            if q >= p:
                divisor += 1
            else:
                break
    if divisor == 8:
        count += 1
print(count)

Submission status: Wrong Answer

Solution code:
import sys

n = int(sys.stdin.readline().rstrip("\n"))
count = 0
for num in range(27, n+1, 2):
    divisor = 0
    for p in range(1, num, 2):
        if num % p == 0:
            q = int((num - num % p)/ p)
            if q > p:
                divisor += 1
            else:
                break
    if divisor == 8:
        count += 1
print(count)

Submission status: Wrong Answer

Solution code:
import sys

n = int(sys.stdin.readline().rstrip("\n"))
count = 0
for num in range(24, n+1):
    divisor = 0
    for p in range(1, num):
        if num % p == 0:
            q = int((num - num % p)/ p)
            if q > p:
                divisor += 1
            else:
                break
    if divisor == 8:
        count += 1
print(count)

Submission status: Wrong Answer

Solution code:
import sys

n = int(sys.stdin.readline().rstrip("\n"))
count = 0
for num in range(24, n+1):
    divisor = 0
    for p in range(1, num):
        if num % p == 0:
            q = int((num - num % p)/ p)
            if q >= p:
                divisor += 1
            else:
                break
    if divisor == 8:
        count += 1
print(count)

Submission status: Wrong Answer

Solution code:
n=int(input())
if n<=104:
  print('0')
cnt=0
for i in range(105,n+1,2):
  if i in [105,135,165,189,195]:
    cnt+=1
print(cnt)

Submission status: Wrong Answer

Solution code:
n=int(input())
x=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:
    x+=1
print(x)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(count)

Submission status: Wrong Answer

Solution code:
def main():
    N = int(input())
    ans = 0
    for i in range(1,N+1):
        div = 0
        for c in range(1,i+1):
            if i%c == 0:
                div = div +1
        if div == 8 and (i%2)==1:
            print(i)
            ans = ans+1
    print(ans)
main()

Submission status: Wrong Answer

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


print(ans+1 if cnt == 8 else ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import sqrt

N = int(input())

ans = 0

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

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

    if sqrt(i).is_integer():
        cnt += 1

    if cnt == 8:
        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):
    count = 0
    for j in range(1,int(math.sqrt(i))):
        if i % j == 0:
            count += 1
    if count == 4:
        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<189:
  print(2)
elif N<195:
  print(3)
else:
  print(4)

Submission status: Wrong Answer

Solution code:
n = int(input())
if n >= 105: #3*5*7 = 105
    print(1)
elif n >= 135: #3*5*9 = 135
    print(2)
elif n >= 165: #3*5*11 = 165
    print(3)
elif n >= 189: #3*7*9 = 189
    print(4)
elif n >= 195: #3*5*13 = 195
    print(5)
else:
    print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def divisor(m):
    cnt = 2
    for i in range(3, m, 2):
        if m % i == 0:
            cnt += 1
    return cnt

n = int(input())
if n < 105:
    print(0)
elif n == 105:
    print(1)
else:
    res = 1
    for i in range(105, n+1, 2):
        if divisor(i) == 8:
            res += 1
    print(res)

Submission status: Wrong Answer

Solution code:
def divisor(m):
    cnt = 2
    for i in range(3, n, 2):
        if m % i == 0:
            cnt += 1
    return cnt

n = int(input())
if n < 105:
    print(0)
elif n == 105:
    print(1)
else:
    res = 1
    for i in range(107, n+1, 2):
        if divisor(i) == 8:
            res += 1
    print(res)

Submission status: Wrong Answer

Solution code:
n = int(input())


def main():
  count = 0
  yakusu =0

  if n==1 or n==2:
    return count
  else:
    for i in range(n):
      for j in range(3,i):
        if i % j ==0:
          yakusu +=1
      if yakusu == 8:
        count += 1
    return count

print(main())

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=count+1
  if count==8:
    ans=ans+1
else:
  print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
X=[3, 5, 7, 11, 13]
ans=0
for n in range(1,N+1):
  _X=[1 if n%x==0 else 0 for x in X]
  if sum(_X)==3:
    ans+=1
print(ans)

Submission status: Wrong Answer

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


# input
N = int(input())

# check
cnt = 0
for n in range(1, N + 1):
    div = get_divisors(n)
    if len(div) == 8:
        cnt += 1

print(cnt)

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10 ** 6)
# input = sys.stdin.readline    ####
int1 = lambda x: int(x) - 1
def II(): return int(input())

def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())

def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def printlist(lst, k='\n'): print(k.join(list(map(str, lst))))
INF = float('inf')

def solve():
    n = II()

    if n < 105:
        print(0)
        return

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



if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

Solution code:
def divisor_counter(n):
    cnt = 0
    if n % 2 == 0:
        return 0
    for i in range(1,n+1):
        if n % i == 0:
            cnt += 1
    if cnt == 8:
        return 1
    else:
        return 0
    

n = int(input())
print(divisor_counter(n))

Submission status: Wrong Answer

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

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 N < 105:
    print(0)
else:
    print(1)

Submission status: Wrong Answer

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

# map(int, input().rstrip().split())

def VI(N, init=0):
  return [init for _ in range(N)]
def VVI(N, M, init=0):
  return [[init for _ in range(M)] for _ in range(N)]

def VD(N, init=0.0):
  return [init for _ in range(N)]
def VVD(N, M, init=0.0):
  return [[init for _ in range(M)] for _ in range(N)]

def Divisor(n):
  ret = []
  for i in range(1, n+1):
    if i*i > n:
      break
    else:
      if n % i == 0:
        ret.append(i)
        if i*i != n:
          ret.append(n//i)
  ret.sort()
  return ret

N = int(input().rstrip())
ans = 0
for i in range(1, N+1):
  divs = Divisor(i)
  if len(divs) == 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:
def divisor(x):
  ret=[]
  for i in range(1,x+1):
    if x%i==0:
      ret.append(i)
  return len(ret)

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

Submission status: Wrong Answer

Solution code:
n = int(input())

res = 0
for i in range(9,n+1,2):
    yakusu = 0
    for j in range(2,int(i/2)+1):
        if(i % j == 0):
            yakusu +=1
    if(yakusu == 8):
        res += 1

print(res)

Submission status: Wrong Answer

Solution code:
n = int(input())

res = 0
for i in range(8,n+1,2):
    yakusu = 0
    for j in range(2,int(i/2)+1):
        if(i % j == 0):
            yakusu +=1
    if(yakusu == 8):
        res += 1

print(res)

Submission status: Wrong Answer

Solution code:
n = int(input())

res = 0
for i in range(8,n+1):
    yakusu = 0
    for j in range(2,int(i/2)+1,2):
        if(i % j == 0):
            yakusu +=1
    if(yakusu == 8):
        res += 1

print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=int(input())
if N<105:print(0)
else:
    ans=0
    for i in range(105,N+1):
        count=0
        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())
cnt=0
a=[3,5,7,11,13,17,23]
for i in range(len(a)):
    for j in range(i+1,len(a)):
        for k in range(j+1,len(a)):
            if i*j*k <=n and i*j*k%2==1:
                cnt+=1
print(cnt)

Submission status: Wrong Answer

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

print(ans)

Submission status: Wrong Answer

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

ans = []
for i in range(1, N + 1, 2):
    count = 0
    if i == 105:
        print(105)
    for j in range(1, i // 2 + 1):
        if i % j == 0:
            count += 1
    if count == 7:
        ans.append(1)

print(sum(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def is_odd(n):
    if n % 2 == 1:
        return True
    else:
        return False
    
def p105(n):
    count = 0
    for s in range(n,0,-1):
        if is_odd(s):

            divisors = [s]

            for i in range(1,s):
                if s % i == 0:
                    divisors.append(i)
            if len(divisors) == 8:
                print(divisors)
                count += 1
    return count

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

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-

#############
# Libraries #
#############

import sys
input = sys.stdin.readline

import math
#from math import gcd
import bisect
from collections import defaultdict
from collections import deque
from functools import lru_cache


#############
# Constants #
#############

MOD = 10**9+7
INF = float('inf')

#############
# Functions #
#############

######INPUT######
def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]

######OUTPUT######
def Yes(): print("Yes"); return
def No(): print("No"); return

#####Inverse#####
def inv(n): return pow(n, MOD-2, MOD)

######Combination######
kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret

######Factorization######
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

#####MakeDivisors######
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

#####LCM#####
def lcm(a, b):
    return a * b // gcd (a, b)

#####BitCount#####
def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count

#####ChangeBase#####
def Base_10_to_n(X, n):
  if (int(X/n)):
    return Base_10_to_n(int(X/n), n)+[X%n]
  return [X%n]


#############
# Main Code #
#############
N = inputI()

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

Submission status: Wrong Answer

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

        else:
            continue
        if count == 8 and i ==N:
            ans += 1
print(ans)

Submission status: Wrong Answer

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

        else:
            continue
        if count == 8 and i ==N:
            ans += 1
print(ans)

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*7:
    ans=2
elif n<3**3*7:
    ans=3
elif n<3*5*13:
    ans=4
else:
    ans=5
print(ans)

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*7:
    ans=2
elif n<3**3*7:
    ans=3
else:
    ans=4
print(ans)

Submission status: Wrong Answer

Solution code:
def count_dividers(n):
    sqrt = int(n ** 0.5)
    count = 0
    for i in range(1, sqrt):
        if n % i == 0:
            count += 1
    count *= 2
    if n == sqrt ** 2:
        count += 1

    return count


N = int(input())

print(len([0 for n in range(105, N + 1, 2) if count_dividers(n) == 8]))

Submission status: Wrong Answer

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right, insort_left, insort_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
from fractions import gcd
import sys
def input(): return sys.stdin.readline().rstrip()
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = 10**18
# ----------------------------------------------------------- #

n = I()
prime = [3, 5, 7, 11]
A = {a**7 for a in prime if a**7<200}
B = {a*b**3 for a, b in permutations(prime, 2) if a*b**3<200}
C = {a*b*c for a, b, c in permutations(prime, 3) if a*b*c<200}
D = A | B | C
ans = 0
for i in range(n+1):
    if i % 2 == 1 and i in D:
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
import collections

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
count=0
n=int(input())
for i in range(1, n+1):
  ans=1
  c=collections.Counter(prime_factorize(i))
  clist = c.values()
  for j in clist:
    ans *= (j+1)
  if ans == 8:
    count += 1
    
print(count)

Submission status: Wrong Answer

Solution code:
import collections

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
count=0
n=int(input())
for i in range(1, n+1):
  ans=1
  c=collections.Counter(prime_factorize(i))
  clist = c.values()
  for i in clist:
    ans *= (i+1)
  if ans == 8:
    count += 1
    
print(count)

Submission status: Wrong Answer

Solution code:
import math
import sys
n = int(sys.stdin.readline())
ans = 0
for i in range(3, n + 1, 2):
    # print(f'{i=}', end=' ')
    count = 0
    for j in range(1, int(math.sqrt(i))):
        if i % j == 0:
            # print(f'{i} % {j} is 0.')
            count += 2
    if count == 8:
        # print(f'{i} have just 8 divisors.')
        ans += 1
print(ans)

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
import math
cnt=0
coun=0
x=math.floor(n**(1/2))
if n<105:
  print(0)
  exit()
else :
  for i in range (105,n+1):
    for j in range (1,x):
      if i%j==0 and j!=i/j:
        cnt+=2
    if cnt==8:
      coun+=1
print(coun)

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)
elif n >= 195:
    print(3)

Submission status: Wrong Answer

Solution code:
N=int(input())
def prime(n):
  cnt=0
  for i in range(2,n):
    if n%2==0:
      cnt+=1
    
  return cnt

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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