TnT/Multi_CodeNet4Repair huggingface dataset:
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 = str(input())
k = int(input())
for i in s:
    if i != "1":
        print(str(i))
        break
    else:
        print("1")


s = str(input())
k = int(input())
for i in s:
    if i != "1":
        print(str(i))
        break
    else:
        print("1")
        break


s = str(input())
k = int(input())
for i in range(k):
    if s[i] != "1":
        print(s[i])
        exit()
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())
for i in range(min(len(s), k)):
  if s[i] != '1':
    print(c)
    break
else:
  print(s[k - 1])


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


s = input()
k = int(input())
for i in range(min(len(s), k)):
  if s[i] != '1':
    print(s[i])
    break
else:
  print(s[k - 1])


Verdicts: 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())
if list(s)[0] == 1:
  print(list(s)[1])
else:
  print(list(s)[0])

s = list(input())
k = int(input())
for i in range(len(s)):
  if s[i] != "1":
    break
if k-1 < i:
  print("1")
else:
  print(s[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):
import sys
s = input()
k = int(input())
k = min(k,len(s))
i = 0
while i < k:
  if s[i] != 1:
    print(s[i])
    sys.exit()
  i += 1
print(1)

import sys
s = input()
k = int(input())
k = min(k,len(s))
i = 0
flag = 0
while i < k:
  if int(s[i]) != 1:
    print(s[i])
    flag = 1
    sys.exit()
  i += 1
if flag == 0:
  print(1)

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):
import math
time = 5 * 10**15

num = input()
k = int(input())

chk = 0
count = 0
while chk == 1:
    if num[0] == '1':
        a.pop(0)
        count += 1
    else:
        chk = 1

if k <= count:
    print(1)
else:
    print(num[0])


import math
time = 5 * 10**15

num = input()
k = int(input())

chk = 0
while chk == 1:
    if num[0] == '1':
        a.pop(0)
    else:
        chk = 1

print(num[0])


import math
time = 5 * 10**15

num = list(input())
k = int(input())

chk = 0
count = 0
while chk == 0:
    if num[0] == '1':
        num.pop(0)
        count += 1
        if len(num)==0:
            break
    else:
        chk = 1

if k <= count:
    print(1)
else:
    print(num[0])


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 = input()
for s in S:
  if s != 1:
    print(s)
    break

S = input()
K = int(input())
f = True
for i in range(K):
  if S[i] != 1:
    print(S[i])
    f = False
    break
if f:
  print(S[K-1])

S = input()
K = int(input())
f = True
for i in range(K):
  if S[i] != "1":
    print(S[i])
    f = False
    break
if f:
  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())
if K == 1:
    print(S[0])
elif S[K] == "1":
    print(1)
else:
    for i in range(len(S)):
        if S[i] != "1":
            print(S[i])
            exit()


S = input()
K = int(input())
for i in range(len(S)):
    if S[i] != 1:
        print(S[i])
        exit()
print(1)

S = input()
K = int(input())
for i in range(len(S):
    if S[i] != 1:
        print(S[i])
        exit()

S = input()
K = int(input())
if K == 1:
    print(S[0])
    exit()
for i in range(len(S)):
    if S[i] != 1:
        print(S[i])
        exit()
print(1)


S = input()
K = int(input())
for i in range(len(S)):
    if S[i] != 1:
        print(S[i])
        exit()

S = input()
K = int(input())
if K == 1:
    print(S[0])
    exit()
else:
    for i in range(K):
        if S[i] != "1":
            print(S[i])
            exit()
print(1)

Verdicts: Runtime Error

Wrong Answer

Runtime Error

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())
if min(s) == '1' or k <= s.count('1'): print(1)
else: print(min(s))

s=input()
k=int(input())
for i in range(k):
	if s[i] != '1':
		print(s[i]);exit()
print(1)

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())
if S[0] == 1 and K == 1:
    print(S[0])
else:
    print(S[0])

S = input()
K = int(input())
for s in S:
    if s == "1":
        if K == 1:
            print(1)
            break
        k -= 1
        continue
    print(s)
    break

S = input()
K = int(input())
if S[0] == 1 and K > 1:
    print(S[1])
else:
    print(S[0])

S = input()
K = int(input())
for s in S:
    if s == "1":
        if K == 1:
            print(1)
            break
        K -= 1
        continue
    print(s)
    break

Verdicts: Wrong Answer

Runtime Error

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_len=len(input())
K=int(input())
for i in range(S_len):
  if(int(a[0][i])==1):
    K-=1
    if(K<=0):
      print("1")
      break
  else:
    print(a[0][i])
    break

a=input().split("¥n")
S_len=len(a[0])
K=int(a[1])
for i in range(S_len):
  if(int(a[0][i])==1):
    K-=1
    if(K<=1):
      print("1")
      break
  else:
    print(a[0][i])
    break


    a=input().split("¥n")
    goal=int(a[1])
    keta=len(a[0])
    for i in range(keta):
        if(int(a[0][i])==1):
            goal-=1
            if(goal<=0):
                print("1")
                break
        else:
            print(a[0][i])
            break

a=input().split("¥n")
K=int(a[1])
S_len=len(a[0])
for i in range(S_len):

    if(int(a[0][i])==1):
        K-=1
        if(K<=0):
            print("1")
            break

    elif(int(a[0][i])==2):
        K2=format(K,'b')
        K2_len=len(K2)
        K2_len-=5000*10000*10000*10000
        if(K2_len<=0):
            print("2")
            break
        K=pow(2, K2_len)

    else:
        print(a[0][i])
        break

    a=input().split("¥n")
    goal=int(a[1])
    keta=len(a[0])
    for i in range(keta):
        if(int(a[0][i])==1):
            goal-=1
            if(goal<0):
                print("1")
                break
        else:
            print(a[0][i])
            break

a=input().split("¥n")
goal=int(a[1])
keta=len(a[0])
for i in range(keta):
    if(int(a[0][i])==1):
        goal-=1
        if(goal<=0):
            print("1")
            break
    else:
        print(a[0][i])
        break

S=input()
S_len=len(S)
K=int(input())
for i in range(S_len):
  if(int(S[i])==1):
    K-=1
    if(K<=0):
      print("1")
      break
  else:
    print(S[i])
    break

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

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=list(input())
k=int(input())
if len(s)==1 or k==1:
    print(int(s[0]))
else:
    for i in range(len(s)):
        if int(s[i])==1 or i!=len(s)-1 or i<k:
            continue
        else:
            print(int(s[i]))
            break

s=list(input())
k=int(input())
if len(s)==1 or k==1:
    print(int(s[0]))
else:
    for i in range(len(s)):
        if int(s[i])==1 and i!=len(s)-1 and (i+1)<k:
            continue
        else:
            print(int(s[i]))
            break

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())
a = 10 ** 18
print(a)
counter = 0
for i in S:
    if int(i) != 1:
        log = counter
        num = int(i)
        break
    counter += 1

if K == 1:
    print(S[0])
elif K <= log:
    print(1)
else:
    print(num)


S = input()
K = int(input())
counter = 0
num = 1
log = 0
for i in S:
    if int(i) != 1:
        log = counter
        num = int(i)
        break
    counter += 1

if K <= log:
    print(1)
else:
    print(num)


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()
k=int(input())
it=int(-1)
sum=int(0)
for i in s:
    if i == '1':
        sum+=1
    else:
        it=i

if k<=int(it):
    print(1)
elif it == int(-1):
    print(1)
else:
    print(s[it])

s=input()
k=int(input())
it=int(-1)
sum=int(0)
for i in s:
    if i == '1':
        sum+=1
    else:
        it=i

if k<=it:
    print(1)
elif it is -1:
    print(1)
else:
    print(s[it])

s=input()
k=int(input())
it=int(-1)
sum=int(0)
for i in s:
    if i == '1':
        sum+=1
    else:
        it=sum
        break

if k<=int(it):
    print(1)
elif it == int(-1):
    print(1)
else:
    nex=int(it)+int(1)
    print(s[it:nex])

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

count = 0
for i in s:
  	count += 1
    if i != "1" or (count == n):
        print(i)
        break
else:
    print(1)

s = input()
n = int(input())

count = 0
for i in s:
  	count += 1
    if i != "1" or count == n:
        print(i)
        break
else:
    print(1)

s = input()
n = int(input())
 
count = 0
for i in s:
    count+=1
    if i != "1" or count == n:
        print(i)
        break
else:
    print(1)

Verdicts: 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):
import math
N = 5000000000000000
print(N)
S = input()
K = int(input())
for i in S:
  num = int(i)
  if N * math.log(num) > math.log(K):
    print(num)
    break
  else:
    K -= num

import math
N = 5000000000000000
print(N)
S = input()
K = math.log(int(input()))
for i in S:
  num = int(i)
  kk = N * math.log(num)
  if kk > K:
    print(num)
    break
  else:
    K -= kk

import math
N = 5000000000000000
print(N)
S = input()
K = math.log(int(input()))
for i in S:
  num = int(i)
  kk = N * math.log(num)
  if kk >= K:
    print(num)
    break
  else:
    K -= kk

import math
N = 5000000000000000
S = input()
K = math.log(int(input()))
for i in S:
  num = int(i)
  if num == 1:
    if num == int(math.exp(K)):
      print(num)
      break
    else:
      K = math.log(int(math.exp(K)-1))
      continue
  kk = N * math.log(num)
  if kk >= K:
    print(num)
    break
  else:
    K -= kk

Verdicts: Runtime Error

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 = str(input())
k = int(input())
for i in range(k):
    if s[i] != 1:
        print(s[i])
        exit()
print(1)

s = str(input())
k = int(input())
for i in range(k):
    if s[k] != 1:
        print(s[k])
        exit()
print(1)

s = str(input())
k = int(input())
for i in range(k):
    if s[i] != "1":
        print(s[i])
        exit()
print(1)

Verdicts: Wrong Answer

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 = str(input())
K = int(input())

if len(S) == 1:
        print(S[0])
elif S[0] == 1:
        print(S[1])
else:
        print(S[0])

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

if len(S) == 1:
        print(S[0])
        exit(0)

i = 0
while S[i] == '1' and i <= len(S)-2:
        if K <= i + 1:
                print(S[i])
                exit(0)
        i += 1
print(S[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 = int(input())


check = 0

if len(S) == 1:
    print(S[0])


for i in range(len(S)):
    if S[i] == 1:
        check = 1
    else:
        print(S[i])
        exit()
        check = -1
    
    if K == i and check == 1:
        print("1")
        exit()




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


check = 0

if len(S) == 1:
    print(S[0])
    exit()

for i in range(len(S)):
    if S[i] == 1:
        check = 1
    else:
        check = -1
    
    if K == i and check == 1:
        print("1")
        exit()

print(S[0])
    



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


check = 0

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


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):
# coding:utf-8
s=input()
k=int(input())
list=list(s)
ans=1
for i in range(min(k,list.len())):
    if not list[i] == 1:
        ans=list[i]
        break
print(ans)


# coding:utf-8
s=input()
k=int(input())
lists=list(s)
ans=1
for i in range(min(k,len(lists))):
    if not lists[i] == "1":
        ans=lists[i]
        break
print(ans)


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

for _s in s:
    if _s == "1":
        if k == 1:
            print(1)
            break
        else:
            k -= 1
    else:
        print(i)
        break


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

for _s in s:
    if _s == "1":
        if k == 1:
            print(1)
            break
        else:
            k -= 1
    else:
        print(_s)
        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()
k = int(input())

for i in range(len(s)):
    if s[i] != '1':
        if i > k:
            print(int(s[i]))
            exit()
        else:
            print(1)
            exit()

print(1)


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

for i in range(len(s)):
    if s[i] != '1':
        if i > k:
            print(int(s[i]))
            exit()
        else:
            print(1)

print(1)


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

for i in range(len(s)):
    if s[i] != '1':
        if k > i:
            print(int(s[i]))
        else:
            print(1)
        exit()

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())
ans = 0
if(k == 1):
    ans = s[0]
else:
    ans = s[0]
    
print(ans)

s = input()
k = int(input())
ans = 0
if(s[0] == 1 and k != 1):
    ans = s[1]
else:
    ans = s[0]
    
print(ans)

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

s = input()
k = int(input())
ans = "1"
for i in range(min(len(s), k)):
    if(s[i] != "1"):
        ans = s[i]
        break
print(ans)

Verdicts: Wrong Answer

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

if len(S) == 1:
    print(S)
else:
    if K == 1:
        print(1)
    else:
        print(S[2])

S = input()
K = int(input())
judge = True
for i in range(len(S)):
    if S[i] !="1":
        # judge = False
        if (i+1) <= K: 
            print(S[i])
            exit()
print(1)

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):
N = input()
K = int(input())
ans = '1'
for i in range(K):
  if i >= len(N):
    break
  if N[i] != '1':
    ans = N[i]
  	break
print(ans)
  

N = input()
K = int(input())
if len(N) == 1:
  print(N[0])
elif K = 1:
  print(N[0])
elif N[0] == '1':
  print(N[1])
else:
  print(N[0])
  

N = input()
K = int(input())
ans = '1'
for i in range(K):
  if i >= len(N):
    break
  if N[i] != '1':
    ans = N[i]
    break
print(ans)

Verdicts: 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 = list(input())
K = int(input())
for c in S:
    if c != "1":
        print(c)
        break
print("1")


S = input()
K = int(input())
if S[0] == "1":
    print(list(set(S))[1])
else:
    print(S[0])


S = input()
K = int(input())
if S[0] == "1":
    if K == 1:
        print(1)
    else:
        S.replace("1", "")
        print(S[0])
else:
    print(S[0])


S = input()
K =int(input())
if K == S[:K].count("1"):
    print(1)
else:
    for c in S:
        if c != "1":
            print(c)
            break

Verdicts: Wrong Answer

Runtime Error

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):
print(s=input().replace("1","")[0])

s=input();k=int(input());print(1 if s[0:k]=="1"*k else input().replace("1","")[0])

def main():
  s=input()
  k=int(input())
  for i in s[:k]:
    if i!="1":
      print(i)
      return
  print("1")
main()

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

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

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

if S[0] != 1:
  print(S[0])
elif S[0] == 1 and K > 1:
  print(S[1])
else:
  print(1)

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

if S[0] != 1 and len(S) != 1:
  print(S[0])
elif S[0] != 1 and len(S) == 1:
  print(S[0])
else:
  print(1)

# ans

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

if S[0:K].count('1') == K:
  print(1)
  exit()
  
for i in range(K):
  if S[i] != '1':
    print(S[i])
    exit()

Verdicts: Wrong Answer

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())
if list(set(S)) == ["1"]:
    print(1)
elif S[0] == "1" and K > 1:
    ind = 1
    while S[ind] == "1":
        ind += 1
    if ind > K:
        print(S[ind])
    else:
        print(1)
else:
    print(S[0])


S = input()
K = int(input())
if S[0] != "1":
    print(S[0])
else:
    ind = 0
    while S[ind] == "1" and ind < len(S) - 1:
        ind += 1
    if ind < K:
        print(S[ind])
    else:
        print("1")


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

def ones(s):
    ss = s[0]
    idx = 0
    while ss=="1":
        idx += 1
        ss = s[idx]
    return idx

if s[0]!="1":
    print(s[0])
else:
    idx = ones(s)
    if idx>=k:
        print("1")
    # else:
        # print(s[idx])


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

def ones(s):
    ss = s[0]
    idx = 0
    while ss=="1" and idx+1 < len(s):
        idx += 1
        ss = s[idx]
    return idx

if s[0]!="1":
    print(s[0])
else:
    idx = ones(s)
    if idx>=k:
        print("1")
    else:
        print(s[idx])


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

a = [int(c) for c in s]
k=int(input())
strong=0
for some in range(k):
  if a[some]==1:
    strong+=1
  if strong==k-1:
    print(some)
  if a[some]!=1:
    print(some)
    break


s=input()
lists=[int(integer)for integer in s] 
nums=int(input())

numbers=0 
strong=0 


for j in lists:
    if lists[0]!=1:
        break
    else:
        if j==1:
            numbers+=1
        else:
            break

if lists[0]==1:
    if numbers>=nums:
        print(1)
        
    elif numbers<nums:
        print(lists[numbers])
else:
    print(lists[0])

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().strip()
k = int(input())
for i, c in enumerate(S, 1):
  if c != '1' or i == k:
print(c)

S = input().strip()
k = int(input())
for i, c in enumerate(S, 1):
  if c != '1' or i == k:
    break
print(c)

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()
K = input()

print(S[1])

if S[0] != "1":
    print(S[0])
else:
    if S[1] != "1":
        print(S[1])
    else:
        if S[2] != "1":
            print(S[2])
        else:
            if S[3] != "1":
                print(S[3])
            else:
                print(1)




S = input()
K = input()

if S[0] == 1 and S[1] == 1 and S[2] == 1 and S[3] == 1:
    print(1)
elif S[0] == 1 and S[1] == 1 and S[2] == 1:
    print(S[3])
elif S[0] == 1 and S[1] == 1:
    print(S[2])
elif S[0] == 1:
    print(S[1])
else:
    print(S[0])

S = input()
K = input()

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





Verdicts: Runtime Error

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 = int(input())
k = int(input())
 
ans=0
 
n  = 5000000000000000
 
S = str(s) 
saisho = 0
L = len(S)
 
for i in range(L):
  N = int(S[i])
  if k <= saisho+1:
    ans = N
    break
    
  else:
    if N == 1:
      Nn == 1
    else:
      Nn = N**n
    saisho += N**n
    
print(ans)

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

ans=0

n  = 5000000000000000

S = str(s) 
saisho = 0

for i in range(len(S)):
  N = int(S[i])
  if saisho <= k <= saisho + N**n:
    ans = N
    break
    
  else:
    saisho += N**n
    
print(ans)

s = int(input())
k = int(input())
 
ans=0
 
n  = 5000000000000000
 
S = str(s) 
saisho = 0
 
for i in range(len(S)):
  N = int(S[i])
  if k <= saisho+1:
    ans = N
    break
    
  else:
    if N ==1:
      Nn = 1
    else:
      Nn = N**n
    saisho += Nn
    
print(ans)

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

ans=0

n  = 5000000000000000

S = str(s) 
saisho = 0

for i in range(len(S)):
  N = int(S[i])
  if saisho <= k <= saisho + N**n:
    print(k)
    print(saisho+N**n)
    ans = N
    break
    
  else:
    saisho += N**n
    
print(ans)

s = int(input())
k = int(input())
 
ans=0
 
n  = 5000000000000000
 
S = str(s) 
L = len(S)
saisho = 0
 
for i in range(L):
  N = int(S[i])
  if N == 1:
    Nn == 1
  else:
    Nn = N**n
    
  if saisho <= k <= saisho + Nn:
    ans = N
    break
    
  else:
    if N ==1
      Nn ==
    saisho += Nn
    
print(ans)

s = int(input())
k = int(input())
 
ans=0
 
n  = 5000000000000000
 
S = str(s) 
L = len(S)
saisho = 0
 
for i in range(L):
  N = int(S[i])
  if N == 1:
    Nn == 1
  else:
    Nn = N**n
    
  if saisho <= k <= saisho + Nn:
    ans = N
    break
    
  else:
    saisho += Nn
    
print(ans)

s = int(input())
k = int(input())
 
ans=0
 
n  = 5000000000000000
 
S = str(s) 
saisho = 0
 
for i in range(len(S)):
  N = int(S[i])
  if k <= saisho+1:
    ans = N
    break
    
  else:
    saisho += N**n
    
print(ans)

s = int(input())
k = int(input())
 
ans=0
 
n  = 5000000000000000
 
S = str(s) 
L = len(S)
saisho = 0
 
for i in range(L):
  N = int(S[i])
  Nn = N**n
  if saisho <= k <= saisho + Nn:
    ans = N
    break
    
  else:
    saisho += Nn
    
print(ans)

s = int(input())
k = int(input())
S = str(s) 

ans=0

for i in range(k):
  N = int(S[i])
  
  if N == 1:
    ans = 1
  else:
    ans = N
    break  
print(ans)

Verdicts: Runtime Error

Time Limit Exceeded

Time Limit Exceeded

Wrong Answer

Runtime Error

Runtime Error

Time Limit Exceeded

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 s in S:
    if s == "1":
        K -= 1
    if K <= 0:
        print(s)
        exit()
    else:
        print(s)
        exit()

S = input()
K = int(input())
for s in S:
  if int(s)==1:
	K-=1
    if K==0:
      print(s)
      exit()
  else:
    print(s)
    exit()

S = input()
K = int(input())
for s in S:
    if int(s) == 1:
        K -= 1
        if K == 0:
            print(s)
            exit()
    else:
        print(s)
        exit()

Verdicts: Wrong Answer

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

t = 0
u = s[0]

for i in range(len(s)):
	t +=1
	u = s[i]
	if s[i] !="1":
		break
if t<k+1:
	print(u)
else:
	print(1

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

t = 0
u = s[0]

for i in range(len(s)):
	t +=1
	u = s[i]
	if s[i] !="1":
		break
if t<k+1:
	print(u)
else:
	print(1

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

t = 0
u = s[0]

for i in range(len(s)):
	t +=1
	u = s[i]
	if s[i] !="1":                 
		break
if t<k+1:
	print(u)
else:
	print(1)

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

def check_one(sgn,arr):
    cnt = 0
    for i in range(sgn):
        if S[i] == '1':
            cnt += 1
    if cnt == sgn:
        return True

def first_num(arr):
    for i in range(len(S)):
        if S[i] != '1':
            return int(S[i])
            break

if len(S) >= K:
    if check_one(K,S):
        print(1)
else:
    print(first_num(S))
    

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

def check_one(sgn,arr):
    cnt = 0
    for i in range(sgn):
        if S[i] == '1':
            cnt += 1
    if cnt == sgn:
        return True

def first_num(arr):
    list = []
    for i in range(len(arr)):
        if arr[i] != '1':
            list.append(int(arr[i]))
    return list[0]
            

if len(S) >= K and check_one(K,S):
        print(1)
else:
    print(first_num(S))
    

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


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

lst = []
while S > 0:
    lst.append(S%10)
    S //= 10 
lst.reverse()

if len(lst) == lst.count(1):
	print(1)

elif K == lst[:K].count(1):
	print(1)
  
else:
	for i in range(K):
		if lst[i] != 1:
			print(lst[i])
			break


  
  

Verdicts: Runtime Error

Accepted