Buggy python submission (verdict: Time Limit Exceeded):
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)

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

Buggy python submission (verdict: Runtime Error):
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)

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

Buggy python submission (verdict: Runtime Error):
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)

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

Buggy python submission (verdict: Runtime Error):
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)

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

Buggy python submission (verdict: Time Limit Exceeded):
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)

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

Buggy python submission (verdict: Time Limit Exceeded):
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)

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

Buggy python submission (verdict: Time Limit Exceeded):
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)

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