TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: 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)?

Submission attempts (in order):
N = int(input())

if N < 105:
    print (0)
else:
    if N < 135:
        print (1)
        if N < 165:
            print (2)
        else:
            if N < 189:
                print (3)
            else:
                if N < 195:
                    print (4)
                else:
                    print (5)

N = int(input())

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

N = int(input())

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

N = int(input())

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

    if count == 8:
        ans += 1

print (ans)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
def countFactors(n):
  count = 0
  for i in range(1, n + 1):
    if n % i == 0:
      count += 1
  return count

X = int(input())

count = 0
for i in range(1, X + 1, 2):
  if countFactors(i) == 8:
    print(i)
    count += 1

print(count)


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

X = int(input())

count = 0
for i in range(1, X + 1, 2):
  if countFactors(i) == 8:
    count += 1

print(count)


Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
n = int(input())

count = 0
c = 0

for i in range(1,n + 1):
  if n % 2 != 0:
    for j in range(1,i + 1):
      if i % j == 0:
        count += 1
    if count == 8:
      c += 1
    count = 0

print(c)

n = int(input())

count = 0
c = 0

for i in range(1,n + 1):
  if i % 2 != 0:
    for j in range(1,i + 1):
      if i % j == 0:
        count += 1
    if count == 8:
      c += 1
    count = 0

print(c)


Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
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)

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):
  if i%2 != 0:
    y = make_divisors(i)
    if len(y) == 8:
      count+=1
print(count)

Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
#106b
n = int(input())
ans=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:
        a+=1
print(ans)

#106b
n = int(input())
ans=0
for i in range(1,n+1,2):
    c=0
    for j in range(1,i+1):
        print(i,j)
        if i%j==0:
            c+=1
            
    if c==8:
        a+=1
print(ans)

n = int(input())
a = 0

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

print(a)


#106b
n = int(input())

ans=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:
        ans+=1

print(ans)

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
n = int(input())
d = [1] * (n + 1)
for i in range(2, n+1):
    for j in range(i, n+1, i):
        d[j] += 1
ans = 0
for i in range(1, n, 2):
  if d[i] == 8:
    ans += 1
 
print(ans)


n = int(input())
d = [1] * (n + 1)
for i in range(2, n+1):
    for j in range(i, n+1, i)
        d[j] += 1
ans = 0
for i in range(1, n, 2):
  if d[i] == 8:
    ans += 1

print(ans)


n = int(input())
d = [1] * (n + 1)
for i in range(2, n+1):
    for j in range(i, n+1, i):
        d[j] += 1
ans = 0
for i in range(1, n+1, 2):
  if d[i] == 8:
    ans += 1
 
print(ans)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
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())


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

print(cnt)

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


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

print(cnt)

Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
ip = input()
inputNum = int(ip)
totalCount = 0
for i in range(1,inputNum + 1):
    count = 0
    for j in range(1,i+1):
        if i % j == 0:
            count = count + 1
    if count == 8:
            totalCount = totalCount + 1

print(totalCount)

ip = input()
inputNum = int(ip)
totalCount = 0
for i in range(1,inputNum + 1):
    count = 0
    if i % 2 == 1:
        for j in range(1,i+1):
            if i % j == 0:
                count = count + 1
        if count == 8:
                totalCount = totalCount + 1

print(totalCount)

Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
def make_divisors(n):
    ans=0
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            ans+=1
            if i != n // i:
                ans+=1
    return ans

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

def make_divisors(n):
    ans=0
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            ans+=1
            if i != n // i:
                ans+=1
    return ans

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

def make_divisors(n):
    ans=0
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            ans+=1
            if i != n // i:
                ans+=1
    return ans

n=int(input())
a=0
for i in range(1,n+1,2):
    if make_divisors(i)==8:
        a+=1
print(a)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
¥n = int(input())

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


n = int(input())

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


Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
n = int(input())
yaku=[]
ans=0
for j in range(1, n+1)[::2]:
    for i in range(1, i+1):
        if j%i==0:
            yaku.append(i)
    if len(yaku)==8:
        ans+=1
print(ans)
    

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

Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
N=int(input())
 
ans=0
odd=[]
for i in range(1,N+1):
  if i%2!=0:
    odd.append(i)
    
if N  <104:
  pass
else:
  for i in range(105,N+1):
    if i%2!=0:
      tmp=0
      for j in odd:
        if i%j==0:
          tmp=+1
      if tmp==8:
        ans+=1 
print(ans)

N=int(input())

ans=0
odd=[]
for i in range(1,N+1):
  if i%2!=0:
    odd.append(i)
    
if N  <104:
  pass
elif N=105:
  ans=1
else:
  ans=1
  for i in range(106,N+1):
    if i%2 !=0:
      tmp=0
      for j in odd:
        if i%j==0:
          tmp=+1
      if tmp==8:
        ans+=1
        
        
print(ans)

N=int(input())
 
ans=0
odd=[]
for i in range(1,N+1):
  if i%2!=0:
    odd.append(i)
    
if N  <104:
  pass
else:
  for i in range(105,N+1):
    if i%2!=0:
      tmp=0
      for j in odd:
        if i%j==0:
          tmp+=1
      if tmp==8:
        ans+=1 
print(ans)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
n, x = map(int, input().split())
while(n != 0 or x != 0):
    count = 0
    for i in range(1, n-1):
        for j in range(i+1, n):
            if x - i - j > j and x - i - j <= n:
                count += 1
    print(count)
    n, x = map(int, input().split())


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


Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
N = int(input())
con = []
conter = 0

for i in range(1, 105):
    if i % 2 == 1:
        for s in range(1, i/2):
            if i % s == 0:
                counter += 1
            
        con.append(counter)


print(con.count(8))

N = int(input())
con = []
counter = 0

for i in range(1, N+1):
    if i % 2 == 1:
        for s in range(1, i+1):
            if i % s == 0:
                counter += 1
            
        con.append(counter)
        counter = 0


print(con.count(8))

Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
N = int(input())

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

    
    return len(divisors)
  
ans = 0

for i in range(1,N+1):
  a = make_divisors(i)
  if a ==8:
    ans += 1
    
print(int(ans))

N = int(input())

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

    
    return divisors
  
print(int(make_divisors(N)))

N = int(input())

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

    
    return len(divisors)
  
ans = 0

for i in range(1,N+1):
  a = make_divisors(i)
  if a ==8 and i%2 == 1 :
    ans += 1
    
print(int(ans))

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
in_num = int(input())
check_num = 1
ans_counter = 0

while check_num <= in_num:
	i = 1
	div_counter = 0
	while i <= check_num /2:
		if check_num % i == 0:
			div_counter += 1
		i += 2
	if div_counter == 8:
		ans_counter += 1
	check_num += 2

print(ans_counter)






in_num = int(input())
check_num = 0
ans_counter = 0

while check_num <= in_num:
	i = 1
	div_counter = 0
	while i <= check_num /3:
		if check_num % i == 0:
			div_counter += 1
		i += 2
	if div_counter == 8:
		ans_counter += 1
	check_num += 2

print(ans_counter)






in_num = int(input())
check_num = 1
ans_counter = 0

while check_num <= in_num:
	i = 1
	div_counter = 0
	while i <= check_num /3:
		if check_num % i == 0:
			div_counter += 1
		i += 2
	if div_counter == 8:
		ans_counter += 1
	check_num += 2

print(ans_counter)






in_num = int(input())
check_num = 105
ans_counter = 0

if in_num < 105:
	print(0)

else:
	while check_num <= in_num:
		i = 1
		div_counter = 0
		while i <= check_num /2:
			if check_num % i == 0:
				div_counter += 1
			i += 2
		if div_counter == 8:
			ans_counter += 1
		check_num += 2

	print(ans_counter)






in_num = int(input())
check_num = 0
ans_counter = 0



while check_num <= in_num:
	i = 1
	div_counter = 0
	while i <= check_num :
		if check_num % i == 0:
			div_counter += 1
		i += 2
	if div_counter == 8:
		ans_counter += 1
	check_num += 2

print(ans_counter)






in_num = int(input())
check_num = 0
ans_counter = 0

while check_num <= in_num:
	i = 1
	div_counter = 0
	while i < check_num /2:
		if check_num % i == 0:
			div_counter += 1
		i += 2
	if div_counter == 8:
		ans_counter += 1

print(ans_counter)






in_num = int(input())
check_num = 1
ans_counter = 0



while check_num <= in_num:
	i = 1
	div_counter = 0
	while i <= check_num :
		if check_num % i == 0:
			div_counter += 1
		i += 2
	if div_counter == 8:
		ans_counter += 1
	check_num += 2

print(ans_counter)






Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Time Limit Exceeded

Accepted
Problem: 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)?

Submission attempts (in order):

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

    
    return divisors



n = int(input())
for i in range(1, n+1, 2):
    if len(make_divisors(i)) == 8:
        print(i)
else:
    print(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)

    
    return divisors



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


Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
N=int(input())
c8=0 


for n in range((N-1)//2+1):
    c=0 

    for i in range(1,n+1): 
        c+=int(n%i==0)

    if c==8: 
        c8+=1

print(c8)

N=int(input())
c8=0 


for ni in range((N-1)//2+1):
    n=ni*2+1
    c=0 

    for i in range(1,n+1): 
        c+=int(n%i==0)

    if c==8: 
        c8+=1

print(c8)

Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
def make_divisors(n: int) -> list:
    return_list = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            return_list.append(i)
            if i != n // i:
                return_list.append(n//i)

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

def make_divisors(n: int) -> list:
    return_list = []
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            return_list.append(i)
            if i != n // i:
                return_list.append(n//i)

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

Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
import sys

n = int(sys.stdin.readline().rstrip("\n"))
count = 0
for num in range(27, n+1, 2):
    divisor = 1
    for p in range(1, num, 2):
        if num % p == 0:
            print(f"num: {num}, p: {p}")
            divisor += 1
    if divisor == 8:
        count += 1
print(count)


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)


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)

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)


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)


import sys

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


Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
import math
N=int(input())
def dnum(n):
  ret=0
  for i in range(1,int(math.sqrt(n))):
    if n%i==0:
      ret+=1
  return ret

ans=0

for i in range(N+1):
  if i%2==1 and dnum(i)==8:
    ans+=1

print(ans)

N=int(input())
def dnum(n):
  ret=0
  for i in range(1,n+1):
    if n%i==0:
      ret+=1
  return ret

ans=0

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

print(ans)


Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
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)

n=int(input())
if 104>=n:
  print(0)
elif 105<=n<=134:
  print(1)
elif 135<=n<=164:
  print(2)
elif 165<=n<=188:
  print(3)
elif 189<=n<=194:
  print(4)
else:
  print(5)

Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
n = int(input())
l = [i for i in range(1, n + 1) if i % 2 == 1]
cnt = 0
for w in l:
    i = w
    fct = []
    b, e = 3, 0
while b * b < w:
    while i % b == 0:
        i = i // b
        e = e + 1
        if e > 0:
            fct.append((b, e))
            b, e = b + 1, 0
if i > 1:
    fct.append((i, 1))
if len(fct) > 1:
    r = 1
    for j in fct:
        r = r * (j[1] + 1)
elif len(fct) == 1:
    r = fct[0][1] + 1
else:
    r = 0
if r == 8:
    cnt += 1
print(cnt)

n = int(input())
l = [i for i in range(1, n + 1) if i % 2 == 1]
print(l)
cnt = 0
for w in l:
i = w
fct = []
b, e = 3, 0
while b * b < w:
        while i % b == 0:
        i = i // b
        e = e + 1
        if e > 0:
        fct.append((b, e))
        b, e = b + 1, 0
if i > 1:
        fct.append((i, 1))
if len(fct) > 1:
        r = 1
        for j in fct:
        r = r * (j[1] + 1)
elif len(fct) == 1:
        r = fct[0][1] + 1
else:
        r = 0
if r == 8:
        print(w, fct, r)
        cnt += 1
print(cnt)

n = int(input())
l = [i for i in range(1, n + 1) if i % 2 == 1]
print(l)
cnt = 0
for w in l:
    i = w
    fct = []
    b, e = 3, 0
while b * b < w:
    while i % b == 0:
        i = i // b
        e = e + 1
        if e > 0:
            fct.append((b, e))
            b, e = b + 1, 0
if i > 1:
    fct.append((i, 1))
if len(fct) > 1:
    r = 1
    for j in fct:
        r = r * (j[1] + 1)
elif len(fct) == 1:
    r = fct[0][1] + 1
else:
    r = 0
if r == 8:
    cnt += 1
print(cnt)

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

Verdicts: Time Limit Exceeded

Runtime Error

Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
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)

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
  ans = 0
print(count)

Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
N = int(input())

def divlist(n):
    if n < 1:
        return []
    elif n == 1:
        return [1]
    else:
        div = [1]
        for i in range(2, n // 2 + 1):
            if n % i == 0:
                div.append(i)
        return div


ans = []

for i in range(1,N+1):
    if len(divlist(i)) == 8:
        ans.append(i)

print(len(ans))

N = int(input())

def divlist(n):
    if n < 1:
        return []
    elif n == 1:
        return [1]
    else:
        div = [1]
        for i in range(2, n // 2 + 1):
            if n % i == 0:
                div.append(i)
        return div


ans = []

for i in range(1,N+1):
    if i % 2 == 0:
        pass
    elif len(divlist(i)) == 8:
        ans.append(i)

print(len(ans))

N = 100

def divlist(n):
    if n < 1:
        return []
    elif n == 1:
        return [1]
    else:
        div = [1]
        for i in range(2, n // 2 + 1):
            if n % i == 0:
                div.append(i)
        return div


ans = []

for i in range(1,N+1):
    if i % 2 == 0:
        pass
    elif len(divlist(i)) == 8:
        ans.append(i)

print(len(ans))

N = int(input())

def divlist(n):
    if n < 1:
        return []
    elif n == 1:
        return [1]
    else:
        div = [1]
        for i in range(2, n + 1):
            if n % i == 0:
                div.append(i)
        return div


ans = []

for i in range(1,N+1):
    if i % 2 == 0:
        pass
    elif len(divlist(i)) == 8:
        ans.append(i)

print(len(ans))

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
def resolve():
    N = int(input())
    ans = 0
    for i in range(1, N+1, 2):
        tmp = make_divisors(i)
        if len(tmp) == 8:
            ans += 1
    print(ans)
    return

resolve()


def resolve():
    N = int(input())
    ans = 0
    for i in range(1, N+1, 2):
        tmp = 0
        for j in range(1, N+1):
            if i % j == 0:
                tmp += 1

        if tmp == 8:
            ans += 1
    print(ans)
    return

resolve()

Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):





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







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

Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
a=[s for s in range(int(input())+1)]
print(a.count(30)+a.count(105))

a=[s for s in range(int(input())+1)]
print(a.count(105)+a.count(165)+a.count(195)+a.count(189)+a.count(135))

Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
n=input("n=")

s=0
yakusu=0



for i in range(1,int(n)+1):
    s=0
    if i%2!=0:
        for k in range(1,i):
            if i%k==0:
                s+=1    
    if s==8:
        yakusu+=1         

print(yakusu)

n=input("n=")

s=0
yakusu=0



for i in range(1,int(n)+1):
    s=0
    if i%2!=0:
        for k in range(1,i+1):
            if i%k==0:
                s+=1    
    if s==8:
        yakusu+=1         

print(yakusu)

n=input()

s=0
yakusu=0



for i in range(1,int(n)+1):
    s=0
    if i%2!=0:
        for k in range(1,i+1):
            if i%k==0:
                s+=1    
    if s==8:
        yakusu+=1         

print(yakusu)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
N = int(input())
ans = 0
for i in range(1, 200, 2):
  cnt = 0
  for j in range(1, i + 1):
    if i % j == 0:
      cnt += 1
  print(j)
  if cnt == 8:
    ans += 1
print(ans)

N = int(input())
ans = 0
for i in range(1, 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)

Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
n=int(input())
ans=0
total=0
for i in range(n+1):
  for j in range(201):
    if i%j==0:
      ans+=1
  if ans==8:
    total+=1
print(total)

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


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


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
n=int(input())
count=0
for i in range(1,n+1):
    if n%1==0:
        count+=1
if count==8:
    print("1")
else:
    print("0")    

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

Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):





N = int(input())




ans_num = 0


for a in range(1, N + 1):
  yakusuu = []
  for i in range(1, a+1):
    if a % i == 0:
      yakusuu.append(i)
  if len(yakusuu) == 8:
    ans_num = ans_num + 1

print(ans_num)






N = int(input())




ans_num = 0


for a in range(1, N + 1):
  yakusuu = []
  if a % 2 == 0:
    continue
  for i in range(1, a+1):
    if a % i == 0:
      yakusuu.append(i)
  if len(yakusuu) == 8:
    ans_num = ans_num + 1

print(ans_num)

Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
N = int( input() )
a = 1
for i in range(1,N):
  if N % i == 0:
    a += 1
print(a)

N = int( input() )
a = 0

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

Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
import sys

def search_divisor_num_1(num):
    if num < 0:
        return None
    elif num == 1:
        return 1
    else:
        num_sqrt = math.floor(math.sqrt(num))
        prime_list = make_prime_list_2(num_sqrt)

        divisor_num = 1
        for prime in prime_list:
            count = 1
            while num % prime == 0:
                num //= prime
                count += 1
            divisor_num *= count

        if num != 1:
            divisor_num *= 2

        return divisor_num

n = int(input())
count =0
for i in range(1,n+1,2):
    tmp = search_divisor_num_1(i)
    if tmp == 8:
        count+=1
print(count)

import sys
import math
def search_divisor_num_1(num):
    if num < 0:
        return None
    elif num == 1:
        return 1
    else:
        num_sqrt = math.floor(math.sqrt(num))
        prime_list = make_prime_list_2(num_sqrt)

        divisor_num = 1
        for prime in prime_list:
            count = 1
            while num % prime == 0:
                num //= prime
                count += 1
            divisor_num *= count

        if num != 1:
            divisor_num *= 2

        return divisor_num

def make_prime_list_2(num):
    if num < 2:
        return []

    
    prime_list = [i for i in range(num + 1)]
    prime_list[1] = 0 
    num_sqrt = math.sqrt(num)

    for prime in prime_list:
        if prime == 0:
            continue
        if prime > num_sqrt:
            break

        for non_prime in range(2 * prime, num, prime):
            prime_list[non_prime] = 0

    return [prime for prime in prime_list if prime != 0]
    
n = int(input())
count =0
for i in range(1,n+1,2):
    tmp = search_divisor_num_1(i)
    if tmp == 8:
        count+=1
print(count)

Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
N = int(input())

def make_divisors(n):
    ans = 0
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            ans += 1
            if i != n // i:
                ans += 1
    return ans

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

print(ans)

N = int(input())

def make_divisors(n):
    ans = 0
    for i in range(1, int(n**0.5)+1):
        if n % i == 0:
            ans += 1
            if i != n // i:
                ans += 1
    return ans

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

print(ans)

Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
n = int(input())

l = []
for i in range(1,201,2):
    if i%2 == 0 and i%3 == 0 \
    and i%5 == 0 and i%7 == 0 \
    and i%11 == 0 and i%13 == 0 \
    and i%17 == 0 and i%19 == 0:
        print(i)
    else:
        continue


n = int(input())

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

a = [1]*(n+1)
for i in range(3,n+1,2):
    il = mymath.prime_decomposition(i)
    il_unique = list(set(il))
    ans = 1
    for j in il_unique:
        ans *= (il.count(j)+1)
    a[i] = max(a[i],ans)


print(a.count(8))

n = int(input())

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

a = [1]*(n+1)
for i in range(3,n+1,2):
    il = prime_decomposition(i)
    il_unique = list(set(il))
    ans = 1
    for j in il_unique:
        ans *= (il.count(j)+1)
    a[i] = max(a[i],ans)


print(a.count(8))

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
N=int(input())

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

N = int(input())

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

print(x)


Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
n = int(input())

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

    
    return divisors
result = 0

for i in range(1,n+1,2):
    if i > 200:
        break
    print(i)
    if len(make_divisors(i)) == 8:
        result += 1
    

print(result)


n = int(input())

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

    
    return divisors
result = 0

for i in range(1,n+1,2):
    if i > 200:
        break
    #print(i)
    if len(make_divisors(i)) == 8:
        result += 1
    

print(result)


Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
N = int(input())

if N < 105:
    print(0)
if N >= 105 and N < 135:
    print(1)
if N >= 135 and N < 165:
    print(2)
else:
    print(3)

N = int(input())

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

Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
from collections import defaultdict
N = int(input())
ans = 0
for i in range(N + 1):
  if i % 2 == 0:
    continue
  t, j, dic, r = i, 2, defaultdict(int), 1
  while True:
    while t % j == 0:
      t /= j
      dic[j] += 1
    if j * j > i:
      break
  if t > 1:
    dic[t] += 1
  for key in dic:
    r *= dic[key] + 1
  if r == 8:
    ans += 1
print(ans)

from collections import defaultdict
N = int(input())
ans = 0
for i in range(N + 1):
  if i % 2 == 0:
    continue
  t, j, dic, r = i, 2, defaultdict(int), 1
  while True:
    while t % j == 0:
      t /= j
      dic[j] += 1
    j += 1
    if j * j > i:
      break
  if t > 1:
    dic[t] += 1
  for key in dic:
    r *= dic[key] + 1
  if r == 8:
    ans += 1
print(ans)


Verdicts: Time Limit Exceeded

Accepted
Problem: 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)?

Submission attempts (in order):
n = int(input())
nSum = 0
for i in range(n):
    cnt = 0
    for j in range(i + 1):
        if (i + 1) % (j + 1) == 0:
            cnt += 1
    if cnt == 8 and (i + 1) % 2 != 0:
        nSum += 1
        a.append(i + 1)

print(nSum)


n = int(input())
a = [105, 135, 165, 189, 195]
for i in range(5):
    a[i] = 1 if n >= a[i] else 0
print(sum(a))


Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
n = int(input())
a = n//2
ans = 0
for j in range(1,n+1):
  	count = 1
	for i in range(a):
    	if n % i == 0:
      		count += 1
        if count >= 8:
          ans +=1
print(ans)

            


n = int(input())
a = n//2
ans = 0
for j in range(1,n+1):
    count = 1
    for i in range(1,a+1):
        if n % i == 0:
            count += 1
        if count >= 8 and j % 2 == 1:
            ans +=1
print(ans)

n = int(input())
a = n//2
ans = 0
for j in range(1,n+1):
  	count = 1
	for i in range(a):
    	if n % i == 0:
      		count += 1
        if count >= 8:
          ans +=1
print(ans)

            


n = int(input())

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

            

n = int(input())
a = n//2
ans = 0
for j in range(1,n+1):
    count = 1
    for i in range(1,a+1):
        if n % i == 0:
            count += 1
        if count >= 8:
            ans +=1
print(ans)

            


n = int(input())
a = n//2
ans = 0
for j in range(1,n+1):
    count = 1
    for i in range(a):
        if n % i == 0:
            count += 1
        if count >= 8:
            ans +=1
print(ans)


n = int(input())
a = n//2
ans = 0
for j in range(1,n+1):
    count = 1
    for i in range(1,a+1):
        if n % i == 0:
            count += 1
        if count >= 8 and i % 2 == 1:
            ans +=1
print(ans)

n = int(input())
a = n//2
ans = 0
for j in range(1,n+1):
    count = 0
    for i in range(1,j+1):
        if j % i == 0:
            count += 1
        if count >= 8 and j % 2 == 1:
            ans +=1
print(ans)


Verdicts: Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
N=int(input())

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

N=int(input())

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

N=int(input())

n=0
m=0
for i in range(N):

    n = 0
    for j in range(N):
        if (i+1)%(j+1)==0:
            
            n+=1
   # print("\tn: ", n, "m:", m)
    if n==8 and (i+1)%2!=0:
     m+=1
    # n=0
    
print(m)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
n=input()
s=0
a=[105,135,165,195,189]
for i in a:
  if n>=i:
    s+=1
print(s)

n=int(input())
s=0
a=[105,135,165,195,189]
for i in a:
 if n>=i:
  s+=1
print(s)

Verdicts: Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
n=int(input())
if n<104:
  print(0)
if n<135:
  print(1)
if n<165:
  print(2)
if n<189:
  print(3)
if n<195:
  print(4)

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


Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
N=int(input())
ans=0
for i in range(1,N + 1,2):
    cnt=0
    for j in range(1,i,1):
        if not i%j:
          cnt+=1
    if cnt==8:
      ans += 1
print(ans)


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

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


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: 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)?

Submission attempts (in order):
n = int(input())
if n < 105:
  print(0)
else:
  ans = 0
  for i in range(n,103,-2):
    count = 1
    for j in range(1,99,2):
      nj = n%j
      if nj == 0:
        count += 1
      if count == 9:
        ans -= 1
      if count == 8:
        ans += 1
  print(ans)

n = int(input())
if n %2 == 0:
  n -= 1
if n < 105:
  print(0)
else:
  ans = 0
  for i in range(n,103,-2):
    count = 1
    for j in range(1,101,2):
      nj = n%j
      if nj == 0:
        count += 1
      if count == 9:
        ans -= 1
      if count == 8:
        ans += 1
  print(ans)

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

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
n = int(input())
count = 0
for i in range(105, n + 1):
    insu = 0
    if i % 2 != 0:
        continue
    for j in range(1, i + 1):
        if i % j == 0:
            insu += 1
    if insu == 8:
        count += 1
print(count)


n = int(input())
count = 0
for i in range(105, n + 1):
    insu = 0
    if i % 2 == 0:
        continue
    for j in range(1, i + 1):
        if i % j == 0:
            insu += 1
    if insu == 8:
        count += 1
print(count)


Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
def divisor(n): 
    i = 1
    table = []
    while i * i <= n:
        if n % i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = list(set(table))
    return table

N = int(input())
total = 0

for n in range(1, N + 1, 2):
    print(n)
    if len(divisor(n)) == 8:
        total += 1

print(total)

def divisor(n): 
    i = 1
    table = []
    while i * i <= n:
        if n % i == 0:
            table.append(i)
            table.append(n//i)
        i += 1
    table = list(set(table))
    return table

N = int(input())
total = 0

for n in range(1, N + 1, 2):
    if len(divisor(n)) == 8:
        total += 1

print(total)

Verdicts: Wrong Answer

Accepted
Problem: 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)?

Submission attempts (in order):
n=int(input())
c=0
for i in range(1,n+1,2):
  count=0
  for j in range(1,i**0.5):
    if i%j==0:
      count+=1
  if count==8:
    c+=1
print(c)

n=int(input())
c=0
for i in range(1,n+2,2):
  count=0
  for j in range(1,int(i**0.5)):
    if i%j==0:
      count+=1
  if count==8:
    c+=1
print(c)


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


Verdicts: Runtime Error

Wrong Answer

Accepted