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

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

n=int(input())

result=0
for i in range(1,n+1):
  cnt=0
  if i%2==1:
    for j in range(1,i+1):
      if i%j==0:
        cnt+=1
        #print(i,j)
  if cnt==8:
    #print(">>",i)
    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):
# 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
    
    
    a = prime_factorize(i)
    # print(a)
    d_count = len(a)
    # print(f"{i} {d_count}")
    if d_count == 8:
        ans += 1
print(ans)

def make_divisors(n: int) -> list:
    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())
# print(f"{n}")

ans = 0
for i in range(1, n + 1, 2):
    divisors = make_divisors(i)
    if len(divisors) == 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())
count=0
for i in range(1):
    for j in range(1):
        for k in range(1):
            for l in range(1):
                for m in range(1):
                    if i*3+j*5+k*7+l*11+m*13<=N and i+j+k+l+m==3:
                        count+=1
print(count)

N=int(input())
ans=0
for i in range(1,N+1):
    if i%2==0:
        continue
    count=0
    for j in range(1,i+1):
        if i%j==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())
count=0
answer=0
for i in range(N):
    for j in range(i+1):
        if (i+1)%(j+1)==0:
            count=count+1
    if count==8:
        answer=answer+1
        count=0

print(answer)


n = int(input())
if 105>n: print(0)
elif 135>n: print(1)
elif 165>n: print(2)
elif 189>n: print(3)
elif 195>n: 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):
a = input()
ans = 0
if a >= 105:
    ans+=1
if a >= 135:
    ans+=1
if a >= 165:
    ans+=1
if a >= 189:
    ans+=1
if a >= 195:
    ans+=1
print(ans)

a = int(input())
ans = 0
if a >= 105:
    ans+=1
if a >= 135:
    ans+=1
if a >= 165:
    ans+=1
if a >= 189:
    ans+=1
if a >= 195:
    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(inut())
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)

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):
N=int(input())
def yakusuu(n):
  num=0
  for i in range(1,n):
    if n%i==0:
      num=num+1
  return num==8
ans=0
for i in range(n):
  if def(i):
    ans=ans+1
print(ans)
  
      

#import math
N=int(input())
def yakusuu(n):
  num=_0
  for i in range(1,n):
    if n%i==0:
      num=num+1
  return num==8
ans=0
for i in range(n):
  if def(i):
    ans=ans+1
print(ans)
  
      

n=int(input())
def yakusuu(n):
  num=0
  if n%2==1:
    for i in range(1,n+1):
      if n%i==0:
        num=num+1
  return num 

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

Verdicts: Runtime Error

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

count = 0

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

N = int(input())

count = 0

for i in range(1, N+1, 2):
  tmp = 0
  for j in range(1, i+1):
    if i % j == 0:
      tmp += 1
  # print(tmp)
  if tmp == 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):
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)

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

import math

def countDividers(n):
    divisors = []
    for i in range(1, int(math.sqrt(n))+1):
        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)


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())
l=list(range(1,n+1))
k=[27,105,125,165,195]
lk=set(l) & set(ｋ)
print(len(lk))

n=int(input())
l=list(range(1,n+1))
k=[105,135,165,189,195]
lk=set(l) & set(ｋ)
print(len(lk))

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

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

    if len(a)==8:
        count+=1

print(count)

N=in(input())
conut=0

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

    if len(a)==8:
        count+=1

print(count)

N=int(input())
conut=0

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

    if len(a)==8:
        count+=1

print(count)

# -*- coding: utf-8 -*-

N = int(input())
count = 0

for i in range(1, N + 1):
    a = []
    if i % 2 == 0:
        continue

    for j in range(1, i + 1):
        if i % j == 0:
            a.append(j)

    if len(a) == 8:
        count += 1

print(count)




Verdicts: Runtime Error

Runtime Error

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())
count1 = 0
for i in range(1,N+1):
  if i % 2 != 0:
  	count2 = 0  
    for j in range(1,i+1):
      if i % j == 0:
        count2 += 1
      if count2 == 8:
        count1 += 1
print(count1)
        
  

N = int(input())
count1 = 0
for i in range(1,N+1):
  if i % 2 != 0: #Odd Number
    count2 = 0  
    for j in range(1,i+1):
      if i % j == 0:
        count2 += 1
      if count2 == 8:
        count1 += 1
print(count1)

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

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

print(Ans)

N = int(input())

Ans = 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 == 7:
        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())
if !n%2:
    n += 1

result = 0

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

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

    if cnt >= 8:
        result += 1

print(result)

n = int(input())
if !n%2:
    n += 1

result = 0

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

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

    if cnt >= 8:
        result += 1

print(result)

n = int(input())
if not n%2:
    n -= 1

result = 0

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

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

    if cnt >= 8:
        result += 1

print(result)

Verdicts: Runtime Error

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


N = int(input())

count=0
mitasuN=[]
for i in range(1,N,2):
    tmp_s = make_divisors(i)
    # print(tmp_s)
    if len(tmp_s)==8:
        count+=1
        mitasuN.append(i)
# print(mitasuN)
print(count)



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


N = int(input())

count=0
mitasuN=[]
for i in range(1,N+1,2):
    tmp_s = make_divisors(i)
    # print(tmp_s)
    if len(tmp_s)==8:
        count+=1
        mitasuN.append(i)
# print(mitasuN)
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
for n in range(1, N+1, 2):
    count_fact = 0
    for i in range(1, n+1):
        if n%i == 0:
            count_fact += 1
    else:
        if count_fact == 8:
            print(n)
            count += 1

print(count)


N = int(input())

count = 0
for n in range(1, N+1, 2):
    count_fact = 0
    for i in range(1, n+1):
        if n%i == 0:
            count_fact += 1
    else:
        if count_fact == 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):
from math import sqrt, ceil

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


from math import sqrt, ceil

N = int(input())
ans = 0
for n in range(1, N+1, 2):
    count = 0
    for i in range(1, ceil(sqrt(n))+1):
        if n%i == 0:
            count += 2
    if count == 8:
        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())
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)
    
    return divisors

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


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)
    
    return divisors

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

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

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

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

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

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 >= 189:
  print(2)
elif n>=135:
  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: 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
input = sys.stdin.readline
n=int(input())
import fractions

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

import sys
input = sys.stdin.readline
n=int(input())

ans=0
if n<=104:
    print(0)
else:
    ans=0
    for i in range(105,n+1,2):
        c=0
        for j in range(1,i+1):
            if i%j==0:
                c+=1
        if c==8:
            ans+=1
    print(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())
b=[3*5*7, 3*5*9, 3*5*11, 27*7, 3*5*13]
print(b)
a=0
for i in range(len(b)):
    if b[i]<=n:
        a+=1
print(a)


n=int(input())
b=[3*5*7, 3*5*9, 3*5*11, 27*7, 3*5*13]
a=0
for i in range(len(b)):
    if b[i]<=n:
        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):
N=input()
div=0
A=0
B=0
count=0
answer=0
for i in range(1,N+1,2):
  div=0
  count=0
  while True:
    div+=1
    if i%div==0:
      A=div
      B=N/siv
      count+=1
    if B=count:
      if A<B and count==4:
        answer+=1  
      break
print(answer)

N=int(input())
div=0
A=0
B=N
count=0
answer=0
for i in range(1,N+1,2):
  div=0
  count=0
  while True:
    div+=1
    if i%div==0:
      A=div
      B=i/div
      if A<B:
        count+=1
    if A>=B:
      if count==4:
        answer+=1  
      break
print(answer)

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

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 = count + 1
  if count == 8:
    ans = 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):
s = list(map(int, list(input())))
k = int(input())

cnt1 = 0
if s[0]==1:
    cnt1 += 1
    
for i in range(1, len(s)):
    if s[0] == 1 and s[i-1] == 1 and s[i] == s[i-1]:
        cnt1 += 1
        
if k <= cnt1:
    print(1)
elif cnt1 == 0:
    print(s[0])
else:
    print(s[cnt1])

import sys
n = int(input())


cn = 0

cy = 0

if n < 105:
    print(0)
    sys.exit()
    
for i in range(105, n+1):
    if i % 2 == 0:
        continue

    for j in range(1, i+1):
        if i % j == 0:
            cy += 1
    if cy == 8:
        cn += 1
    cy = 0
print(cn)

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

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)
    



n = int(input())
counter = 0
for i in range(1, n+1, 2):
    divisor_counter = 0
    for j in range(1, i+1):
        if i % j == 0:
            divisor_counter += 1

    if divisor_counter == 8:
        counter += 1
print(counter)

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
a=3
while a<=n:
    b=a*(a+2)*(a+4)
    if b==
    elif b<=n:
        c+=1
        a+=2
    else:
        break
print(c)


n=int(input())
l=[]
for i in range(3,n+1,2):
    c=0
    for k in range(1,i+1):
        if i%k==0:
            c+=1
        else:
            pass
    l.append(c)
print(l.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())
count = 0
for i in range(1, N + 1):
    c = 0
    while i*i <= N:
        if i*i == N:
            c += 1
        elif N % i == 0:
            c += 2
    if c == 8:
        count += 1
print(count)

N = int(input())
count = 0
for i in range(1, N + 1, 2):
    c = 0
    j = 1
    while j*j <= i:
        if j*j == i:
            c += 1
        elif i % j == 0:
            c += 2
        j += 1
    if c == 8:
        count += 1
print(count)

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

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

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 m in range(1, n+1):
	if m%2 != 1:
		continue
	cnt = 0
	for k in range(1,m+1):
		if m%k == 0:
			cnt += 1
		if cnt>8:
			break
	if cnt == 8:
		print(m)
		ans += 1

print(ans)

n = int(input())
ans = 0
for m in range(1, n+1):
	if m%2 != 1:
		continue
	cnt = 0
	for k in range(1,m+1):
		if m%k == 0:
			cnt += 1
		if cnt>8:
			break
	if cnt == 8:
		# print(m)
		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())
res = 0
for i in range(1,n+1, 2):
	if i % 1:
		cnt = 0
		for j in range(i+1):
			if i % j == 0:
				cnt += 1
		if cnt == 8:
			res += 1

print(res)

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


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 = float(input())
t = 3
prime_number = []
while t <= N / 15.0:
    l = []
    for i in range(t+1):
        if i != 0:
            if t % i == 0:
                l.append(i)
    if l == [1, t]:
        prime_number.append(t)
    t += 1
n = len(prime_number)
ans = 0
if n < 3:
    print(0)
    sys.exit()
else:
    for i in prime_number:
        for j in prime_number:
            if j != i:
                for k in prime_number:
                    if k != i and k != j:
                        if i * j * k <= N:
                            ans += 1
ans = ans / 6
print(ans)
if N >= 189:
    ans += 2
elif N >= 135:
    ans += 1
print(int(ans))


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

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

n = int(input())
ans = 0
def cou(n):
  d = 0
  for i in range(1,n+1):
    if n % i == 0:
      d += 1
  return(d)
for j in range(1,n+1,2):
  if cou(j) == 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())

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

ans = 0
for i in range(1,n+1):
    if i % 2 == 0:
        continue
    if solve(i) == 8:
        ans += 1

print(ans

n = int(input())

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

ans = 0
for i in range(1,n+1):
    if i % 2 == 0:
        continue
    if solve(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().strip())


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

count = 0
for j in range(N):
  if N%2==0:
    continue
  if len(divisor(j)) == 8:
    count += 1
print(count)

N = int(input().strip())


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

count = 0
for j in range(1,N+1):
  if j % 2 == 0:
    continue
  if len(divisor(j)) == 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):
import math
n = int(input())

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]

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


sum = 0
for i in range(n+1):
  if n % 2 !=0 and search_divisor_num_1(n) == 8:
    sum += 1
print(sum)

n = int(input())

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

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

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

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

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 = []
for i in range(n):
  temp = []
  for j in range(1, i + 1, 2):
    if i % j == 0:
      temp.append(j)
  if len(temp) == 8:
    ans.append(i)
    
print(len(ans))

n = int(input())
ans = []
for i in range(1, n + 1):
  temp = []
  for j in range(1, i + 1, 2):
    if i % j == 0:
      temp.append(j)
  if len(temp) == 8:
    ans.append(i)
    
print(len(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):
def yakusu(m):
  cnt=0
  for i in range(m//2):
    if m%i==0:
      cnt+=1
  return cnt
ans=0
n=int(input())
for j in range(1,n+1):
  if yakusu(j)==8 and n%2!=0:
    ans+=1
print(ans)
               

    

def yakusu(m):
  cnt=1
  for i in range(1,(m//2)+1):
    if m%i==0:
      cnt+=1
  return cnt
ans=0
n=int(input())
for j in range(1,n+1):
  if yakusu(j)==8 and n%2!=0:
    ans+=1
print(ans)
               

    


def yakusu(m):
  cnt=1
  for i in range(1,(m//2)+1):
    if m%i==0:
      cnt+=1
  return cnt
ans=0
n=int(input())
for j in range(1,n+1):
  if yakusu(j)==8 and j%2!=0:
    ans+=1
print(ans)
               

    


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):
# -*- coding: utf-8 -*-
N = int(input())

if N < 105:
    ans = 0
else:
    ans = 0
    for i in range(103,N,2):
        cnt = 0

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

        if cnt == 8:
            ans += 1


print(ans)

# -*- coding: utf-8 -*-
N = int(input())

if N < 105:
    ans = 0
else:
    ans = 1
    for i in range(107, N+2, 2):
        cnt = 0
        for j in range(1, N+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):
def f(n):
    a = []
    for i in range(1,n+1):
        if n%i == 0:
            a.append(i)
    return a

n = int(input())
count = 0
for i in range(1,n+1):
    ff = f(i)
    if len(ff) == 8:
        count+=1
print(count)


def f(n):
    a = []
    for i in range(1,n+1):
        if n%i == 0:
            a.append(i)
    return a

n = int(input())
count = 0
for i in range(1,n+1,2):
    ff = f(i)
    #print(ff)
    if len(ff) == 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 count(n):
  ans = 0
  for i in range(1,n+1):
    if n % i == 0:
      ans += 1
  return ans

ans = 0
a = (int(i) for i in input().split())
for i in range(1,n+1):
  if count(i) == 8:
    ans += 1
print(ans)

    

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

ans = 0
N = (int(i) for i in input().split())
for i in range(1,N+1):
  if count(i) == 8:
    ans += 1
print(ans)

    

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

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


Verdicts: Runtime Error

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, = list(map(int,input().split()))

ans = 0

for i in range(N):
    num = 0
    for j in range(200):
        if  N % j == 0:
        num += 1
    if  num == 8:
    ans += 1

print(ans)



N, = list(map(int,input().split()))

ans = 0

for i in range(N+1):
    if  i % 2 == 1:
        num = 0
        for j in range(1,201):
            if  i % j == 0:
                num += 1
                if  num == 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())
print(n)

def divisor(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

l = len(divisor(n))

if l == 8:
    print(1)
else:
    print(0)

n = int(input())

def divisor(n):
    res = 0
    for i in range(1,n+1):
        if n % i  == 0:
            res += 1
            if i != n//i:
                res += 1
    return res

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

n = int(input())

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

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

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())
cnt=0
if N <105:
  print(0)
else:
  for i in range(105,N,2):
    temp=0
    for j in range(3,15,2):
        if i%j==0:
            temp+=1
    if temp==3:
        cnt+=1
print(cnt)

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

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

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

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

print(cnt)


Verdicts: Wrong Answer

Wrong Answer

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

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,2):
    if(len(make_divisors(i)) == 8):
        counter+=1
print(counter)

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 j in range(105,n+1,2)  
  d=[]
  for i in range(1,int(j**0.5)+1):
        if j%i==0:
            d.append(i)
            if i!=n//i:
                d.append(n//i)
  if len(d)==8:
    c+=1
print(c)

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

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

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

N=int(input())
count=0
for i in range(N):
    if sympy.divisor_count(i+1)==8 and (i+1)%2==1:
        count+=1
input(count)


N=int(input())
count=0
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())
cnt=0
y=[]

for i in range(1,N+1,2):
    for j in range(1,i+1):
        if i%j == 0:
            y.append(j)
    if len(y)==8:
        cnt += 1
        y.clear()
print(cnt)

N = int(input())
cnt=0
y=[]

for i in range(1,N+1,2):
    for j in range(1,i):
        if i%j == 0:
            y.append(j)
    if len(y)==8:
        cnt += 1
        y.clear()
print(cnt)

N = int(input())
cnt=0
y=[]

for i in range(1,N+1,2):
    for j in range(1,i+1):
        if i%j == 0:
            y.append(j)
    if len(y)==8:
        cnt += 1
        print(y)
    y.clear()
print(cnt)

N = int(input())
cnt=0
y=[]

for i in range(1,N+1,2):
    for j in range(1,i+1):
        if i%j == 0:
            y.append(j)
    if len(y)==8:
        cnt += 1
    y.clear()
print(cnt)


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):
print([[i%j==0 for j in range(1,i)].count(0) for i in range(1,int(input())+1,2)].count(7))

print([[i%j for j in range(1,i)].count(0) for i in range(1,int(input())+1,2)].count(7))

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

li = [3,5,7,11,13]
ans = 0
for i in range(1,n+1):
    cnt = 0
    for j in range(10):
        if i%li[j]==0:
            cnt += 1
    if cnt ==3:
        ans +=1

if n>=135:
    ans += 1
if n>=189:
    ans += 1

print(ans)

n = int(input())

li = [3,5,7,11,13]
ans = 0
for i in range(1,n+1):
    cnt = 0
    for j in range(5):
        if i%li[j]==0:
            cnt += 1
    if cnt ==3:
        ans +=1

if n>=135:
    ans += 1
if n>=189:
    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())
elif n<105:
  print(0)
elif n<135:
  print(1)
elif n<165:
  print(2)
else:
  print(3)


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

count = 0
divi_count = 0
for n in range(1, N+1, 2):
    for divi in range(1, n+1):
        if n%divi == 0:
            divi_count += 1
    if divi_count == 8:
        count += 1
print(count)


N = int(input())

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

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

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


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

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

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

print(ans)

def countDiv(x):
  count = 0
  for i in range(1,x+1):
    if x % i == 0:
      count += 1
  return count
 
n = int(input())
ans = 0
for i in range(1,n+1,2):
  #print(i, countDiv(i))
  if countDiv(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())

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

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


N=int(input())

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

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


Verdicts: Wrong Answer

Accepted