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())
x = []
res = 0
for i in range(3, N+1, 2):
    if len(x) == 0:
        x.append(i)
    else:
        y = i
        z = {}
        flag = True
        while flag:
            flag = False
            for j in x:
                if y % j == 0:
                    y /= j
                    z.setdefault(j, 0)
                    z[j] += 1
                    flag = True
        if y == i:
            x.append(i)
        else:
            yakusu = 1
            for j in z.values():
                yakusu *= j + 1
            if yakusu == 8:
                print(i)
                res += 1
print(res) 

N = int(input())
x = []
res = 0
for i in range(3, N+1, 2):
    if len(x) == 0:
        x.append(i)
    else:
        y = i
        z = {}
        flag = True
        while flag:
            flag = False
            for j in x:
                if y % j == 0:
                    y /= j
                    z.setdefault(j, 0)
                    z[j] += 1
                    flag = True
        if y == i:
            x.append(i)
        else:
            yakusu = 1
            for j in z.values():
                yakusu *= j + 1
            if yakusu == 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):
n = int(input())
ans =0
for i in range(1,n+1):
    a = 0
    for l in range(1,i+1):
        if i%l == 0:
            a += 1
    if a == 8:
        ans += 1
print(ans)


n = int(input())
ans = 0
for i in range(1,n+1):
    a = 0
    for l in range(1,i+1):
        if i%l == 0:
            a += 1
    if a == 8 and i % 2 != 0:
        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())

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

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


N = int(input())
 
def count_divisors(n):
    count = 0
    for i in range(1, n + 1):
        if n % i == 0:
            count += 1
    return count
 
ans = 0
for i in range(1, N + 1, 2):
    if count_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())
ans=0
for i in range(1,n+1):
    count=0
    if(n%2==1):
       for j in range(1,n+1):
           if(i%j==0):
               count+=1
           else:
               continue
       if(count==8):
           ans+=1
       else:
           continue
    else:
        continue
print(ans)

a=0
for i in range(1,int(input())+1):
    c=0
    if(i%2==1):
        for j in range(1,i+1):
            if(i%j==0):
                c+=1
        if(c==8):
            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):
anslist=(3*5*7,
         3*5*11,
         3*5*13,
        3*5**3,5*3**3,7*3**3)

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

def divisor(x):
  ret=[]
  for i in range(1,x+1):
    if x%i==0:
      ret.append(i)
  return len(ret)

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

def divisor(x):
  ret=[]
  for i in range(1,x+1):
    if x%i==0:
      ret.append(i)
  return len(ret)

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

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

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

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

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

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

Verdicts: Runtime Error

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

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

print(ans)

n = int(input())
count = 0
ans = 0

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

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

import sys
import math

N = int(input())


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

    return ans


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

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

print(ans)



import sys
import math

N = int(input())


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

    return ans


ans = 0
for i in range(105, N + 1, 2):  
    if divisor(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):
# B - 105

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

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

# B - 105

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

N = int(input())
ans = 0
for i in range(105, N+1, 2):
    Y = yakusu_rekkyo(i)
    if len(Y) == 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)
elif 105<=n and n<135:
    print(1)
elif 135=n and n<175:
    print(2)
elif 175<=n and n<189:
    print(3)
else:
    print(4)

    

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


n=int(input())
ans=0
for i in range(1,n+1,2):
    cnt=0
    for j in range(1,n+1):
        if i%j==0:
            cnt+=1
    if cnt==8:
        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):
n = int(input())
if(n<27):
    print("0")
elif(n<105):
    print("1")
elif(n<125):
    print("2")
elif(n<135):
    print("3")
elif(n<165):
    print("4")
elif(n<189):
    print("5")
else:
    print("6")



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):
def divisor_all(n): 
    l = [1,n]
    for i in range(2,int(pow(n,1/2))+1):
        if n % i == 0:
            if i == n//i:
                l.append(i)
            else:
                l.append(i)
                l.append(n//i)
    l.sort()
    return l # list
N = int(input())
ans = 0
for i in range(1,N+1):
    if len(divisor_all(i))==8:
        ans += 1
print(ans)

N = int(input())
def divisor_all(n): 
    l = [1,n]
    for i in range(2,int(pow(n,1/2))+1):
        if n % i == 0:
            if i == n//i:
                l.append(i)
            else:
                l.append(i)
                l.append(n//i)
    l.sort()
    return l # list
ans = 0
for i in range(1,N+1,2):
    if len(divisor_all(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())
cnt=0
for i in range(1,n+1):
    if n%i == 0:
        cnt += 1
print(cnt)


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

sympy.divisors(10**9)

n = int(input())
print(len(list(filter(lambda x: sympy.divisors(x) == 8, range(0, n + 1)))))

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())
print(len(list(filter(lambda x: len(make_divisors(x)) == 8, range(1, n + 1,2)))))


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<189:
  print(3)
elif n<195:
  print(4)
else:
  print(5)

n=int(input())
ans=0
for i in range(1,n+1):
  if i%2==0:
    continue
  tmp=0
  for j in range(1,n+1):
    if i%j==0:
      tmp+=1
  if tmp==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
for x in range(N):
    if x % 2 == 1:
        tx = x
        ac, bc, cc = 0, 0, 0 
        a,b,c = False, False, False
        while (x % 2 == 0) or (x % 3 == 0) or (x % 5 == 0):
            if x % 2 == 0:
                ac += 1
                x = x // 2
                a = True
            elif x % 3 == 0:
                bc += 1
                x = x // 3
                b = True
            elif x % 5 == 0:
                cc += 1
                x = x // 5
                c = True
        count = (ac + 1) * (bc + 1) * (cc + 1)
        if count == 4:
            
            ans += 1
print(ans)         


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

N = int(input())
print([0, 1][if N > 105])

N = int(input())
print([0, 1][if N > 105]

N = int(input())
ans = 0
for x in range(1,N):
    if x % 2 == 1:
        ac, bc, cc = 0, 0, 0
        a,b,c = False, False, False
        while x % 2 == 0:
            ac += 1
            x = x // 2
            a = True
        while x % 3 == 0:
            bc += 1
            x = x // 3
            b = True
        while x % 5 == 0:
            cc += 1
            x = x // 5
            c = True
        count = (ac + a) * (bc + b) * (cc + c)
        if count == 8:
            ans += 1
print(ans)         


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

Verdicts: Wrong Answer

Wrong Answer

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

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

print(res)

n = int(input())

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

print(res)

n = int(input())

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

print(res)

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

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

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

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

for i in range(n+1):
  if len(mkdiv(i))==8 and i%2:
    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
l = []
for i in range(1, n+1):
    if i % 2 == 0:
        exit()
    else: 
        if n % i == 0:
            l.append(i)
            if len(l) == 8:
                cnt += 1
print(cnt)


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

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


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

n = int(input())
cnt = 0

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

Verdicts: 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())
end=int(math.sqrt(N))
cnt=0
for i in range(1,N+1):
    if N%i==0 :
         cnt=cnt+1

print(cnt)

N=int(input())
num=0
for j in range(1,N+1,2):
	cnt=0
	for i in range(1,j+1):
#        print(i)
#        print(j)
        if j%i==0 :
            cnt=cnt+1
    if cnt==8 :
#        print(cnt)
        num+=1
#    print("---")
print(num)


N=int(input())
num=0
for j in range(1,N+1,2):
  cnt=0
    for i in range(1,j+1):
#        print(i)
#        print(j)
        if j%i==0 :
            cnt=cnt+1
    if cnt==8 :
#        print(cnt)
        num+=1
#    print("---")
print(num)


import math
N=int(input())

cnt=0
for j in range(1,N+1,2):
    n=int(math.sqrt(j))
    yaku=0
    for i in range(n):
        if j%(i+1)==0:
            yaku+=1
    #print(j,yaku)
    if yaku*2==8:
        cnt+=1
print(cnt)

Verdicts: Wrong Answer

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

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




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




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




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
sqrt = 1

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

print(ans)


n = int(input())

ans = 0
sqrt = 1

for i in range(1,n+1,2):
    if i == sqrt*sqrt:
        sqrt += 1
        continue
    elif i > sqrt*sqrt:
        sqrt += 1
    count = 0
    for j in range(1,sqrt,2):
        if i%j == 0:
            count += 1
    if count == 4:
        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):
a=int(input())
c=[i for i in [I for I in range(2,100)] if a%i==0]
print(len(set([a//I for I in c]+c+[a,1])))

a=int(input())
if a<105:print(0)
else:
    print(sum([1 for i in range(105,a+1,2) if len([I for I in range(1,a+1,2) if i%I==0])==8]))

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,2):
  cnt=0
  for j in range(1,i+1):
    if i%j==0:
      cnt+=1
  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())
d = {i: 0 for i in range(n+1)}
for i in range(1, n+1):
    for j in range(1, n+1):
        if j%i == 0:
            d[j] +=1
for k, v in d.items():
    if k%2 == 1 and v == 8:
        print(k)

n = int(input())
d = {i: 0 for i in range(n+1)}
for i in range(1, n+1):
    for j in range(1, n+1):
        if j%i == 0:
            d[j] +=1
a = 0
for k, v in d.items():
    if k%2 == 1 and v == 8:
        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):
def test():
    n = int(input())
    count = 0
    a = []
    for i in range(1,n+1):
        if i % 2 != 0:
            for j in range(1,i+1):
                if i % j == 0:
                    count += 1
        a.append(count)
        count = 0
    print(a)
    print(a.count(8))


if __name__ == "__main__":
    test()


def test():
    n = int(input())
    count = 0
    a = []
    for i in range(1,n+1):
        if i % 2 != 0:
            for j in range(1,i+1):
                if i % j == 0:
                    count += 1
        a.append(count)
        count = 0
    print(a.count(8))


if __name__ == "__main__":
    test()


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

N = int(input())

count = 0
for i in range(1, N+1, 2):
    c = 0
    for j in range(1, i+1):
        if i % j == 0:
            c += 1
    
    if c == 8:
        count += 1
else:
    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())
print(4 if n >= 189 else 3 if n >= 135 else 2 if n >= 105 else 0)

# a*b*c : 105, 165
# a^3*b : 135, 189

n = int(input())
print(4 if n >= 189 else 3 if n >= 165 else if 2 if n >=n 135 else 1 if n >= 105 else 0)

k = [104,134,164,188,194]
n = int(input())
k.append(n)
print(sorted(k).index(n))

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

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

print(ans)


 n = int(input())

ans = 0
for i in range(1, n+1):
    tmp = 0
    for j in range(1, i/2+1):
        if i % j == 0:
            tep += 1

    if tmp == 8:
        ans += 1

print(ans)

n = int(input())

ans = 0
for i in range(1, n+1, 2):
    tmp = 0
    for j in range(1, n/2):
        if i % j == 0:
            tmp += 1

    if tmp == 8:
        ans += 1

print(ans)


n = int(input())

ans = 0
for i in range(1, n+1, 2):
    tmp = 0
    for j in range(1, n/2):
        if i % j == 0:
            tmp += 1

    if tmp == 4:
        ans += 1

print(ans)


n = int(input())

ans = 0
for i in range(1, n+1):
    tmp = 0
    for j in range(1, i/2+1):
        if n % j == 0:
            tep += 1

    if tmp == 8:
        ans += 1

print(ans)

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)


Verdicts: Runtime Error

Runtime Error

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


i = int(input())

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



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

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())
c = 0
for  i in range(1,N+1):
  li = []
  if i < 10:
    continue
  else:
    k = i
    for j in range(2,int(i**(0.5)+1)):
      while k % j == 0:
        k = k/j
        li.append(j)
    if len(li) == 8:
      c += 1
print(c)


N = int(input())
c = 0
for  i in range(1,N+1):
  li = []
  if i < 10:
    continue
  else:
    k = i
    for j in range(2,int(i**(0.5)+3)):
      d = 1
      while k % j == 0:
        k = k/j
        d += 1
      if d != 1:
        li.append(d)
    ss = 1
    for x in li:
      ss *= x
    if ss == 8:
      #print(i)
      c += 1
    
print(c)


N = int(input())
c = 0
for  i in range(1,N+1):
  li = []
  if i < 10:
    continue
  else:
    k = i
    for j in range(2,int(i**(0.5)+1)):
      d = 1
      while k % j == 0:
        k = k/j
        d += 1
      if d != 1:
        li.append(d)
    ss = 1
    for x in li:
      ss *= x
    if ss == 8:
      c += 1
    
print(c)


N = int(input())
c = 0
for  i in rrange(1,N+1):
  li = []
  if i < 10:
    continue
  else:
    k = i
    for j in range(2,int(i**(0.5)+1)):
      while k % j == 0:
        k = k/j
        li.append(j)
    if len(li) == 8:
      c += 1
print(c)

N = int(input())
c = 0
for  i in range(1,N+1):
  if i % 2 == 0:
    continue
  li = []
  if i < 10:
    continue
  else:
    k = i
    for j in range(2,int(i**(0.5)+3)):
      d = 1
      while k % j == 0:
        k = k/j
        d += 1
      if d != 1:
        li.append(d)
    ss = 1
    for x in li:
      ss *= x
    if ss == 8:
      print(i)
      c += 1
    
print(c)


N = int(input())
c = 0
for  i in range(1,N+1):
  if i % 2 == 0:
    continue
  li = []
  if i < 10:
    continue
  else:
    k = i
    for j in range(2,int(i**(0.5)+3)):
      d = 1
      while k % j == 0:
        k = k/j
        d += 1
      if d != 1:
        li.append(d)
    ss = 1
    for x in li:
      ss *= x
    if ss == 8:
      #print(i)
      c += 1
    
print(c)


Verdicts: Wrong Answer

Wrong Answer

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())
ans=0
for n in range(1,N+1):
  _ans=0
  for x in range(1,n+1):
    if n%x==0:
      _ans+=1
  if _ans==8:
    ans+=1
print(ans)

N=int(input())
ans=0
for n in range(1,N+1,2):
  _ans=0
  for x in range(1,n+1):
    if n%x==0:
      _ans+=1
  if _ans==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()

dp = [0] * 201
ans = 0

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

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

print(ans)

import sys


def main():
    n = int(sys.stdin.readline())

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

    dp = [0] * 201
    ans = 0

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

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

    print(ans)


if __name__ == "__main__":
    main()


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

for i in range(107, 200, 2):
    divisors = []
    for j in range(1, 201):
        if i%j == 0:
            divisors.append(j)
    if len(divisors) == 8:
        divisors_8.append(i)

n = int(input())

divisors_8.append(n)
divisors_8.sort()
result = divisors_8.index(n)

if n not in divisors_8:
    print(result)
else:
    print(result+1)

a,b = map(int,input().split())
if (a*b)%2 == 0:
    print("No")
else:
    print("Yes")

divisors_8 = [105]

for i in range(107, 200, 2):
    divisors = []
    for j in range(1, 201):
        if i%j == 0:
            divisors.append(j)
    if len(divisors) == 8:
        divisors_8.append(i)

n = int(input())

divisors_8.append(n)
divisors_8.sort()
result = divisors_8.index(n)
divisors_8.remove(n)

if n not in divisors_8:
    print(result)
else:
    print(result+1)

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())
// 3*5*7, 3*5*11, 3*5*13
if n < 3*5*7:
    print(0)
elif n < 3*5*11:
    print(1)
elif n < 3*5*13:
    print(2)
else:
    print(3)

def fact(n):
    num = n
    cnt = [0]*(n+1)
    ans = 1
    for i in range(2, n+1):
        while num % i == 0:
            cnt[i] += 1
            num /= i
    for i in range(2, n+1):
        ans *= cnt[i] + 1
    return ans

n = int(input())

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


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



N = int(input())
ans = 0
if N < 105:
  pass
else:
  for i in range(1, N+1):
    cnt = 0
    for j in range(1, N+1):
	    if j % i == 0:
          cnt += 1
    if cnt == 8:
      ans += 1
      
print(ans)  

N = int(input())
ans = 0
if N < 105:
  pass
else:
  for i in range(105, N+1, 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

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()) 
t = 0
for k in range(1,n,2):
  K = k
  ans = 1
  for i in range(1,int(K/2)+1,2):
    if k % i == 0:
      ans  += 1
  if ans == 8:
    t += 1
print(t)

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

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(n):
  a=[]
  for i in range(1,n+1):
    if n%i==0:a.append(i)
  return a
a=0;n=int(input())
for i in range(1,n+1):a+=(1if len(yakusu(i))==8else 0)
print(a)

def yakusu(n):
  a=[]
  for i in range(1,n+1):
    if n%i==0:a.append(i)
  return a
a=0;n=int(input())
for i in range(1,n+1):a+=(1if len(yakusu(i))==8and i%2==1else 0)
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=int(input())
def prime(n):
  cnt=0
  for i in range(2,n):
    if n%2==0:
      cnt+=1
    
  return cnt

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


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

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

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

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

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

import time, timeit

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

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

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

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

if __name__ == '__main__':
    n = int(input())
    c = 0

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

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

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


n = int(input())

div8 = []
for i in range(1, n+1, 2):
    count = 0
    for j in range(1, n+1):
        if (i % j) == 0:
            count += 1
    if count == 8:
        div8.append(i)

print(len(div8))

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

a=int(input())
if a<105:
  print(0)
elif 105<=a<135:
  print(1)
elif 135<=a<165:
  print(2)
elif 165<=a<189:
  print(3)
elif:189<=a:
  print(4)

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

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

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

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

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

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, N+1, 2):
    count = 0
    for j in range(2, i):
        if i % j == 0:
            count += 1
    if count == 8:
        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+1, 2):
        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())
ans = 0
i = 3
while i <= N:
  div = 0
  for j in range(2,i):
    if i % j == 0:
      div += 1
  if div == 8:
    ans += 1
  i += 2
else:
  print(ans)

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

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

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

n = int(input())

ans = 0
i = 1
while i <=n:
    j = 1
    cnt = 0
    while j <= i:
        if i%j == 0:
            cnt +=1
            #print(i,cnt,j)
        j +=1
    if cnt == 8 and i%2 ==1:
        #print(i)
        ans += 1
    i +=1
print(ans)

Verdicts: 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):
import math
def countYakusu(n):
  count = 0
  for i in range(n):
    if n % (i+1) == 0:
      count = count + 1
  return count == 8

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


import math
def countYakusu(n):
  count = 0
  for i in range(math.floor(n**0.5)):
    if n % i == 0:
      count = count + 1
  return count == 8

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

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

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


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

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

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
 
cnt = 0  
for n in range(1,N+1):
    if len(make_divisors(n)) == 8 and n%2==1:
        cnt += 1
print(cnt)

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 = int(input())
result = 0
for i in range(0, a):
    tmp = 0
    for j in range(0, i):
        if i % j == 0:
            tmp += 1
    if tmp == 8:
        result += 1

print(result)

a = int(input())
result = 0
for i in range(0, a):
    tmp = 0
    if (i+1) % 2 != 0:
        for j in range(0, i):
            if (i + 1) % (j + 1) == 0:
                tmp += 1
        if tmp == 7:
            result += 1

print(result)

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):
https://atcoder.jp/contests/abc106/scoreN = int(input())
#cnt = 0
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)


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


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


N = int(input())
#cnt = 0
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: Runtime Error

Wrong Answer

Wrong Answer

Accepted