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

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

odd_prime = [3,5,7,11,13]
ans = 0
for i in range(3):
    for j in range(i+1,4):
        for h in range (j+1,5):
            if odd_prime[i] * odd_prime[j] * odd_prime[h] <= n:
                ans += 1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
#import sys
#import numpy as np
import math
#from fractions import Fraction
import itertools
from collections import deque
from collections import Counter
import heapq
from fractions  import gcd
#input=sys.stdin.readline
import bisect
n=int(input())
ans=0
for i in range(1,n+1,2):
    s=set()
    for j in range(1,int(pow(i,0.5)+1)):
        if i%j==0:
            s.add(j)
            s.add(i//j)
    if len(s)==8:
        print(s)
        ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())

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

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = 0

for i in range(1, N+1):
    cnt = 0
    for j in range(1, 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):
    cnt = 0
    for j in range(1, i):
        if i % j == 0:
            cnt += 1
    
    if cnt == 8:
        ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
def cnt_prime(x):
    cnt = 0
    for i in range(1, int(x ** 0.5 // 1) + 1):
        if x % i == 0:
            cnt += 1
    
    return cnt


N = int(input())
ans = 0

for i in range(1, N+1):
    if i % 2 == 1:
        c = cnt_prime(i)
        if c == 8:
            ans += 1

print(ans)

Submission status: Wrong Answer

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

if N % 2 != 0:
    N_odd = N
    
cnt = 0
odd_list = []

for i in range(201):
    if i % 2 != 0:
        odd_list.append(i)

#print(odd_list)
for i in odd_list:
    if N_odd % i == 0:
        cnt += 1
print(cnt // 8 )

Submission status: Wrong Answer

Solution code:
N = int(input())
cnt = 0
odd_list = []
ans = 0

for i in range(201):
    if i %2 != 0:
        odd_list.append(i)

#print(odd_list)
for i in odd_list:
    if N % i == 0:
        cnt += 1
print(cnt // 8 )

Submission status: Wrong Answer

Solution code:
N = int(input())

if N < 105:
  ans = 0
elif N == 105:
  ans = 1
else:
  ans = 1
  for n in range(106, N+1):
    if n % 2 == 0:
      continue
    count = 0
    for i in range(1, int(n**(1/2))+1):
      if n % i == 0:
      	count += 1
    if count == 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 n in range(106, N+1):
    count = 0
    for i in range(1, int(n**(1/2))+1):
      if n % i == 0:
      	count += 1
    if count == 8:
      ans += 1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

# 3 5 7 11
# 105 135 165 189 
if n >= 189:
  print(4)
elif n >= 165:
  print(3)
elif n >= 135:
  print(2)
elif n >= 105:
  print(1)
else:
  print(0)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

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 i%j == 0:
            count += 1
    if count==8:
        print(i)
        ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
N=int(input())
res = 0
def checkOdd(N):
  k = 0
  for i in range(1,N+1):
    if N % i ==0:
      k += 1
  if k == 8:
    return True
  else:
    return False

if N<104:
  print(res)
else:
  for i in range(105,N+1):
    if checkOdd(i):
      res += 1
  print(res)

Submission status: Wrong Answer

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

def main():

    N = int(input())

    ans = 0
    count = 0

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

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

def main():

    N = int(input())

    ans = 0
    count = 0

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


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
N = int(input())

a = 0
b = []
for i in range(1, N+1):
  if N%i == 0:
    a += 1
  if a == 8 and N%2:
    b.append(a)
print(len(b))

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = 0
for n in range(1,int(N/2)+1):
    if 2*n+1 > N:
        break
    for i in range(1,int(N**(1/2)/2)+1):
        for j in range(i+1,int(N**(1/2)/2)+1):
            for k in range(j+1,int(N**(1/2)/2)+1):
                if 2*n+1 == (2*i+1)*(2*j+1)*(2*k+1):
                    print(i,j,k,n)
                    ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = 0
for n in range(1,int(N/2)+1):
    if 2*n+1 > N:
        break
    for i in range(1,int(N**(1/2)/2)):
        for j in range(i+1,int(N**(1/2)/2)):
            for k in range(j+1,int(N**(1/2)/2)):
                if 2*n+1 == (2*i+1)*(2*j+1)*(2*k+1):
                    ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = 0
for n in range(1,int(N/2)+1):
    for i in range(1,int(N**(1/2)/2)+1):
        for j in range(i+1,int(N**(1/2)/2)+1):
            for k in range(j+1,int(N**(1/2)/2)+1):
                if 2*n+1 == (2*i+1)*(2*j+1)*(2*k+1):
                    ans += 1

print(ans)

Submission status: Wrong Answer

Solution code:
# https://atcoder.jp/contests/abc106/tasks/abc106_b
import math

N = int(input())


def is_8(num):
    if num < 1:
        return False
    elif num == 1:
        return False
    else:
        divisor_list = set()
        divisor_list.add(1)
        # root nまで見れば問題ない
        for i in range(2, int(math.sqrt(num))):
            if num % i == 0:
                divisor_list.add(num // i)
                divisor_list.add(i)
        # 元の数を入れる
        divisor_list.add(num)
        if len(divisor_list) == 8:
            return True

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

print(cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())

if N >= 195:
    ans = 4
elif N >= 165:
    ans = 3
elif N >= 135:
    ans = 2
elif N >= 105:
    ans = 1
else:
    ans = 0

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())

res = 0
for i in range(1,N+1):
    if N % i == 0:
        if 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):
    temp = i
    cnt = 0
    for j in range(1, temp + 1):
        if temp % i == 0:cnt += 1
    
    if cnt == 8:res += 1
print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
if int(input())>=105:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
def mkdiv(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

if len(mkdiv(int(input())))==8:
  print("Yes")
else:
  print("No")

Submission status: Wrong Answer

Solution code:
N = int(input())

if N < 105:
  print(0)
else:
  ans = 0
  for i in range(105, N + 1, 1):
    y = 0
    for j in range(1, i + 1, 1):
      if i % j == 0:
        y += 1
    else:
      if y == 8:
        ans += 1
  else:
    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 sympy

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

n = int(input())
# print(f"{n}")

ans = 0
for i in range(1, n + 1):
    if i % 2 == 0:
        continue
    
    # d_count = sympy.divisor_count(i)
    a = prime_factorize(i)
    # print(a)
    d_count = len(a)
    # print(f"{i} {d_count}")
    if d_count == 8:
        ans += 1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
i = int(input())

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

Submission status: Wrong Answer

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

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:
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

N = int(input())
counter = 0
for i in range(1,N+1,1):
    if(len(make_divisors(i)) == 8):
        counter+=1
print(counter)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys, os, math, bisect, itertools, collections, heapq, queue
# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
from decimal import Decimal
from collections import defaultdict, deque

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)

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


def prime_fact(N):
    n = 2
    prime = []
    while n * n <= N:
        i = 0
        while N % n == 0:
            N //= n
            i += 1
        if i > 0:
            prime.append((n, i))
        n += 1
    if N != 1:
        prime.append((N, 1))
    return prime


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = ii()
    if N >= 105:
        print(1)
    else:
        print(0)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:

def yakusu(x):
    A=[]
    for i in range(1,x+1):
        if x%i==0:
            A.append(i)
    return(len(A))
    
n=int(input())
ans=0

for j in range(1,n+1):
    if yakusu(j)==8:
        ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
def yakusu(x):
    A=[]
    for i in range(1,x+1):
        if x%i==0:
            A.append(i)
    return(len(A))
    
n=int(input())
ans=0

for j in range(1,n+1):
    if yakusu(n)==8:
        ans+=1
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math

def countDividers(n):
    divisors = []
    for i in range(1, int(math.sqrt(n))):
        if n % i == 0:
            divisors.append(i)
            divisors.append(int(n/i))
    return len(divisors)


if __name__ == '__main__':
    n = int(input())
    count = 0
    for i in range(1,n+1):
        if i %2 ==1 and countDividers(i) == 8:
            count += 1
           
    print(count)

Submission status: Wrong Answer

Solution code:
import math

def countDividers(n):
    divisors = []
    for i in range(1, int(math.sqrt(n))):
        if n % i == 0:
            divisors.append(i)
            divisors.append(int(n/i))
    return len(divisors)

if __name__ == '__main__':
    n = int(input())
    count = 0
    for i in range(1,n+1):
        if i %2 ==1 and countDividers(i) == 8:
            count += 1
            #print(i)
    print(count)

Submission status: Wrong Answer

Solution code:
import math

def countDividers(n):
    divisors = []
    for i in range(1, int(math.sqrt(n))):
        if n % i == 0:
            divisors.append(i)
            divisors.append(int(n/i))
    return len(divisors)

if __name__ == '__main__':
    n = int(input())
    count = 0
    for i in range(1,n+1):
      if countDividers(i) == 8:
        count += 1
    print(count)

Submission status: Wrong Answer

Solution code:
import math

def countDividers(n):
    divisors = []
    for i in range(1, int(math.sqrt(n))):
        if n % i == 0:
            divisors.append(i)
            divisors.append(int(n/i))
    return len(divisors)

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
number = int(input())

num_eight_divisors = 0

numbers = list(range(9, number + 1, 2))

for i in range(9, number + 1, 2):
    divisors = [1, i]

    for j in range(2, i):
        q, mod = divmod(i, j)

        if mod == 0:
            divisors.append(j)
            divisors.append(q)

    if len(set(divisors)):
        num_eight_divisors = num_eight_divisors + 1

print(num_eight_divisors)

Submission status: Wrong Answer

Solution code:
number = int(input())

num_eight_divisors = 0

for i in range(9, number + 1, 2):
    num_divisors = 2

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

        if num_divisors > 8:
            break

    if num_divisors == 8:
        num_eight_divisors = num_eight_divisors + 1

print(num_eight_divisors)

Submission status: Wrong Answer

Solution code:
number = int(input())

num_eight_divisors = 0

for i in range(9, number + 1, 2):
    num_divisors = 2

    for j in range(2, i // 2):
        if i % j == 0:
            num_divisors = num_divisors + 2

        if num_divisors > 8:
            break

    if num_divisors == 8:
        num_eight_divisors = num_eight_divisors + 1

print(num_eight_divisors)

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 0
sqrt = 1

for i in range(1,n+1,2):
    if i == sqrt*sqrt:
        sqrt += 1
        continue
    elif i > sqrt*sqrt:
        sqrt += 1
    count = 0
    for j in range(1,sqrt,2):
        if i%j == 0:
            count += 1
    if count == 4:
        print(i,sqrt)
        ans += 1

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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:
def I(): return int(input())
n = I()
ans = 0
if n>=105:
    for i in range(105,n+1,2):
        cnt=0
        for j in range(1,int(n**0.5)+1):
            if i % j ==0:
                if j*j==i:
                    cnt+=1
                else:cnt+=2
        if cnt==8:ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
u,v,w=0,0,0
count=0
ans=0
if N<104:
  print(ans)
  exit(0)
for i in range(104,N+1):
  for p in range(5):
      u=pow(3,p)
      for q in range(4):
          v=pow(5,q)
          for r in range(3):
              w=pow(7,r)
              for s in range(2):
                x=pow(11,s)
                if i%(u*v*w*x)==0:
                    count+=1
  if count==8:
    ans+=1
  count=0
print(ans)

Submission status: Wrong Answer

Solution code:
def I(): return int(input())
n = I()
ans = 0
if n>=105:
    for i in range(105,n+1,2):
        cnt=0
        for j in range(1,int(n**0.5)+1):
            if i % j ==0:
                cnt+=2
        if cnt==8:ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
u,v,w=0,0,0
count=0
ans=0
if N<104:
  print(ans)
  exit(0)
for i in range(104,N+1):
  for p in range(5):
      u=pow(3,p)
      for q in range(4):
          v=pow(5,q)
          for r in range(3):
              w=pow(7,r)
              if i%(u*v*w)==0:
                  count+=1
  if count==8:
    ans+=1
  count=0
print(ans)

Submission status: Wrong Answer

Solution code:
def I(): return int(input())
n = I()
ans = 0
if n>=105:
    for i in range(105,n+1):
        cnt=0
        for j in range(1,int(n**0.5)+1):
            if i % j ==0:
                cnt+=2
        if cnt==8:ans+=1
print(ans)

Submission status: Wrong Answer

Solution code:
N=int(input())
u,v,w=0,0,0
count=0
ans=0
if N<105:
  print(ans)
  exit(0)
for i in range(104,N):
  for p in range(5):
      u=pow(3,p)
      for q in range(4):
          v=pow(5,q)
          for r in range(3):
              w=pow(7,r)
              if i%(u*v*w)==0:
                  count+=1
  if count==8:
    ans+=1
  count=0
print(ans)

Submission status: Wrong Answer

Solution code:

def solve():
    ans = 0
    n=int(input())
    for i in range(1,n+1):
        div_list = []
        for j in range(1,int(i**0.5)+1):
            if i%j!=0:
                continue
            if i//j==j:
                div_list.append(j)
            else:
                div_list.append(i//j)
                div_list.append(j)
    print(ans)

if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

Solution code:

def solve():
    ans = 0
    n=int(input())
    for i in range(1,n+1):
        div_list = []
        for j in range(i,int(i**0.5)+1):
            if i%j!=0:
                continue
            if i//j==j:
                div_list.append(j)
            else:
                div_list.append(i//j)
                div_list.append(j)
    print(ans)

if __name__ == '__main__':
    solve()

Submission status: Wrong Answer

Solution code:
ans = 0
def solve(n):
    global ans
    div_list=[]
    for i in range(1,n+1,2):
        for j in range(1,int((i+1)**0.5)+1):
            if n % j == 0:
                if n//j==j:
                    div_list.append(n//j)
                    div_list.append(j)
                else:
                    div_list.append(j)
        else:
            if len(div_list) == 8:
                ans+=1

def main():
    n=int(input())
    solve(n)
    print(ans)

if __name__=='__main__':
    main()

Submission status: Wrong Answer

Solution code:
import sys

def divisor(num):
    cnt = 0
    for i in range(1, n+1):
        if(num % i == 0):
            cnt += 1
    return cnt


n = int(input())
ans = 0

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

Submission status: Wrong Answer

Solution code:
import sys

def divisor(num):
    cnt = 0
    for i in range(1, n+1):
        if(num % i == 0):
            cnt += 1
    return cnt


n = int(input())
ans = 0

if n <= 105:
    if n == 105:
        print(1)
    else:
        print(0)
    sys.exit()

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

Submission status: Wrong Answer

Solution code:
n = int(input())
def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

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

Submission status: Wrong Answer

Solution code:
import bisect
n = int(input())
lst = [105, 135, 165, 175, 195]
for i in range(5):
  if n < lst[i]:
    print(i)
    exit()
print(5)

Submission status: Wrong Answer

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

def count_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return len(lower_divisors + upper_divisors[::-1])

if n<105:
    print(0)
else:
    ans=0
    for i in range(105,n+1):
        if i%2==0:
            pass
        else:
            c=count_divisors(2*i+1)
            if c==8:
                ans+=1
                #print(i)
    print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())

def count_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return len(lower_divisors + upper_divisors[::-1])

if n<105:
    print(0)
else:
    ans=0
    for i in range(52,n//2):
        c=count_divisors(2*i+1)
        if c==8:
            ans+=1
            #print(i)
    print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = int(input())
cnt,lcnt = 0,0

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# B - 105

def yakusu_rekkyo(n):
    yakusu = set()
    for i in range(1, int(pow(n, 0.5)+1)):
        if n%i == 0:
            yakusu.add(i)
            if i!=n//i:
                yakusu.add(n//i)
    return yakusu

N = int(input())
ans = 0
for i in range(1, N+1, 2):
    Y = yakusu_rekkyo(N)
    if len(Y) == 8:
        ans += 1
        
print(ans)

Submission status: Wrong Answer

Solution code:
# B - 105

def yakusu_rekkyo(n):
    yakusu = set()
    for i in range(1, int(pow(n, 0.5)+1)):
        if n%i == 0:
            yakusu.add(i)
            if i!=n//i:
                yakusu.add(n//i)
    return yakusu

N = int(input())
ans = 0
for i in range(105, N+1, 2):
    Y = yakusu_rekkyo(N)
    if len(Y) == 8:
        ans += 1
        
print(ans)

Submission status: Wrong Answer

Solution code:
# B - 105

def yakusu_rekkyo(n):
    yakusu = set()
    for i in range(1, int(pow(n, 0.5)+1)):
        if n%i == 0:
            yakusu.add(i)
            yakusu.add(n//i)
    return yakusu

N = int(input())
ans = 0
for i in range(105, N+1, 2):
    Y = yakusu_rekkyo(N)
    if len(Y) == 8:
        ans += 1
        
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def actual(N):
    divisor_count = 0

    for i in range(1, N + 1):
        if N % i == 0:
            divisor_count += 1

    if divisor_count == 8:
        return 1

    return 0

N = int(input())
print(actual(N))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n=int(input())
l=[3,5,7,11,13]
ans=[0]*10000
for i in range(3):
    for j in range(1,4):
        for k in range(2,5):
            ans[l[i]*l[j]*l[k]]=1
ans[135]=1
ans[189]=1
print(sum(ans[:n+1]))

Submission status: Wrong Answer

Solution code:
n = int(input())

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

Submission status: Wrong Answer

Solution code:
n = int(input())
if n < 105:
  print(0)
else:
  output = 0
  for i in range(105,n+1):
    yaku = 0
    for j in range(1,n+1):
      if n % j == 0:
        yaku += 1
      if yaku > 8:
        continue
    if yaku == 8:
      output += 1
  print(output)