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

print(ans)

N = int(input())
ans = 0
for n in range(1,N+1,2):
    sm = sum(n % i == 0 for i in range(1,n+1))
    if sm == 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 math
import copy
from copy import deepcopy
import sys
import fractions
# import numpy as np
from functools import reduce
# import statistics
import decimal
import heapq
import collections
import itertools
from operator import mul

sys.setrecursionlimit(100001)


# input = sys.stdin.readline


# ===FUNCTION===

def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList


# ===CODE===

n = int(input())

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

    if tmp == 8:
        ans += 1

print(ans)


import math
import copy
from copy import deepcopy
import sys
import fractions
# import numpy as np
from functools import reduce
# import statistics
import decimal
import heapq
import collections
import itertools
from operator import mul

sys.setrecursionlimit(100001)


# input = sys.stdin.readline


# ===FUNCTION===

def getInputInt():
    inputNum = int(input())
    return inputNum


def getInputListInt():
    outputData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData


def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList


def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList


# ===CODE===

n = int(input())

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

    if tmp == 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):
print(len([1 for i in [104,134,164,188,194] if i<int(input())]))

a=int(input());print(len([1 for i in [52,67,82,94,97] if 2*i<a]))

Verdicts: Runtime Error

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

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

num_eight_divisors = 0

numbers = list(range(9, number + 1, 2))

for i in range(9, number + 1, 2):
    divisors = [1, i]

    for j in range(2, i):
        q, mod = divmod(i, j)

        if mod == 0:
            divisors.append(j)
            divisors.append(q)

    if len(set(divisors)):
        num_eight_divisors = num_eight_divisors + 1

print(num_eight_divisors)


number = int(input())

num_eight_divisors = 0

numbers = list(range(9, number + 1, 2))

for i in range(9, number + 1, 2):
    divisors = [1, i]

    for j in range(2, i):
        q, mod = divmod(i, j)

        if mod == 0:
            divisors.append(j, q)

    if len(set(divisors)):
        num_eight_divisors = num_eight_divisors + 1

print(num_eight_divisors)


number = int(input())

num_eight_divisors = 0

numbers = list(range(9, number + 1, 2))

for i in range(9, number + 1, 2):
    divisors = [1, i]

    for j in range(2, i):
        q, mod = divmod(i, j)

        if mod == 0:
            divisors.append(j)
            divisors.append(q)

    if len(set(divisors)) == 8:
        num_eight_divisors = num_eight_divisors + 1

print(num_eight_divisors)


Verdicts: Wrong Answer

Runtime Error

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

Submission attempts (in order):
def div(x):
    ans = 0
    for i in range(1, x + 1):
        if x % i == 0:
            ans += 1
    return ans
n = int(input())
ans = 0
for x in range(1, n + 1):
    if div(x) == 8:
        ans += 1
print(ans)


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

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


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


n = int(input())


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


Verdicts: Runtime Error

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

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

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

sum(1 for i in range(1, n+1, 2) if cnt(i) == 8)

n = int(input())
def cnt(x):
	return sum(1 for i in range(1, x+1) if x%i == 0)
print(sum(1 for i in range(1, n+1, 2) if cnt(i) == 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):
def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]

n=n0()

ans=0
for k in range(5,n+1):
    c=0
    for i in range(1,int(k**0.5)+1,2):
        if k%i==0:
            c+=2
    if i**2==k:
        c-=1
    if c==8:
        ans+=1
print(ans)

def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]

n=n0()

ans=0
for k in range(105,n+1,2):
    c=0
    for i in range(1,k+1):
        if k%i==0:
            c+=1
#     if i**2==k:
#         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())
a = []
count = 0
for i in range(1,n+1):
     if i%2 != 0:
          for j in range(1,i+1):
               if i%j == 0:
                    a.append(j)
                    print(i,a)
     if len(a) == 8:
          count += 1
     a.clear()
print(count)

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

Verdicts: Wrong Answer

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

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


l = list(range(n + 1))[1::2]

num = 0
for i in l:
    if len(make_divisors(i)) == 8:
        print(i)
        num += 1

print(num)

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


l = list(range(n + 1))[1::2]

num = 0
for i in l:
    if len(make_divisors(i)) == 8:
        num += 1

print(num)

Verdicts: Wrong Answer

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

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

def check(p):
  c = 0
  for i in range(1,p+1):
    if p % i == 0:
      c += 1
  return c

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

n = int(input())
 
def check(p):
  c = 0
  for i in range(1,p+1):
    if p % i == 0:
      c += 1
  return c
 
ans = 0
for i in range(1,n+1):
  if i % 2 == 1:
    if check(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):
# -*- 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) 
      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))
      

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


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)     

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: 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())
x = 1
count = 0

while x <= N:
  a = 0
  k = 1
  while k <= N:
    if N%k == 0:
      a += 1
    k += 2
  if a == 8:
    count += 1
  x += 2

print(count)

N = int(input())
x = 1
count = 0

while x <= N:
  a = 0
  k = 1
  while k <= N:
    if N%k == 0:
      a += 1
    k += 2
  if a == 8:
    count += 1
  x += 2

print(count)

N = int(input())
x = 1
count = 0
while x < N:
  a = 0
  k = 1
  while k < N:
    if N%k == 0:
      a += 1
    k += 2
  if a == 8:
    count += 1
  x += 2

print(count)

N = int(input())
x = 1
count = 0

while x <= N:
  a = 0
  k = 1
  while k <= x:
    if x%k == 0:
      a += 1
    k += 2
  if a == 8:
    count += 1
  x += 2

print(count)

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

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)

n = int(input())
count_ans = 0
for i in range(n//2 + 1 if n%2 ==1 else n//2):
  count_y = 0
  for j in range(2*i+2):
    if j > 0:
      if (2 * i + 1)%j == 0:
        count_y += 1
  if count_y == 8:
    count_ans += 1
print(count_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())
if (1 <= N < 105):
    print(0)
if (105 <= N < 135):
    print(1)
if (135 <= N < 155):
    print(2)
if (155 <= N < 189):
    print(3)
if (189 <= N < 195):
    print(4)
else:
    print(5)

N = int(input())
if (N < 105):
    print(0)
if (105 <= N < 135):
    print(1)
if (135 <= N < 189):
    print(2)
else:
    print(3)

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

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

for i in range(26):
  for j in range(15):
    if N==i*4+j*7:
      
      print('Yes')
      exit()


print('No')


N=int(input())


ans=0

for i in range(1,N+1):
  
  c=0

  
  if i%2==1:
    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())
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())

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

for k, v in enumerate(have_8divisors):
    if N < v:
        ans = k
        break
else:
    ans = len(have_8divisors)
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())

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


n = int(input())

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

n = int(input())

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

n = int(input())

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

n = int(input())

num = 0
for i in range (1, n+1, 2):
  #print(n+1)
  ans = 0
  for j in range (1, i+1):
    if i%j == 0:
      ans += 1
      #print(i, j)
  if ans == 8: #more than 8? less than 8?
    num += 1
    ans = 0
print(num)

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

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)

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

elif n == 105:
  print(8)
  
else:
  for i in range(107,n,2):
    a=0
    for j in range(i):
      if i%(j+1)==0:
        a += 1
    if a==8:
      ans +=1
  print(ans)

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



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

N = int(input())
countans = 1
if(N < 105):
  print(0)
elif(N < 107):
    print(1)
else:
    for i in range(107, N+1, 2):
        count = 1
        for j in range(1, int(N/2)):
            if(i%j == 0):
                count += 1
        if(count == 8):
            countans += 1
    print(countans)

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

n = int(input())

result = 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:
        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())
res = 0
for i in range(2,n+1):
  print(i)

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

#hoge=[[108]]

#x=[3,5,7,11,13,17,19]


x=[5,7]
b=[pow(3,3)*i for i in x]

#x=[5,7,11,13,17,19,23,29,31]


#x=[7,11,13,17,19]


#x=[11,13]


x=[7,11,13]
f=[3*5*i for i in x]

b.append(f)



x=[]
for v in b:
  for item in v:
    x.append(item)


x.sort()
import numpy as np
X=[N-x[i] for i in range(len(x))]
XX=np.where(np.array(X) < 0) 
print(XX[0][0])

import numpy as np
N=int(input())
x=[105, 135, 165, 189, 195]

X=[N-x[i] for i in range(len(x))]
XX=np.where(np.array(X) < 0) 
if N<195:
  print(XX[0][0])
  else:
    print(5)

N=int(input())
import math

hoge=[[108]]

x=[3,5,7,11,13,17,19]
a=[pow(2,3)*i for i in x]

x=[2,5,7]
b=[pow(3,3)*i for i in x]

x=[5,7,11,13,17,19,23,29,31]
c=[2*3*i for i in x]

x=[7,11,13,17,19]
d=[2*5*i for i in x]

x=[11,13]
e=[2*7*i for i in x]

x=[7,11,13]
f=[3*5*i for i in x]

hoge.append(a)
hoge.append(b)
hoge.append(c)
hoge.append(d)
hoge.append(e)
hoge.append(f)


x=[]
for v in hoge:
  for item in v:
    x.append(item)

x.sort()
import numpy as np
X=N-x
XX=np.where(X < 0) 
print(XX[0])

N=int(input())
import math

#hoge=[[108]]

#x=[3,5,7,11,13,17,19]


x=[[5,7]]
b=[pow(3,3)*i for i in x]

#x=[5,7,11,13,17,19,23,29,31]


#x=[7,11,13,17,19]


#x=[11,13]


x=[7,11,13]
f=[3*5*i for i in x]

b.append(f)



x=[]
for v in b:
  for item in v:
    x.append(item)


x.sort()
import numpy as np
X=[N-x[i] for i in range(len(x))]
XX=np.where(np.array(X) < 0) 
print(XX[0][0])

N=int(input())
import math

hoge=[[108]]

x=[3,5,7,11,13,17,19]
a=[pow(2,3)*i for i in x]

x=[2,5,7]
b=[pow(3,3)*i for i in x]

x=[5,7,11,13,17,19,23,29,31]
c=[2*3*i for i in x]

x=[7,11,13,17,19]
d=[2*5*i for i in x]

x=[11,13]
e=[2*7*i for i in x]

x=[7,11,13]
f=[3*5*i for i in x]

hoge.append(a)
hoge.append(b)
hoge.append(c)
hoge.append(d)
hoge.append(e)
hoge.append(f)


x=[]
for v in hoge:
  for item in v:
    x.append(item)

x.sort()
import numpy as np
X=[N-x[i] for i in range(len(x))]
XX=np.where(np.array(X) < 0) 
print(XX[0][0])

import numpy as np
N=int(input())
x=[105, 135, 165, 189, 195]

X=[N-x[i] for i in range(len(x))]
XX=np.where(np.array(X) < 0) 
if N<195:
  print(XX[0][0])
else:
  print(5)

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

for x in range(2, n // 2 + 1)
  if n % x == 0:
    c += 1

print(c)

n = int(input())
c = 0

for x in range(1, n + 1, 2):
    if sum(1 for y in range(1, x // 2) if x % y == 0) == 7:
        c += 1

print(c)

Verdicts: Runtime Error

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

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


def main(n):
    ans = 0

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

        l = 0
        for j in range(1, i + 1):

            if i % j == 0:
                l += 1

        if l == 8:
            ans += 1

    print(ans)


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

    main(n)


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

N = int(input())
ans = 0
for a in range(1,N+1):
  if a%2==0:
    continue
  c = 0
  for b in range(1,a+1):
    if a % b == 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())
if n < 185:
  print(0)
elif n < 165:
  print(1)
else:
  print(2)

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):
ret = 0
for x in range(11, int(input()) + 1, 2):
    n = 2
    for y in range(2, x // 2 + 1):
        if x % y == 0:
            n += 1
    if n == 8:
        ret += 1
        print(x)
print(ret)

ret = 0
for x in range(11, int(input()) + 1, 2):
    n = 2
    for y in range(2, x // 2 + 1):
        if x % y == 0:
            n += 1
    if n == 8:
        ret += 1
print(ret)

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
ans = 0

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

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

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

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

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

eights = []
nums = []

for i in range(105,200,2):
  p = prime_factorize(i)
  if len(p) == 3:
    eights.append(p)
    nums.append(i)
    
print(len([i for i in nums if i < N]))

N = int(input())

sup = (N + 1) // 2
con = 0
ans = 0

if N < 105:
  print(ans)

else:
  for i in range(1,N + 1,2):
    for j in range(1,max(i // 2 + 1,2)):
      if i % j == 0:
        con +=1
    if con == 7:
      ans += 1
    con = 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):
def div(n):
  d=0
  for i in range(1, n+1):
    if n%i==0:
      d+=1
  return d

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

def div(N):
    div = set()
    for i in range(1, int(N ** 0.5 + 0.5) + 1):
        if N % i == 0:
            div.add(i)
            div.add(N // i)
    return len(div)


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



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

    return divisors

n = int(input())

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



Verdicts: Runtime Error

Accepted
Problem: Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows:    * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`.  For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?

Submission attempts (in order):
S = int(input())
K = int(input())

if str(S)[0] == 1 and K == 1:
    print(1)
else:
    print(str(S)[0])


S = input()
K = int(input())

n = 0
for si in S:
    if si == '1':
        n += 1
    else:
        break

# if str(S)[0] == 1 and K == 1:
#     print(1)
# else:
#     print(str(S)[0])

if n >= K:
    print('1')
else:
    print(S[n])


Verdicts: Wrong Answer

Accepted
Problem: Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows:    * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`.  For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?

Submission attempts (in order):
s = input()
k = int(input())

for i in range(k):
    if s[i] != '1':
      print(s[i])
      break 
print(1) 

s = input()
k = int(input())

for i in range(k):
    if s[i] != '1':
      print(s[i])
      break 
    else:
      print(1)      

s = input()
k = int(input())

for i in range(k):
    if s[i] != '1':
      print(s[i])
      break 
if i == k-1:
    if s[k-1] != '1':
      exit()
    else:
      print(1)  

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows:    * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`.  For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?

Submission attempts (in order):
S = input()
K = int(input())
i = 0
while True:
    if S[i] == '1':
        if K == 1:
            break
        else:
            K-=1
            i+=1
    else:
        break

import math
S = input()
K = int(input())
i = 0
while True:
    if S[i] == '1':
        if K == 1:
            print(S[i])
        else:
            K-=1
            i+=1
    else:
        d = int(math.log(int(S[i]))*10**15)
        if d<K:K-=d
        else:break
        i += 1

import math
S = input()
K = int(input())
i = 0
while True:
    print('first:',S[i])
    if S[i] == '1':
        if K == 1:
            break
        else:
            K-=1
            i+=1
    else:
        d = int( (math.log(int(S[i]))) * ((2**5)*(10**15)) ) + 1
        if d<K:K-=d
        else:break
        i += 1
print(S[i])

S = input()
K = int(input())
i = 0
while True:
    if S[i] == '1':
        if K == 1:
            break
        else:
            K-=1
            i+=1
    else:
        break
print(S[i])

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows:    * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`.  For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?

Submission attempts (in order):
s=input()
k=int(input())
import re
s1,s2=re.match('^(1*)([2-9])?',s).groups()
if(s1 and k<=len(s1)):
  print(1)
  else:
    print(s2)

s=input()
k=int(input())
import re
s1,s2=re.match('^(1*)([2-9])?',s).groups()
if(s1 and k<=len(s1)):
  print(1)
else:
  print(s2)

Verdicts: Runtime Error

Accepted
Problem: Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows:    * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`.  For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?

Submission attempts (in order):
c = 5*pow(10, 14)
list_N = list(input())
k = int(input())
cnt = 0
ans = 0

for i in list_N:
    i = int(i)
    cnt += pow(i, c)
    if cnt > k:
        ans = i
        break

print(ans)

c = 5*pow(10, 14)
list_N = list(input())
k = int(input())
cnt = 0
ans = 0

for i in list_N:
    i = int(i)
    if i != 1:
        ans = i
        break
    else:
        cnt += 1
        if cnt == k:
            ans = 1
            break

print(ans)

Verdicts: Wrong Answer

Accepted
Problem: Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows:    * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`.  For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?

Submission attempts (in order):
s=list(map(int,input().split()))
k=int(input())
count=0
for i in range(100):
  if count==k:
    print(1)
    exit()
  if s[i]==1:
    count+=1
  else:
    print(s[i])
    exit()

s=list(input())
s=list(map(int,s))
k=int(input())
count=0
for i in range(100):
  if count==k:
    print(1)
    exit()
  if s[i]==1:
    count+=1
  else:
    print(s[i])
    exit()

Verdicts: Wrong Answer

Accepted
Problem: Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows:    * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`.  For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?

Submission attempts (in order):
S = input()
K = int(input())
index = 0

for i in range(K):
    if (S[i] != '1'):
        print(S[i])
        break

if (index == 0):
    print('1')
else:
    print(S[index])


S = input()
K = int(input())
index = 0

for i in range(K):
    if (S[i] != '1'):
        print(S[i])
        break

if (index == 0):
    print(1)
else:
    print(int(S[index]))


S = input()
K = int(input())
ans = 1

for i in range(K):
    if (S[i] != '1'):
        ans = int(S[i])
        break

print(ans)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows:    * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`.  For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?

Submission attempts (in order):
s = input()
k = int(input())
l = []
for i in s:
    l.append(str(int(i)**(5*10**15)))
print("".join(l)[k-1])



s = input()
k = int(input())
cnt = 0
x = 0
for i in s:
    if i == "1":
        cnt += 1
    else:
        x = int(i)
        break
if k<=cnt:
    print(1)
else:
    print(x)
        


Verdicts: Time Limit Exceeded

Accepted
Problem: Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows:    * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`.  For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?

Submission attempts (in order):
S = input()
K = int(input())

for i in range(len(S)):
    if S[i] != '1': break

if i < K:
    print(1)

answer = S[i]
print(answer)


S = input()
K = int(input())

for i in range(len(S)):
    if S[i] != '1': break

nth = i + 1
if nth < K:
    print(1)

answer = S[i]
print(answer)


S = input()
K = int(input())

are_all_one = True
for i in range(len(S)):
    if S[i] != '1':
        are_all_one = False
        break

nth = i + 1
if are_all_one or K < nth:
    print(1)
    exit()

answer = S[i]
print(answer)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows:    * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`.  For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?

Submission attempts (in order):
s=list(input())
k=int(input())
c=0
for i in range(len(s)):
 if int(s[i])!=1:
  if i<k:
   print(s[i])
   break
  else:
   print(1)
   break​

s=list(input())
k=int(input())
if list(set(s))==['1']:
 print(1)
else:
 for i in range(len(s)):
  if int(s[i])!=1:
   if i<k:
    print(s[i])
    break
   else:
    print(1)
    break

Verdicts: Runtime Error

Accepted
Problem: Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows:    * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`.  For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?

Submission attempts (in order):
s=input()
i=1
while 1:
    if s[i-1]!=1:
        t=i 
        ans=s[i-1]
        break
    i+=1
if int(input())<=i:
    print(1);exit()
print(ans)

s=input()
i=1
while 1:
    if i==len(s)+1:
        print(1);exit()
    if s[i-1]!="1":
        t=i 
        ans=int(s[i-1])
        break
    i+=1
# print(t)
if int(input())<t:
    print(1);exit()
print(ans)


Verdicts: Wrong Answer

Accepted
Problem: Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows:    * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`.  For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?

Submission attempts (in order):

s = input()
k = int(input())

slist = list(s)
i = 0
count = 0
while slist[i] == 1:
    count += 1
    
if count == 0:
    print(slist[0])
elif count >= k:
    print(1)
else:
    print(slist[i+1])


s = input()
k = int(input())

slist = list(s)
i = 0
count = 0
while slist[i] == "1":
    count += 1
    i += 1
    if i >= len(slist):
        break
    
if count >= k:
    print(1)
else:
    print(slist[i])

Verdicts: Wrong Answer

Accepted
Problem: Mr. Infinity has a string S consisting of digits from `1` to `9`. Each time the date changes, this string changes as follows:    * Each occurrence of `2` in S is replaced with `22`. Similarly, each `3` becomes `333`, `4` becomes `4444`, `5` becomes `55555`, `6` becomes `666666`, `7` becomes `7777777`, `8` becomes `88888888` and `9` becomes `999999999`. `1` remains as `1`.  For example, if S is `1324`, it becomes `1333224444` the next day, and it becomes `133333333322224444444444444444` the day after next. You are interested in what the string looks like after 5 \times 10^{15} days. What is the K-th character from the left in the string after 5 \times 10^{15} days?

Submission attempts (in order):
s=input()
k=input()

for c in s:
  if c!='1':
    print(c)
else:
  print('1')

line = input()
flag = False
for i in range(int(input())):
  if not(line[i]== '1'):
    print(line[i])
    flag = True
    break

if flag:
  print('1')

line = input()
flag = True

for i in range(int(input())):
  if not(line[i]== '1'):
    print(line[i])
    flag = False
    break

if flag:
  print('1')


Verdicts: Wrong Answer

Wrong Answer

Accepted