Buggy python submission (verdict: Runtime Error):
s = input()
k = int(input())
if len(s) == 1 or k == 1:
    print(s[0])
i = 0
while i < k and i < len(s):
    if s[i] != '1':
        break
    i += 1
print(s[i])


Fixed submission:
s = input()
k = int(input())
if len(s) == 1 or k == 1:
    print(s[0])
else:
    i = 0
    while i < k - 1 and i < len(s):
        if s[i] != '1':
            break
        i += 1
    print(s[i])

Buggy python submission (verdict: Runtime Error):
import math
s = input()
k = int(input())

i = 0
while i < k and i < len(s):
    if s[i] != '1':
        break
    i += 1
print(s[i])

Fixed submission:
s = input()
k = int(input())
if len(s) == 1 or k == 1:
    print(s[0])
else:
    i = 0
    while i < k - 1 and i < len(s):
        if s[i] != '1':
            break
        i += 1
    print(s[i])

Buggy python submission (verdict: Runtime Error):
import math
s = input()
k = int(input())

i = 0
while i < k:
    if s[i] != '1':
        break
    i += 1
print(s[i])


Fixed submission:
s = input()
k = int(input())
if len(s) == 1 or k == 1:
    print(s[0])
else:
    i = 0
    while i < k - 1 and i < len(s):
        if s[i] != '1':
            break
        i += 1
    print(s[i])

Buggy python submission (verdict: Runtime Error):
import math
s = input()
k = int(input())

i = 0
while i < len(s):
    if math.log(int(s[i])) * (500 * 10 **12 - 1) > math.log(k):
#         print(i, s[i], int(s[i]) ** (500 * 10 *12))
        break
    i += 1
print(s[i])

Fixed submission:
s = input()
k = int(input())
if len(s) == 1 or k == 1:
    print(s[0])
else:
    i = 0
    while i < k - 1 and i < len(s):
        if s[i] != '1':
            break
        i += 1
    print(s[i])

Buggy python submission (verdict: Runtime Error):
import math
s = input()
k = int(input())

i = 0
while i < len(s):
    if math.log(int(s[i])) * (500 * 10 **12 - 1) >= math.log(k):
#         print(i, s[i], int(s[i]) ** (500 * 10 *12))
        break
    i += 1
print(s[i])

Fixed submission:
s = input()
k = int(input())
if len(s) == 1 or k == 1:
    print(s[0])
else:
    i = 0
    while i < k - 1 and i < len(s):
        if s[i] != '1':
            break
        i += 1
    print(s[i])

Buggy python submission (verdict: Runtime Error):
import math
s = input()
k = int(input())

i = 0
while i < len(s):
    if math.log(int(s[i])) * (500 * 10 **12) >= math.log(k):
#         print(i, s[i], int(s[i]) ** (500 * 10 *12))
        break
    i += 1
print(s[i])

Fixed submission:
s = input()
k = int(input())
if len(s) == 1 or k == 1:
    print(s[0])
else:
    i = 0
    while i < k - 1 and i < len(s):
        if s[i] != '1':
            break
        i += 1
    print(s[i])

Buggy python submission (verdict: Runtime Error):
import math
s = input()
k = int(input())

i = 0
while i < len(s):
    if int(math.log(s[i])) * (500 * 10 **12) >= math.log(k):
#         print(i, s[i], int(s[i]) ** (500 * 10 *12))
        break
    i += 1
print(s[i])

Fixed submission:
s = input()
k = int(input())
if len(s) == 1 or k == 1:
    print(s[0])
else:
    i = 0
    while i < k - 1 and i < len(s):
        if s[i] != '1':
            break
        i += 1
    print(s[i])

Buggy python submission (verdict: Runtime Error):
s = input()
k = int(input())

i = 0
while i < len(s):
    if int(s[i]) ** (500 * 10 **12) >= k:
#         print(i, s[i], int(s[i]) ** (500 * 10 *12))
        break
    i += 1
print(s[i])

Fixed submission:
s = input()
k = int(input())
if len(s) == 1 or k == 1:
    print(s[0])
else:
    i = 0
    while i < k - 1 and i < len(s):
        if s[i] != '1':
            break
        i += 1
    print(s[i])

Buggy python submission (verdict: Runtime Error):
s = input()
k = int(input())

i = 0
while i < len(s):
    if int(s[i]) ** (500 * 10 *12) >= k:
#         print(i, s[i], int(s[i]) ** (500 * 10 *12))
        break
    i += 1
print(s[i])

Fixed submission:
s = input()
k = int(input())
if len(s) == 1 or k == 1:
    print(s[0])
else:
    i = 0
    while i < k - 1 and i < len(s):
        if s[i] != '1':
            break
        i += 1
    print(s[i])