Problem:


Score: 200 points

Problem Statement

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

Constraints

N is an integer between 1 and 200 (inclusive).

Input

Input is given from Standard Input in the following format:

N

Output

Print the count.

Sample Input 1

105

Sample Output 1

1

Among the numbers between 1 and 105, the only number that is odd and has exactly eight divisors is 105.

Sample Input 2

7

Sample Output 2

0

1 has one divisor. 3, 5 and 7 are all prime and have two divisors. Thus, there is no number that satisfies the condition.



Sample input:
105


Sample output:
1

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Tue Mar 31 09:15:46 2020

@author: black
"""
def check(x):
    div = [1]
    for j in range(1, x):
        if (x)%(j+1) == 0:
            div.extend([j+1])
            if (i+1)%(j+1) == 0:
                div.extend([j+1])
    return len(div)




N = int(input())
ans = []

for x in range(1, N+1):
    if x%2 == 1:
        if check(x) == 8:
            ans.extend([x])


print(len(ans))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
N = int(input())

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

    if cnt == 8:
        cnt2 += 1

print(cnt2)

Submission status: Runtime Error

Solution code:
ans = 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 == 7:
        ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
#include<iostream>
#include<algorithm>
#include <vector>
#include <cmath>
#include<string>
#define REP(i,n) for(int i=0;i<int (n);i++)
using namespace std;

int main(){
    int n;
    int ans=1;
    cin>>n;
    if (n<105){
        cout<<0<<endl;
        return 0;
    }
    for (int i=106;i<=n;i++){
        int cnt=0;
        for (int j=1;j<=i;j++){
            
            if (i %j ==0){
                cnt++;
            } 
        }
        if (cnt==8) ans++;
    }
    cout<<ans<<endl; 
    
    return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

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

print(total)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
count=0
ans=0
for j in range(1,n+1,2):
  count=0
  for i in range(1,int(j**0.5)):
    if j%i==0 and j**0.5)==i:
      count+=1
    elif j%i==0 and j**0.5!=i:
      count+=2
  if count==8:
    ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
def solve():
    N = int(input())
    
    c = 0
    for i in range(1, N+1, 2):
        f = factorize(i)
        l = []
        for j in f:
            l.append(j)
            l.append(N // j)
        l.append(N)
        l.append(1)
        s = len(set(l))
        if s == 8:
            c += 1

    return c

print(solve())

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define INF 999999999
#define M_PI 3.14159265358979323846
#define ALL(X) (X).begin(),(X).end()

#ifdef __LOCAL
    #define DBG(X) cout << #X << " = " << (X) << endl;
    #define SAY(X) cout << (X) << endl;
#else
    #define DBG(X)
    #define SAY(X)
#endif

#ifdef __LOCAL
    #include <filesystem>
    namespace fs = std::filesystem;
#endif

using namespace std;

using ll = long long int;
using ull = unsigned long long int;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

int dx[]={1, 0, -1, 0, 0};
int dy[]={0, 1, 0, -1, 0};
const int INT_INF = (int)(2e9);
const ll  LL_INF = (ll)(2e18);
const int NIL = -1;
static mt19937 _g(time(nullptr));
 
std::string pad(int num){ char buffer[4]; std::snprintf(buffer, sizeof(buffer), "%03d", num); return buffer;}
inline ll randint(ll a, ll b) { ll w = (_g() << 31LL) ^ _g(); return a + w % (b - a + 1); }
inline void fast_io() { ios_base::sync_with_stdio(false); cin.tie(nullptr); cout.tie(nullptr); };
template<typename T> inline T sign(T x) { return T(x > 0) - T(x < 0); }
template<typename T, typename S> inline ostream& operator<<(ostream& os, const pair<T, S> p) { cout << "[" << p.first << ";" << p.second << "]"; return os; }
template<typename T> inline ostream& operator<<(ostream& os, const vector<T>& v) { for (auto el : v) cout << el << " "; return os; }
template<typename T> inline T fetch() { T ret; cin >> ret; return ret; }
template<typename T> inline vector<T> fetch_vec(int sz) { vector<T> ret(sz); for (auto& elem : ret) cin >> elem; return ret; }

int N;

void input(){
    fast_io();
    #ifdef __LOCAL
        fs::path p = __FILE__;
        fs::path input,output;
        input = output = p.parent_path();
        input += string("/input/") + string(p.stem()) + string(".txt");
        output += string("/output/") + string(p.stem()) + string(".txt");
        freopen(input.c_str(), "r", stdin);
        freopen(output.c_str(), "w", stdout);
    #endif
    cin >> N;

}

map<int,int> decompose(int n){
    map<int,int> res;
    for(int p=2;p*p<=n;p++){
        while(n%p==0){
            res[p]++;
            n /= p;
        }
    }
    if(n!=1) res[n]=1;
    return res;
}

int num_divisor(int n){
    auto x = decompose(n);
    int ans=0;
    for(auto p:x) ans+=(1+p.second);
    return ans;
}

void solve(){
    input();
    int c=0;
    for(int i=1;i<=N;i++){
        if(num_divisor(i)==8) c++;
    }
    cout << c << endl;
}

int main()
{
    solve();
    return 0;
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
prime=[3,5,7,11,13]
x=[]
for i in range(5):
	for j in range(i):
		for k in range(j):
			if n >= i*j*k:
				x.append(i*j*k)
cnt=len(x)
if 189> n >= 135:
	cnt += 1
elif n >= 189:
	cnt += 2
else:
	pass
print(cnt)

Submission status: Runtime Error

Solution code:
def hantei(x):
    

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
d=[0]*100

for i in range(3,200,2):
  count=0
  for j in range(1,i+1):
    if i%j==0:
      #print(i,j)
      count+=1
  d[int(i//2)]=d[int(i//2)-1]
  if count>=8:
    d[int(i//2)]+=1
    
N=int(input())
print(d[int(N//2)])

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
count = 0
if N < 105:
    print(0)
else:
    for odd in range(105, N+1, 2):
        li = divisor(odd)
        if len(li) == 8:
            count += 1
    print(count)

Submission status: Runtime Error

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

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

print(tmp)

Submission status: Runtime Error

Solution code:
def divisor(n):
    divisors=[]
    for i in range(1,int(n**0.5+1)):
        if n%i==0:
            divisors.append(i)
            if i!=n//i:
                divisors.append(n//i)
    divisors.sort()
    return divisors
n=int(input())
ans=0
for i in range(2,n):
    num=divisors(i)
    if len(num)==8:
        ans+=1
print(ans)

Submission status: Runtime Error

Solution code:
hg
n = int(input())

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

Submission status: Runtime Error

Solution code:
yandy
N = int(input())

count = [0] * 201
count[105] = 1
for i in range(105, 201):
    if i % 2 == 1:
        num = 0
        for n in range(1, i+1):
            if i % n == 0:
                num += 1
        if num == 8:
            count[i] = count[i-1]+1
        else:
            count[i] = count[i-1]
    else:
        count[i] = count[i-1]

print(count[N])

Submission status: Runtime Error

Solution code:
print(len([1 for i in [104,134,164,188,194] if i<int(input())]))

Submission status: Runtime Error

Solution code:
n = int(input())

def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr
ans = 0
for val in range(n):
	if len(factorization(val)) == 8:
      ans +=1
print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
m=int(n**0.5)+1
con_num=0
for i in range(m):
  if n%i==0:
    con_num+=1
if con_num==8 and n%2==1:
  print("1")
else:
  print("0")

Submission status: Runtime Error

Solution code:
from math import sqrt
from itertools import combinations


def main(n, d, x):
    ans = 0
    for a, b in combinations(x, 2):
        r = 0
        for c, d in zip(a, b):
            r += abs(c - d)**2

        if sqrt(r).is_integer():
            ans += 1

    print(ans)


if __name__ == '__main__':
    n, d = map(int, input().split())
    x = [list(map(int, input().split())) for _ in range(n)]

    main(n, d, x)

Submission status: Runtime Error

Solution code:
def count_deivisors(n):
    devisors = 0
    for i in range(1, n**0.5+1):
        if n % i == 0:
            devisors += 1
            if i != n // i:
                devisors += 1

    return devisors

n = int(input())

print(sum(count_deivisors(x) == 8 for x in range(1,n+1,2)))

Submission status: Runtime Error

Solution code:
from fractions import gcd
from functools import reduce
N = int(input())
a = list(map(int, input().split()))

list_ans = []

for i in range(N):
    remove_a = a.pop(0)
    #print("a is",a)
    ans = reduce(gcd, a)
    list_ans.append(ans)
    a.append(remove_a)
    #print("fix a is",a)

print(max(list_ans))

Submission status: Runtime Error

Solution code:
n = int(input())


def count_divisors():
  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)
  length = len(divisors)
  return length


l = []
for i in range(1, n + 1):
  if i % 2 == 0:
    continue
  else:
    if count_divisors(i) == 8:
      l.append(i)

      
print(len(l))

Submission status: Runtime Error

Solution code:
N = int(input())
k = []
ans = 0
ans_2 = 0
for i in range(1,200):
  k.append(i)
for i in range(N):
  for j in range(N):
    if i%k[i] == 0:
      if ans == 8:
        ans_2 += 1
        break
      else:
        ans += 1
print(ans_2)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(nSum)

Submission status: Runtime Error

Solution code:
def num_divisors(n):
  res = 0
  i = 2
  while i * i <= n:
    if n % i == 0:
      res += 1
      res += 1 if i * i != n else 0
    i += 1
  return res


N = input()
res = 0
for n in range(1, N + 1):
  if num_divisors(n) == 8:
    res += 1
print(res)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())

if n < 105:
	print(0)
elif n == 105 or n == 106:
	print(1)
else:
	if n % 2 == 0:
		length = n / 2 - 1
	else:
		length = int(n / 2)
	array = []
	answer = 1
	for i in range(53,length+1):
		number = i * 2 + 1
		for x in range(1,n+1):
			if number % x == 0:
				array.append(x)
		if len(array) == 8:
			answer += 1
		array.clear()
	print(answer)

Submission status: Runtime Error

Solution code:
n = int(input())

if n < 105:
	print(0)
elif n == 105 or n == 106:
	print(1)
else:
	if n % 2 == 0:
		length = n / 2 - 1
	else:
		length = n / 2
	array = []
	answer = 1
	for i in range(53,length+1):
		number = i * 2 + 1
		for x in range(1,n+1):
			if number % x == 0:
				array.append(x)
		if len(array) == 8:
			answer += 1
	print(answer)

Submission status: Runtime Error

Solution code:
n = int(input())

if n < 105:
	print(0)
elif n == 105 or n == 106:
	print(1)
else:
	if n % 2 == 0:
		length = n / 2 - 1
	else:
		length = n / 2
	array = []
	answer = 1
	for i in range(53,length+1):
		number = i * 2 + 1
		for x in range(1,n+1):
			if number % x == 0:
				array.apped(x)
		if len(array) == 8:
			answer += 1
	print(answer)

Submission status: Runtime Error

Solution code:
import math
N = int(input())
a = math.floor(math.sqrt(N))
L = [0 for i in range(a-1)]
ans = []
for i in range(N):
    if i%2 ==0:
        continue
    counter = 0
    for j in range(2,a+1):
        while i%j == 0:
            L[j] += 1
            i /= j
    if sum(L) == 3 or sum(L) == 4:
        ans.append(i)

print(len(ans))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
if N>=189:
    print(3)
elif N>=165:
    print(2)
elif N>=105:
    print(1)
else:
    print(0)

Submission status: Runtime Error

Solution code:
ans = [105,135,165,189,195]
n = 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)

Submission status: Runtime Error

Solution code:
ans = [105,135,165,189]
n = input()
if n < 105:
  print(0)
elif n < 135:
  print(1)
elif n < 165:
  print(2)
elif n < 189:
  print(3)
else:
  print(4)

Submission status: Runtime Error

Solution code:
from math import floor, sqrt

N = int(input())
ans = 0
for o in range(1, N + 1, 2):
	cnt = 0
    for n in range(1, 1 + floor(sqrt(o))):
    	if o % n == 0:
            cnt += 2
    if cnt == 8:
      ans += 1
print(ans)

Submission status: Runtime Error

Solution code:


n = map(int,input().split())

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

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

print(res)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
c=0
for j in range(105,n+1,2)  
  d=[]
  for i in range(1,int(j**0.5)+1):
        if j%i==0:
            d.append(i)
            if i!=n//i:
                d.append(n//i)
  if len(d)==8:
    c+=1
print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sympy
N=int(input())
list=list()
for i in range(105,N+1,2):
    dict=sympy.factorint(i)
    result=2**sum(dict.values())
    if result >=8:
        list.append(i)
print(len(list))

Submission status: Runtime Error

Solution code:
a = int(input())

if a == 105:
    print(1)
elif a <= 104:
    print(0)
else:
    cnt = 0
    divs = 0
    for i in range(1,a+1, 2):
        divs = 0
        for j in range(1,i+1):
            if i%j == 0:
                divs += 1
        if divs == 8:
            cnt += 1

print(cnt)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
ans=0
if n<105:
  print(ans)
else:
  c=1
  if n%2==0:
    n=n-1
  for i in range(105,n,2):
    for j in range(i):
      if i%j==0:
        c=c+1
      if c>8:
        break
    if c==8:
      ans=ans+1
  print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
ans=0
if n<105:
  print(ans)
else:
  c=1
  if n%2==0:
    n=n-1
  for i in range(105,n,2):
    for j in range(i):
      if i%j==0:
        c=c+1
      if c>8:
        break
    if c==8:
      ans=ans+1
print(ans)

Submission status: Runtime Error

Solution code:
n=int(input())
ans=0
if n<105:
  print(ans)
else:
  c=1
  if n%2==0:
    n=n-1
  for i in range(107,n,2):
    for j in range(i):
      if i%j==0:
        c=c+1
      if c>8:
        break
    if c==8:
      ans=ans+1
print(ans)

Submission status: Runtime Error

Solution code:
n = int ( input())
ans = 0
test = (3,5,7,11,13)
for i in range ( 105,n+1,2) :
  div = 0
  for d in test :
    if i % d == 0 :
      div += 1
  if div == 3 and i % 9 != 0:
    ans += 1
  elif i %= 27:
    ans += 1
print (ans)

Submission status: Runtime Error

Solution code:
import sys

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

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

        if num != 1:
            divisor_num *= 2

        return divisor_num

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

Submission status: Runtime Error

Solution code:
n = int(input())
count_ans = 0
for i in range(n//2 + 1):
  count_y = 0
  for j in range(i):
    if i%j == 0:
      count_y += 1
  if count_y == 8:
    count_ans += 1
print(count_ans)

Submission status: Runtime Error

Solution code:
n = int(input())
count_ans = 0
for i in range(n//2 + 1):
  count_y = 0
  for j in range(i):
    if i%j == 0:
      count_y += 1
  if count_y = 8:
    count_ans += 1
print(count_ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

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

print(count)

Submission status: Runtime Error

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

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

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

print(count)

Submission status: Runtime Error

Solution code:
N=in(input())
conut=0

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

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

print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
#106
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)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
s = 0
for i in range(1,N,2):
	t = 0
    for j in range(1,N,2):
		if not N%n:
			t+=1
    if t==8:
		s+=1

print(s)

Submission status: Runtime Error

Solution code:
n=int(input())
c=0
a=3
while a<=n:
    b=a*(a+2)*(a+4)
    if b==
    elif b<=n:
        c+=1
        a+=2
    else:
        break
print(c)

Submission status: Runtime Error

Solution code:
N = input()

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

Submission status: Runtime Error

Solution code:
import sympy
N = int(input())
sumcount = 0
for i in range(N):
    if sympy.divisor_count(i+1)==8:
        if (i+1) % 2 != 0:
            sumcount += 1
print(sumcount)

Submission status: Runtime Error

Solution code:
n = int(input())
c = []
for i in range(n):
    k = []
    for j in range(i):
        if i % j == 0:
            k.append(j)
    if len(k) == 8:
        c.append(i)
print(len(c))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input())

for i in range(1,N+1):
  tmp=0
  t=i**(1/2)
  for j in range(1,int(t)+1):
    if i%j==0:
      tmp+=1
      
  if t-int(t)<=1e-3:
    if tmp*2-1==8:
      ans+=1
      
  else:
    if tmp*2==8:
      ans+=1
      
print(ans)

Submission status: Runtime Error

Solution code:
N=int(input())

for i in range(1,N+1):
  tmp=0
  for j in range(1,int(sqrt(i))+1):
    if i%j==0:
      tmp+=1
      
  if sqrt(i)-int(sqrt(i))<=1e-3:
    if tmp*2-1==8:
      ans+=1
      
  else:
    if tmp*2==8:
      ans+=1
      
print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input())
con = []
conter = 0

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


print(con.count(8))

Submission status: Runtime Error

Solution code:
import sympy as sy
N=int(input())
def yakusuu(x):
    tmplist=list(sy.factorint(x).values())
    a=1
    for i in tmplist:
        a*=i+1
    return a
counter=0
for i in range(1,N+1,2):
    if yakusuu(i)==8:
        counter+=1
print(counter)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
b = []
def f(n):
  for i in range[N+1]:
    a = [] #約数の個数を入れていくリスト
    while n>1:
      if n // i == 0:
      a.append(1) #リストに1を追加
      i = i+1
      else:
      i = i+1:continue
        
while N>1:
  f(N) #関数の実行
  if sum(a) == 8:
  b.append(1)#条件を満たす数をリストイン
  a.clear()
  N = N-1
  else:
  N = N-1

print(sum(b))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n=int(input())
nums=[]
for i in range(1,n):
  if factorize(n).len()==8
  nums.append(i)
print(nums.len())


def factorize(n):
  i=2
  facors=[1]
  while True:
    if n%i==0:
      factors.append(i)
    else:
      i+=1
    if i==n:
      break

Submission status: Runtime Error

Solution code:
n = int(input())

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

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


print(a.count(8))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

result = 0

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

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

    if cnt >= 8:
        result += 1

print(result)