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())
int a = 0
if n >= 105:
    a += 1
if n >= 165:
  a += 1
if n >= 195:
  a += 1
print(a)


n = int(input().split())
if n >= 105:
    print(1)
else:
  print(0)


n = int(input())
a = 0
if n >= 105:
    a += 1
if n >= 135:
    a += 1
if n >= 165:
    a += 1
if n >= 189:
    a += 1
if n >= 195:
    a += 1
print(a)


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

def main():
    N = int(input())
    
    cnt = 0
    for i in range(1, N+1, 2):
        prime_l = []
        for j in range(1, i+1, 2):
            if i%j==0:
                prime_l.append()
        if len(prime_l)==8:
            cnt+=1
    print(cnt)
main()

import sys

def main():
    N = int(input())
    
    cnt = 0
    for i in range(1, N+1, 2):
        prime_l = []
        for j in range(1, i+1, 2):
            if i%j==0:
                prime_l.append(j)
        if len(prime_l)==8:
            cnt+=1
    print(cnt)
main()

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):
#coding: utf-8
import collections
N = int(input())
inner = 2
def factorize(n):
    b = 2
    fct = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            fct.append(b)
        b = b + 1
    if n > 1:
        fct.append(n)
    return fct
count_dict = collections.Counter(factorize(N))
print(count_dict)
for i in count_dict.keys():
    inner += (count_dict[i] + 1)
print(1 if inner == 8 else 0)

#coding: utf-8
import collections
N = int(input())
inner = 2
def factorize(n):
    b = 2
    fct = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            fct.append(b)
        b = b + 1
    if n > 1:
        fct.append(n)
    return fct
count_dict = collections.Counter(factorize(N))
print(count_dict)
for i in count_dict.keys():
    inner += (count_dict[i] + 1)
print(inner)

#coding: utf-8
import collections
N = int(input())
inner = 1
def factorize(n):
    b = 2
    fct = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            fct.append(b)
        b = b + 1
    if n > 1:
        fct.append(n)
    return fct
count_dict = collections.Counter(factorize(N))
for i in count_dict.keys():
    inner *= (count_dict[i] + 1) 
print(inner)

#coding: utf-8
import collections
N = int(input())
inner = 2
def factorize(n):
    b = 2
    fct = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            fct.append(b)
        b = b + 1
    if n > 1:
        fct.append(n)
    return fct
count_dict = collections.Counter(factorize(N))
print(count_dict)
for i in count_dict.keys():
    inner += (count_dict[i] + 1)
if N % 2 == 0 and inner == 8:
    print(1)
else:
    print(0)

#coding: utf-8
import collections
N = int(input())
inner = 2
def factorize(n):
    b = 2
    fct = []
    while b * b <= n:
        while n % b == 0:
            n //= b
            fct.append(b)
        b = b + 1
    if n > 1:
        fct.append(n)
    return fct
count_dict = collections.Counter(factorize(N))
print(count_dict)
for i in count_dict.keys():
    inner += (count_dict[i] + 1)
if N % 2 != 0 and inner == 8:
    print(1)
else:
    print(0)

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

Verdicts: Wrong Answer

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):
iog = [105, 135, 165, 189, 195]

n = int(input())
iog.append(n)
iog.sort()
print(iog.index(n))

iog = [105, 135, 165, 189, 195]

n = int(input())
if(n in iog):
    print(iog.index(n) + 1)
else:
    iog.append(n)
    iog.sort()
    print(iog.index(n))


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(target):
    _i = 1
    _count = 0
    while _i*_i <= target:
        if target % _i == 0:
            _count += 1
            if _i != target // _i:
                _count += 1
        _i += 1
    return _count


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

print(count)


n = int(input())


def count_divisors(target):
    _i = 1
    _count = 0
    while _i*_i <= target:
        if target % _i == 0:
            _count += 1
            if _i != target // _i:
                _count += 1
        _i += 1
    return _count


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

print(count)


Verdicts: Wrong Answer

Accepted
Problem: The number 105 is quite special - it is odd but still it has eight divisors. Now, your task is this: how many odd numbers with exactly eight positive divisors are there between 1 and N (inclusive)?

Submission attempts (in order):
n = int(input())
if n >= 195:
 print(3)
if n >= 165:
 print(2)
if n >= 105:
 print(1)
if n > 104:
 print(0)

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

Verdicts: 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
ans=0
for i in range(105, N+1):
    if(i%3==0):
        count+=1
    if(i%5==0):
        count+=1
    if(i%7==0):
        count+=1
    if(i%11==0):
        count+=1
    if(i%13==0):
        count+=1
    if(i%2==0):
        count=0
    if(count==3):
        print(i)
        ans+=1

n = int(input())

count=0
i = 1
A= []
for j in range(1, n+1, 2):
    while(i*i<=j):
        if(j%i==0):
            count+=1
        i+=1
    if(count==4):
        A.append(j)
    i = 1
    count=0

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

res = 0

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

print(res)

N = int(input())

res = 0

for i in range(1, N+1, 2):
    count = 0
    for j in range(1, N+1):
        if i % j == 0:
            count += 1
    if count == 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())
if n < 105:
    print(0)
elif n >= 105 and n < 165:
    print(1)
elif 10n >= 165 and n < 195:
    print(2)
else:
    print(3)

n = int(input())
result = 0
l = list(range(1,n+1,2))
for i in l:
    s = 1
    for j in range(1,i,2):
        if i % j == 0:
            s += 1
    if s == 8:
        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):
def prime_factorize(n):
    a = []
    if n=1:
      return 1
    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
if __name__=='__main__':
  print(prime_factorize(N))

N=int(input())
cnt=0
L=[3*5*7,3*5*9,3*5*11,3*5*13,3*7*9]
for l in L:
  cnt+=(l<=N)
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):
N=int(input())
ans=0
for i in range(1,N+1,2):
  cnt=2
  for j in range(3,int(i**0.5)+1,2):
    if i%j==0:
      print(i,j)
      cnt+=2
  if cnt==8:
    ans+=1
print(ans)

N=int(input())
ans=0
for i in range(1,N+1,2):
  cnt=2
  for j in range(3,int(i**0.5)+1,2):
    if i%j==0:
      cnt+=2
  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())
lst = [105, 135, 165, 189, 195, 201]
for i in range(6):
    if n < lst(i):
        print(i)
        break

n = int(input())
lst = [105, 135, 165, 189, 195, 201]
for i in range(6):
    if n < lst[i]:
        print(i)
        break

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

result = 0


for i in range(1, N+1):
    cnt = 0
    if i % 2 ==0:
        continue
    for x in range(1, N+1):
        if i % x == 0:
            cnt += 1
    print(i)
    print(cnt)
    if cnt == 8:
        result += 1
print(result)

N = int(input())

result = 0


for i in range(1, N+1):
    cnt = 0
    if i % 2 ==0:
        continue
    for x in range(1, N+1):
        if i % x == 0:
            cnt += 1
    #print(i)
    #print(cnt)
    if cnt == 8:
        result += 1
print(result)

Verdicts: Wrong Answer

Accepted
Problem: The number 105 is quite special - it is odd but still it has eight divisors. Now, your task is this: how many odd numbers with exactly eight positive divisors are there between 1 and N (inclusive)?

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

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

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

N = int(input())

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

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

N = int(input())
 
def divisor_num(n):
    ans = 0
    for i in range(1, n + 1):
        if n % i == 0:
            ans += 1
    return ans
 
ans = 0
for i in range(1, N + 1):
    if i % 2 != 0 and divisor_num(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):
print(len(list(filter(lambda x:x<=int(input()),[105, 135, 165, 189, 195]))))

n=int(input())
ansList=[105, 135, 165, 189, 195]
m=len(list(filter(lambda x:x<=n,ansList)))
print(m)

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):
def is_odd(n):
    if n % 2 == 1:
        return True
    else:
        return False
    
def p105(n):
    count = 0
    for s in range(n,0,-1):
        if is_odd(s):

            divisors = [s]

            for i in range(1,s):
                if s % i == 0:
                    divisors.append(i)
            if len(divisors) == 8:
                print(divisors)
                count += 1
    return count

if __name__ == "__main__":
    n = int(input())
    print(p105(n))


def is_odd(n):
    if n % 2 == 1:
        return True
    else:
        return False
    
def p105(n):
    count = 0
    for s in range(n,0,-1):
        if is_odd(s):

            divisors = [s]

            for i in range(1,s):
                if s % i == 0:
                    divisors.append(i)
            if len(divisors) == 8:
                
                count += 1
    return count

if __name__ == "__main__":
    n = int(input())
    print(p105(n))


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,lcnt = 0,0

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

N = int(input())
cnt,lcnt = 0,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:
				lcnt += 1
				cnt = 0
	cnt = 0
print(lcnt)

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

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

print(count)


n = int(input())
count = 0

if n < 105:
    count = 0
else:
    for i in range(105, n + 1, 2):
        div_count = 0
        for j in range(1, i + 1):
            if i % j == 0:
                div_count += 1
        if div_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):
n = int(input())
if n = 105:
  print(1)
else:
  print(0)

import sympy
n = int(input())
if n % 2 == 0 and len(sympy.divisors(n))==8:
    print(1)
else:
    print(0)

import sympy
if i % 2 == 0 and len(sympy.divisors(int(input())))==8:
    print(1)
else:
    print(0)

def make_divisors(n):
    a,b =[],[]
    i = 1
    while i*i<=n:
        if n%i == 0:
            a.append(i)
            if i != n//i:
                b.append(n//i)
        i+= 1
    return a+b[::-1]

n = int(input())
c = len(make_divisors(n))
if n % 2 == 1 and c== 8 and c == 16 :
    print(1)
else:
    print(0)

def make_divisors(n):
    a,b =[],[]
    i = 1
    while i*i<=n:
        if n%i == 0:
            a.append(i)
            if i != n//i:
                b.append(n//i)
        i+= 1
    return a+b[::-1]

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

Verdicts: Runtime Error

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

def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

n = i()

cnt = 0
ans = 0
for j in range(1,n+1,2):
	for i in range(1,j+1):
		if j%i == 0:
			cnt += 1
	if cnt == 8:
		ans += 1
	cnt = 0
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):
from sys import stdin
N = int(stdin.readline().rstrip())

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


from sys import stdin
N = int(stdin.readline().rstrip())

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


Verdicts: Wrong Answer

Accepted
Problem: The number 105 is quite special - it is odd but still it has eight divisors. Now, your task is this: how many odd numbers with exactly eight positive divisors are there between 1 and N (inclusive)?

Submission attempts (in order):
N=input()
ans=0
for i in range(1,N):
    count=0
    for j in range(i):
        if i%j==0:
            count+=1
    if count==9:
        ans+=1
        
print(ans)

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

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

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

print(ans)


N = int(input())

ans = 0
for n in range(1,int(N/2)+1):
    if 2*n+1 > N:
        break
    for i in range(1,int(N**(1/2)/2)+1):
        for j in range(i+1,int(N**(1/2)/2)+1):
            for k in range(j+1,int(N**(1/2)/2)+1):
                if 2*n+1 == (2*i+1)*(2*j+1)*(2*k+1):
                    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 = input()

if N <= 104:
  print(0)
else:
  print(1)

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



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



Verdicts: Wrong Answer

Accepted
Problem: The number 105 is quite special - it is odd but still it has eight divisors. Now, your task is this: how many odd numbers with exactly eight positive divisors are there between 1 and N (inclusive)?

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


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


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

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


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


n = int(input())

X = [int(x) for x in range(1,n+1,2)]

ans = 0
for x in X:
    a = 0
    for i in range(1,n+1):
        if x % i == 0:
            a += 1
    if a == 8 :
        ans += 1 
print(ans)


Verdicts: Wrong Answer

Runtime Error

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):
def main():
	n = int(input())

	if n <= 104:
		print(0):
	elif n <= 134:
		print(1)
	elif n <= 188:
		print(2)
	else:
		print(3)


if __name__ == '__main__':
	main()

def main():
	n = int(input())

	if n <= 104:
		print(0)
	elif n <= 134:
		print(1)
	elif n <= 164:
		print(2)
	elif n <= 188:
		print(3)
	elif n <= 194:
		print(4)
	else:
		print(5)


if __name__ == '__main__':
	main()

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

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

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

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
count=0
n=int(input())
for i in range(1, n+1):
  ans=1
  c=collections.Counter(prime_factorize(i))
  clist = c.values()
  for j in clist:
    ans *= (j+1)
  if ans == 8:
    count += 1
    
print(count)

import collections

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
count=0
n=int(input())
for i in range(1, n+1):
  ans=1
  c=collections.Counter(prime_factorize(i))
  clist = c.values()
  for i in clist:
    ans *= (i+1)
  if ans == 8:
    count += 1
    
print(count)

import collections

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

count=0
n=int(input())
for i in range(1, n+1, 2):
  ans=1
  c=collections.Counter(prime_factorize(i))
  clist = c.values()
  for j in clist:
    ans *= (j+1)
  if ans == 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):
# B
import math
N = int(input())

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

re = 0
for i in range(1, N+1, 2):
    num = search_divisor_num(i)
    if num == 8:
        re += 1
        
print(re)

import math
N = int(input())

def make_prime_list(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(num):
    if num < 0:
        return None
    elif num == 1:
        return 1
    else:
        num_sqrt = math.floor(math.sqrt(num))
        prime_list = make_prime_list(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

re = 0
for i in range(1, N+1, 2):
    num = search_divisor_num(i)
    if num == 8:
        re += 1
        
print(re)

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 += 1
if count == 8:
  print("Yes")
else:
  print("No")

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

Verdicts: Wrong Answer

Accepted
Problem: The number 105 is quite special - it is odd but still it has eight divisors. Now, your task is this: how many odd numbers with exactly eight positive divisors are there between 1 and N (inclusive)?

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


for i in range(1, N+1, 2):
    cnt = 0
    
    for j in range(1, i+1):
        if j % i == 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):
import sys
from collection import defaultdict
import math

def calc(num):
    if num<=1:
        return 1
    else:
        num_sqrt=math.floor(math.sqrt(num))
        prime_list=make_prime_list_2(num_sqrt)

        dict_counter=defaultdict(int)
        for prime in prime_list:
            while num % prime==0:
                dict_counter[prime]+=1
                num //=prime
        if num !=1:
            dict_counter[num]+=1

        dict_counter=dict(dict_counter)

        return dict_counter
def main():
    argvs=sys.argv
    num=int(argvs[1])
    eight_counter=[]
    for i in range(num):
        if calc(num)==8:
            eight_counter.append(num)
        else:
            pass
    print(len(eight_counter))

main()

import sys
from collection import defaultdict
import math

def calc(num):
    if num<=1:
        return 1
    else:
        num_sqrt=math.floor(math.sqrt(num))
        prime_list=make_prime_list_2(num_sqrt)

        dict_counter=defaultdict(int)
        for prime in prime_list:
            while num % prime==0:
                dict_counter[prime]+=1
                num //=prime
        if num !=1:
            dict_counter[num]+=1

        dict_counter=dict(dict_counter)

        return dict_counter
def main():
    num=input()
    eight_counter=[]
    calc_result=calc(num)
    for i in range(num):
        if calc_result==8:
            eight_counter.append(num)
        else:
            pass
    print(len(eight_counter))

main()

import sys
from collection import defaultdict
import math

def calc(num):
    if num<=1:
        return 1
    else:
        num_sqrt=math.floor(math.sqrt(num))
        prime_list=make_prime_list_2(num_sqrt)

        dict_counter=defaultdict(int)
        for prime in prime_list:
            while num % prime==0:
                dict_counter[prime]+=1
                num //=prime
        if num !=1:
            dict_counter[num]+=1

        dict_counter=dict(dict_counter)

        return dict_counter
def main():
    num=input()
    eight_counter=[]
    for i in range(num):
        if calc(num)==8:
            eight_counter.append(num)
        else:
            pass
    print(len(eight_counter))

main()

def calculate_num_of_divisor(N):
    yakusuu = []
    for i in range(1, N+1):
        if N % i == 0:
            yakusuu.append(i)
    return len(yakusuu)

N = int(input())
count = []
for i in range(N+1):
    if i % 2 == 1 and calculate_num_of_divisor(i) == 8:
        count.append(i)
print(len(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())
count = 0
ans = 0
j = 1

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

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

for i in range(1, n+1, 2):
    while j <= i:
        if i % j == 0:
            count += 1
        j += 1
    if count == 8:
        ans += 1
    count = 0
    j = 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())
lst = [135, 189, 105, 165, 195]
tmp = 0

for i in range(5):
    if n<=lst[i]:
        tmp += 1

print(tmp)

n = int(input())
lst = [135, 189, 105, 165, 195]
tmp = 0

for i in range(6):
    if n<=lst[i]:
        tmp += 1

print(tmp)

n = int(input())
lst = [135, 189, 105, 165, 195]
tmp = 0
x = []

for i in range(5):
    x.append(n-lst[i])

for i in range(5):
    if x[i]>=0:
        tmp += 1

print(tmp)

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

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

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

print(result)


n = int(input())

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

print(result)


n = int(input())

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

print(result)

n = int(input())

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

print(result)


n = int(input())

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

print(result)


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

prime = [3, 5, 7, 11, 13]


zero_seven = 0
one_three = [a * (b ** 3) for a in prime for b in prime if a != b]
one_three = [i for i in one_three if i <= 200]
one_one_one = [a * b * c for a in prime for b in prime for c in prime
               if a != b and b != c and c != a]
one_one_one = [i for i in one_one_one if i <= 200]

ans = sorted(set(one_three + one_one_one))
i = 0
if ans[-1] <= N:
    print(len(ans))
    quit()
else:
    while ans[i] < N:
        i += 1
        if ans[i] > N:
            print(i)
            quit()

print(i)

N = int(input())

prime = [3, 5, 7, 11, 13]


zero_seven = 0
one_three = [a * (b ** 3) for a in prime for b in prime if a != b]
one_three = [i for i in one_three if i <= 200]
one_one_one = [a * b * c for a in prime for b in prime for c in prime
               if a != b and b != c and c != a]
one_one_one = [i for i in one_one_one if i <= 200]

ans = sorted(set(one_three + one_one_one))
if N <= 104:
    print(0)
elif 105 <= N <= 134:
    print(1)
elif 135 <= N <= 164:
    print(2)
elif 165 <= N <= 188:
    print(3)
elif 189 <= N <= 194:
    print(4)
elif 195 <= N:
    print(5)

Verdicts: Wrong Answer

Accepted
Problem: The number 105 is quite special - it is odd but still it has eight divisors. Now, your task is this: how many odd numbers with exactly eight positive divisors are there between 1 and N (inclusive)?

Submission attempts (in order):
N=int(input())
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

cnt=0
for i in range(1, N+1):
    divsors = make_divisors(i)
    if i % 2 != 0:
        if len(divsors) == 8:
            print(i, divsors)
            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 i in range(N):
    divsors = make_divisors(i)
    if i % 2 != 0 and len(divsors) == 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 i in range(N):
    divsors = make_divisors(i)
    if len(divsors) == 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 i in range(1,N+1):
    divsors = make_divisors(i)
    if i % 2 != 0 and len(divsors) == 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)
    divisors.sort()
    return divisors

cnt=0
for i in range(1, N+1):
    divsors = make_divisors(i)
    if i % 2 != 0 and len(divsors) == 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):
# coding:utf-8
list=[0]*1000
for i in range(1,201,1):
    m=1
    while m*i<=200:
        print(m*i)
        list[m*i]+=1
        m+=1
n=int(input())
ct=0
for i in range(1,n+1,2):
    if list[i]==8:
        ct+=1
print(ct)

# coding:utf-8
list=[0]*200
for i in range(2,201,1):
    m=1
    while m*i<=200:
        list[m*i]+=1
        m+=1
n=int(input())
ct=0
for i in range(1,n+1,2):
    if list[i]==8:
        ct+=1
print(ct)

# coding:utf-8
list=[0]*1000
for i in range(1,201,1):
    m=1
    while m*i<=200:
        list[m*i]+=1
        m+=1
n=int(input())
ct=0
for i in range(1,n+1,2):
    if list[i]==8:
        ct+=1
print(ct)

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

    counter = 0


print(ans)



N = int(input())

ans = 0
for i in range(1, N+1, 2):
    divisor = []
    for j in range(1, N+1):
        if i % j == 0:
            divisor.append(j)
    
    if len(divisor) == 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 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
ans=0
N=int(input())
if N<105:
    print(0)
    exit(0)
for i in range(104,N):
    if i%2==1 and len(make_divisors(i))==8:
        ans+=1
print(ans)

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
ans=0
N=int(input())
if N<105:
    print(0)
    exit(0)
for i in range(105,N)[::2]:
    if len(make_divisors(i))==8:
        ans+=1
print(ans)

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
ans=0
N=int(input())
if N<105:
    print(0)
    exit(0)
for i in range(104,N+1):
    if i%2==1 and len(make_divisors(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

# for idx1, x in enumerate(candidate_prime_num):
# 
#     if idx1+1 > LENGTH_CANDIDADE:
#         continue
# 
#     idx2 = idx1+1
#     for y in candidate_prime_num[idx2:]:
# 
#         if idx2 + 1 > LENGTH_CANDIDADE:
#             continue
#         idx3 = idx2 +1


#                 cnt +=1
# print(cnt)
NUM_YAKUSU = 8
cnt_8_yakusu=0
for n in range(1,N+1,2):
    cnt_yakusu = 0
    for x in range(1,n,2):
        if n % x == 0:
            cnt_yakusu+=1
    if cnt_yakusu == NUM_YAKUSU:
        cnt_8_yakusu +=1
print(cnt_8_yakusu)

N=int(input())

# cnt = 0

# for idx1, x in enumerate(candidate_prime_num):
#
#     if idx1+1 > LENGTH_CANDIDADE:
#         continue
#
#     idx2 = idx1+1
#     for y in candidate_prime_num[idx2:]:
#
#         if idx2 + 1 > LENGTH_CANDIDADE:
#             continue
#         idx3 = idx2 +1


#                 cnt +=1
# print(cnt)
NUM_YAKUSU = 8
cnt_8_yakusu=0
for n in range(1,N+1,2):

    cnt_yakusu = 0
    for x in range(1,n+1,2):
        if n % x == 0:
            # print(n,x)
            cnt_yakusu+=1
    if cnt_yakusu == NUM_YAKUSU:
        cnt_8_yakusu +=1
print(cnt_8_yakusu)

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):
str=input()
n=int(str)
c=0
ans=0
for num in range(1,n):
    for number in range(1,num):
        if num%number==0:
            c+=1
    if c==8:
        d+=1
print(d)


str=input()
n=int(str)
c=0
for num in range(1,n):
    if n%num==0:
        c+=1
print(c)


def solve():
    n = int(input())
    ans = 0
    for i in range(1,n+1):
        if i%2==0:
            continue
        d = 0
        for j in range(1,i+1):
            if i%j==0:
                d+=1
        if d==8:
            ans+=1
    print(ans)
if __name__ == "__main__":
    solve()

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: The number 105 is quite special - it is odd but still it has eight divisors. Now, your task is this: how many odd numbers with exactly eight positive divisors are there between 1 and N (inclusive)?

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

print(ans)

n = int(input())
count = 0
ans = 0
for i in range(0,n,2):
    for j in range(0,n,2):
        if (i+1) % (j+1) == 0:
            count += 1
    if count == 8:
        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):
N = int(input())+1
yakusuu = 0
for i in range(1,int((N-N%2)/2)+2):
    cnt = 0
    ii = 1+ 2*(i-2)
    for j in range(1,ii):
        if ii % j == 0:
            cnt = cnt+1
    cnt = cnt+1
    print(str(ii)+"の約数は"+str(cnt)+"個")
    if cnt == 8:
        yakusuu = yakusuu + 1
print(yakusuu)

N = int(input())+1
yakusuu = 0
for i in range(1,int((N-N%2)/2)+2):
    cnt = 0
    ii = 1+ 2*(i-2)
    for j in range(1,ii):
        if ii % j == 0:
            cnt = cnt+1
    cnt = cnt+1
    if cnt == 8:
        yakusuu = yakusuu + 1
print(yakusuu)

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

print(ans)
        

N = int(input())
ans = 0

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



import numpy as np
n = int(input())
for i in range(n):  
    if(n%2==0):
        break
    count=0
    for j in range(2,int(np.sqrt(i))+1):
        if(i%j == 0):
            count += 1
        if(count == 7):
            break
print(count)



import numpy as np
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: 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())

a = [0] * 100
b = [0] * 100
ans = 0

for i in range(100):
    a[i] = 2 * i + 1

for i in range(100):
    for j in range(2, 200):
        if a[i] % j == 0:
            b[i] += 1

for k in range(n+1):
    if b[k] == 7:
        ans += 1

print(ans)


n = int(input())

a = [0] * 100
b = [0] * 100
ans = 0

for i in range(100):
    a[i] = 2 * i + 1

for i in range(100):
    for j in range(2, 200):
        if a[i] % j == 0:
            b[i] += 1

for k in range(100):
    if b[k] == 7 and a[k] <= n:
        ans += 1

print(ans)


Verdicts: Runtime Error

Accepted