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:
import math

def prime_check(x): #x>=2
    if x==2:
        return True,2
    elif x%2==0:
        return False,2
    else:
        limit=int(math.sqrt(x))
        for factor in range(3,limit+1,2):
            if x%factor==0:
                return False,factor
        return True,x


def prime_factorization(x): #x>=2
    factor_list=[]
    factor_dictionary={}
    factor_set=set()
    judge,factor=prime_check(x)
    while True:
        factor_list.append(factor)
        if factor in factor_set:
            factor_dictionary[factor]+=1
        else:
            factor_dictionary[factor]=1
            factor_set.add(factor)

        if judge:
            return factor_list,factor_dictionary,factor_set
            break
        else:
            x//=factor
            judge,factor=prime_check(x)


N=int(input())
ans=0
for i in range(1,N+1,2):
    List,Dict,Set=prime_factorization(i)
    if len(List)==3 and len(Set)==3:
        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 u in range(1,i+1):
        if N%u == 0:
            cnt+=1
    if cnt == 8:
        ans += 1
    cnt = 0
print(ans)

Submission status: Wrong Answer

Solution code:
def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]

n=n0()

ans=0
for k in range(105,n+1,2):
    c=0
    for i in range(1,int(n**0.5)+1):
        if k%i==0:
            c+=2
    if i**2==k:
        c-=1
    if c==8:
        ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]

n=n0()

ans=0
for k in range(5,n+1):
    c=0
    for i in range(1,int(k**0.5)+1,2):
        if k%i==0:
            c+=2
    if i**2==k:
        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 + 2, 2):
  count = 0
  for j in range(1, i +1):
    if i % j == 0:
      count += 1
  if count == 8:
    ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]

n=n0()

ans=0
for k in range(5,n+1):
    c=0
    for i in range(1,int(k**0.5),2):
        if k%i==0:
            c+=2
    if i**2==k:
        c+=1
    if c==8:
        ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
import bisect
import math
import sys
from collections import Counter, defaultdict, deque
from copy import copy, deepcopy
from heapq import heapify, heappop, heappush
from itertools import combinations, permutations
from queue import Queue

read = sys.stdin.read
readline = sys.stdin.readline 
readlines = sys.stdin.readlines 

inf = float("inf")

# if n < 105, return 0
# else, perform trial devision

def main():
    n = int(input())
    if n < 105:
        print(0)
    elif n == 105:
        print(1)
    else:
        count = 1
        for i in range(106, n+1):
            count_div = 0
            for j in range(1, int(n**0.5)+1):
                if i % j == 0:
                    if i // j == j:
                        count_div += 1
                    else:
                        count_div += 2
            if count_div == 8:
                count += 1
        print(count)
        
        
if __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
import bisect
import math
import sys
from collections import Counter, defaultdict, deque
from copy import copy, deepcopy
from heapq import heapify, heappop, heappush
from itertools import combinations, permutations
from queue import Queue

read = sys.stdin.read
readline = sys.stdin.readline 
readlines = sys.stdin.readlines 

inf = float("inf")


def main():
    n = int(input())
    if n < 105:
        print(0)
    elif n == 105:
        print(1)
    else:
        count = 1
        for i in range(106, n+1):
            count_div = 0
            for j in range(1, int(n**0.5)+1):
                if n % j == 0:
                    if n // j == j:
                        count_div += 1
                    else:
                        count_div += 2
            if count_div == 8:
                count += 1
        print(count)
            
if __name__=='__main__':
    main()

Submission status: Wrong Answer

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

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

for i in range(n+1):
  if len(make_divisors(i))==8:
    cnt+=1
print(cnt)

Submission status: Wrong Answer

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

else:
  for i in range(105,n+1):
    if len(make_divisors(i))==8:
      cnt+=1
  print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())

res = 0

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

print(res)

Submission status: Wrong Answer

Solution code:
N = int(input())

res = 0

for i in range(1, N+1, 2):
  count = 0
  for j in range(2, N):
    if i % j == 0:
      count += 1
  if count == 6:
    res += 1

print(res)

Submission status: Wrong Answer

Solution code:
n = int(input())

ret = 0


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

Submission status: Wrong Answer

Solution code:
n = int(input())

ret = 0


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

Submission status: Wrong Answer

Solution code:

n = int(input())

ret = 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:
        ret += 1
print(ret)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math 
n = int(input())
cnt = 0
if n ==1:
    print(cnt)
    exit()
for i in range(1,int(math.sqrt(n))+1):
    if n % i == 0:
       cnt += 1
print(cnt*2)

Submission status: Wrong Answer

Solution code:
from math import floor, sqrt

n = int(input())

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

ans = 0
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:
        ans += 1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

n=int(input())
if n<=106:
    print(1)
else:
    ans=1#105
    for num in range(107, n+1):
        if num%2==1:
            l=make_div_list(num)
            if len(l)==8:
                ans+=1
    print(ans)

Submission status: Wrong Answer

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

n=int(input())
if n<=116:
    print(1)
else:
    ans=1
    for num in range(117, n+1):
        if num%2==1:
            l=make_div_list(num)
            if len(l)==8:
                ans+=1
    print(ans)

Submission status: Wrong Answer

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

n=int(input())
if n<=116:
    print(1)
else:
    ans=0
    for num in range(117, n+1):
        if num%2==1:
            div_list=make_div_list(num)
            if len(div_list)==8:
                ans+=1
    print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

if (n < 105):
    ans = 0
elif (n == 105):
    ans = 1

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

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

print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Fri May  8 01:14:23 2020

@author: Kanaru Sato
"""
import math

N = int(input())
ans = 0

for n in range(1,N+1):
    if n%2 != 0:
        count = 0
        for i in range(1,int(math.sqrt(n))+1):
            if i != int(math.sqrt(n)) and n % i == 0:
                count += 2
            if i == int(math.sqrt(n)) and n % i == 0:
                count += 1
        if count == 8:
            ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Fri May  8 01:14:23 2020

@author: Kanaru Sato
"""
import math

N = int(input())
ans = 0

for num in range(N//2+1):
    count = 0
    n = 2*num+1
    for i in range(1,int(math.sqrt(n))+1):
        if i != int(math.sqrt(n)) and n % i == 0:
            count += 2
        if i == int(math.sqrt(n)) and n % i == 0:
            count += 1
    if count == 8:
        ans += 1

print(ans)

Submission status: Wrong Answer

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

    counter = 0


print(ans)

Submission status: Wrong Answer

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


print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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 >= 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:
a=int(input())
if a<=104:
    ans=0
elif a<135:
    ans=1
elif a<165:
    ans=2
elif a<189:
    ans=3
else:
    ans=4
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a=int(input())
if a<=104:
    ans=0
elif a<165:
    ans=1
elif a<195:
    ans=2
else:
    ans=3

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
n=int(input());print((n-75)//30+int(n>188))

Submission status: Wrong Answer

Solution code:
_=int(input());print(_//105)

Submission status: Wrong Answer

Solution code:
_=input();r=0 if _=="7"else int(_[0:2])//3-3;print(r)

Submission status: Wrong Answer

Solution code:
l=0
for c in input():
    l+=[0,0,5,1,0,1,2,0,1.5,2.5][int(c)]
print(int(l))

Submission status: Wrong Answer

Solution code:
l=0
for c in input():
    l+=[0,0,5,1,0,1,2,0,1.5,2.5][int(c)]
print(l)

Submission status: Wrong Answer

Solution code:
l=0
for c in input():
    l+=[0,0,5,1,0,1,2,0,3,4][int(c)]
print(l)

Submission status: Wrong Answer

Solution code:
N=int(input())
tmp=1
k=0
ans=0
for i in range(2, N + 1):
    while N % i == 0:
        N //= i
        k += 1
    tmp *= k+1
    k = 0
if tmp==8:
    ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
import os;os.system("ls|wc -l")

Submission status: Wrong Answer

Solution code:
from random import*;print(randint(0,5))

Submission status: Wrong Answer

Solution code:
print(4)

Submission status: Wrong Answer

Solution code:
print(3)

Submission status: Wrong Answer

Solution code:
print(2)

Submission status: Wrong Answer

Solution code:
print(0)

Submission status: Wrong Answer

Solution code:
print(1)

Submission status: Wrong Answer

Solution code:
_=int(input());c=0
for i in 'i¥½É':
  if (_ < ord(i)):
    print(c)
    break
  c+=1

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# 02 AtCoder Beginner Contest 106 B - 105
import sys
import math

N = int(input())


def divisor(n):
    ans = 0
    for i in range(1, int(math.sqrt(n)), 2):  # 偶数は回答に含めないため、約数が　2の倍数となる数字は存在しない
        if n % i == 0:
            ans += 1
            if i != int(math.sqrt(n)):
                ans += 1

    return ans


ans = 0
for i in range(105, N + 1, 2):  # 偶数は回答に含めない
    if divisor(i) == 8:
        ans +=1

print(ans)

Submission status: Wrong Answer

Solution code:
# 02 AtCoder Beginner Contest 106 B - 105
import sys
import math

N = int(input())


def divisor(n):
    ans = 0
    for i in range(1, int(math.sqrt(n))):
        if n % i == 0:
            ans += 1
            if i != int(math.sqrt(n)):
                ans += 1

    return ans


ans = 0
for i in range(105, N + 1):
    if i % 2 == 0:
        continue

    if divisor(i) == 8:
        ans +=1

print(ans)

Submission status: Wrong Answer

Solution code:
# 02 AtCoder Beginner Contest 106 B - 105
import sys
import math

N = int(input())


def divisor(n):
    ans = 0
    for i in range(1, int(math.sqrt(n))):
        if n % i == 0:
            ans += 1
        if i != int(math.sqrt(n)):
            ans += 1

    return ans


ans = 0
for i in range(105, N + 1):
    if i % 2 == 0:
        continue

    if divisor(i) == 8:
        ans +=1

print(ans)

Submission status: Wrong Answer

Solution code:
# 02 AtCoder Beginner Contest 106 B - 105
import sys
import math

N = int(input())


def divisor(n):
    ans = 0
    for i in range(1, int(math.sqrt(n))):
        if n % i == 0:
            ans += 2

    return ans


ans = 0
for i in range(60, N + 1):
    if i % 2 == 0:
        continue

    if divisor(i) == 8:
        ans +=1

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n =int(input())
cnt = 0
l = []
for i in range(1, n+1):
    if i % 2 == 1:
        if n % i == 0:
            l.append(i)
            if len(l) == 8:
                cnt += 1
        else:
            continue
    else:
        continue
print(cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())
cnt = 0
l = []
for i in range(1, n+1):
    if i % 2 == 0:
        exit()
    else: 
        if n % i == 0:
            l.append(i)
            if len(l) == 8:
                cnt += 1
print(cnt)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

cnt_2 = 0
if n < 105:
    print(0)

else:
    for i in range(105,n+1,2):
        cnt = 0
        for j in range(1,i+1):
            if i % j == 0:
                cnt += 1
        if cnt == 8:
            cnt_2 += 1

print(cnt_2)

Submission status: Wrong Answer

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
inf = 10**17
mod = 10**9 + 7
#s=input().rstrip()

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(1,S):
  a=0
  for j in range(1,i):
    if j % i ==0:
      a+=1
  if a==8:
    count+=1
print(count)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for s in [i for i in range(1,n+1) if i % 2 == 1]:
  for i in range(1,int(s**0.5)+1):
    if s % i == 0:
        l.append(i)
        if len(l)==8:
            ans.append(s)
ans = set(ans)
print(len(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())
count = 0
ans = 0
j = 1

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = int(input())

count = 0

if(n >= 105):
    for i in range(105, n+1):
        l = []
        for j in range(1, i+1):
            if (i % j == 0):
                l += [j]
        if(len(set(l)) == 8):
            count += 1

print(count)

Submission status: Wrong Answer

Solution code:
import math

n = int(input())
ans = 0
for i in range(105, n+1, 2):
    cnt = 0
    for j in range(2, int(math.sqrt(n))):
        if i % j == 0:
            cnt += 1
    if cnt == 3:
        ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

odd = list()

count_list = list()
count = 0

for a in range(1, N+1):
    if a % 2 != 0:
        odd.append(a)

l = len(odd)

for a in range(0, l):
    for b in range(1, a+1):
        if a % b == 0:
            count += 1
    count_list.append(count)
    count = 0

print(len(list(filter(lambda x: x == 8, count_list))))

Submission status: Wrong Answer

Solution code:
N = int(input())

odd = list()

count_list = list()
count = 0

for a in range(1, N+1):
    if a % 2 != 0:
        odd.append(a)

l = len(odd)

for a in range(0, l):
    for b in range(1, a):
        if a % b == 0:
            count += 1
    count_list.append(count)
    count = 0

print(len(list(filter(lambda x: x == 8, count_list))))

Submission status: Wrong Answer

Solution code:
def main():
    # 入力
    n = int(input())
    if n < 105:
        print(0)
        return

    cnt = 1

    for i in range(106, n+1):
        if i % 2 == 0:
            continue
        tmp_cnt = 0

        ls = []
        for j in range(3, i):
            if i % j == 0:
                tmp_cnt += 1
                ls.append(j)
                if tmp_cnt == 7:
                    break

        print("i:" + str(i) + ", c:" + str(tmp_cnt) + ", l:" + str(ls))
        if tmp_cnt == 6:
            cnt += 1

    print(cnt)


main()

Submission status: Wrong Answer

Solution code:
def main():
    # 入力
    n = int(input())
    if n < 105:
        print(0)
        return

    cnt = 1

    for i in range(106, n+1):
        if i % 2 == 0:
            continue
        tmp_cnt = 0

        for j in range(3, i):
            if i % j == 0:
                tmp_cnt += 1
                if tmp_cnt == 9:
                    break

        if tmp_cnt == 8:
            cnt += 1

    print(cnt)


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

def main():
    N = int(input())
    ans = 0
    for n in range(1, N+2, 2):
        ans += (len(make_divisors(n)) == 8)
    
    print(ans)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())
res = 0
for i in range(2,n+1):
  print(i)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
def countYakusu(n):
  count = 0
  for i in range(n):
    if n % (i+1) == 0:
      count = count + 1
  return count == 8

N = int(input())
count = 0
for i in range(math.ceil(N/2)):
  count = count + countYakusu(i*2)
print(count)

Submission status: Wrong Answer

Solution code:
import math
def countYakusu(n):
  count = 0
  for i in range(n):
    if n % (i+1) == 0:
      count = count + 1
  return count == 8

N = int(input())
count = 0
for i in range(math.floor(N/2)+1):
  count = count + countYakusu(i*2+1)
print(count)

Submission status: Wrong Answer

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
ans = 0
for i in range(N//2+2):
	cnt = 0
	for j in range(1, 2*i):
		if (2*i-1) % j == 0:
			cnt += 1

	if cnt == 8:
		ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
from statistics import median
#import collections
#aa = collections.Counter(a) # list to list || .most_common(2)で最大の2個とりだせるお a[0][0]
from itertools import combinations # (string,3) 3回
from collections import deque
from collections import defaultdict
import bisect
#
#    d = m - k[i] - k[j]
#    if kk[bisect.bisect_right(kk,d) - 1] == d:
#
#
#
# pythonで無理なときは、pypyでやると正解するかも！！
#
#

import sys
sys.setrecursionlimit(10000000)
mod = 10**9 + 7

def readInts():
  return list(map(int,input().split()))
def main():
    n = int(input())
    if n < 105:
        print(0)
        exit()
    i = 105
    ans = 0
    while i <= n:
        cnt = 2 # 1 と それ自身の個数
        a = 2
        while a * a <= i:
            if i % a == 0:
                if i // a == a:
                    cnt += 1
                else:
                    cnt += 2
            a += 1
        #print(cnt)
        if cnt == 8:
            ans += 1
        i += 1
    print(ans)
if __name__ == '__main__':
  main()

Submission status: Wrong Answer

Solution code:
import math

def input_number():
    return int(input())

def is_odd(number):
    if number % 2 == 1:
        return True
    else:
        return False

def is_8(number):
    fraction_of_the_number = 0
    for i in range(1, int(math.sqrt(number)), 2):
        if number % i == 0:
            fraction_of_the_number += 2
    if fraction_of_the_number == 8:
        return True
    else:
        return False

def main():
    n = input_number()
    answer = 0
    for i in range(1, n+1):
        if is_8(i) and is_odd(i):
            answer += 1
    print(answer)

main()

Submission status: Wrong Answer

Solution code:
N = int(input())
B = 0
for i in range(N):
  A = 0
  n = int((i+1)**(1/2))
  for j in range(n):
     if (i+1) % (j+1) == 0:
        A += 1
  if A == 4 and (i+1) % 2 == 1:
    print(i+1)
    B += 1
print(B)

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 0

for i in range(105, n + 1):
    divisor = []
    for j in range(1, int(i ** 0.5) + 1):
        if i % j == 0:
            divisor.append(j)
            divisor.append(i // j)

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

print(ans)