TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
n,k = map(int, input().split())
s = input()

b = ""
for i in range(n):
  if i == k-1:
    b += s[i].lower
  else:
    b += s[i]
    
print(b)

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

b = ""
for i in range(n):
  if i == k-1:
    b += s[i].lower
  else:
    b += s[i]
    
print(b)

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

b = ""
for i in range(n):
  if i == k-1:
    b += s[i].lower()
  else:
    b += s[i]
    
print(b)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
N, K = input().split()
S = input()

if K==1 :
    str1 = ''
else :
    str1 = S[0:K-2]

if K==N:
    str3 = ''
else :
    str3 = S[K:N]

before = S[K-1]
str2 = before.lower()

print(str1+str2+str3)

#INPUT
#N K
#S





#ex
#3 1
#ABC

#OUTPUT


N, K =  map(int, input().split())
S = input()

if K==1 :
    str1 = ''
else :
    str1 = S[0:K-1]

if K==N:
    str3 = ''
else :
    str3 = S[K:N]

before = S[K-1]
str2 = before.lower()

print(str1+str2+str3)

Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
N,M=[int(i) for i in input().split()]
S=input()
print(S[:M-1]+S[M-1].lower()+S[M:]

N,M=[int(i) for i in input().split()]
S=input()
print(S[:M-1]+S[M-1].lower()+S[M:])

Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

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

S[K - 1] = S[K - 1].lower()
print(''.join(S))


N = input()
K = input()
S = list(input())

S[K - 1] = S[K - 1].lower()
print(''.join(S))


s = list(str(i) for i input().split())
n = int(input())
k = int(input())

s = s[k]
s = s.lower()
print(s)


s = list(n)
up = str(s[k])
s = up.lower()

print(s)


for s in range(n):
    s = str(s[k])
    s = s.lower()

print(s)


for i in range(n):
    s = 'i'.lower()

print(s)


s = range(n)
s = s.lower(k)
print(s)


s = list(1:n)
s = str(s[k])
s = s.lower()
print(s)


n = int(input())
k = int(input())
s = [str(i) for i in range(n)]

sl = s[k]
sk = sl.lower()
print(sk)


n = int(input())
k = int(input())
s = list(str(n) for n input().split())

s = s[k]
s = s.lower()
print(s)


for s in range(n):
    s = s.lower(k)

print(s)


s = list(1:n)
s = s.lower(k)
print(s)


N, K = (int(i) for i in input().split())
S = list(input())

S[K - 1] = S[K - 1].lower()
print(''.join(S))


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
N, K = map(int, input().split())
s = str(input())
ss = list(s)
ss[K-1] == ss[K-1].lower()
print("".join(ss))

N, K = map(int, input().split())
s = input()
list = list(s)
list[K-1] == list[K-1].lower
print("".join(list))

N, K = map(int, input().split())
s = str(input())
ss = list(s)
ss[K-1] = ss[K-1].lower()
print("".join(ss))


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
a = input().split()
N, K = int(a[0]), int(a[1])
S = input()
S_list = list(S)
S_list[K-1]=S_list[K-1].lower()
S = "".join(S_list)
S

a = input().split()
N, K = int(a[0]), int(a[1])
S = input()
S_list = list(S)
S_list[K-1]=S_list[K-1].lower()
S = "".join(S_list)
print(S)

Verdicts: Wrong Answer

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
n,k=map(int, input().split())
s=str(input())
S=list(s)
if S[k-1]=='A':
  S[k-1]='a'
elif S[k-1]=='B':
  S[k-1]='b'
else:
  S[k-1]='c'
print(','.join(S))

n,k=map(int, input().split())
s=str(input())
S=list(s)
if S[k]=='A':
  S[k]='a'
elif S[k]=='B':
  S[k]='b'
else:
  S[k]='c'
print(','.join(S))

n,k=map(int, input().split())
s=str(input())
S=list(s)
if S[k-1]=='A':
  S[k-1]='a'
elif S[k-1]=='B':
  S[k-1]='b'
else:
  S[k-1]='c'
print(''.join(S))

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
N, K = map(int, input().split())
S = list(input())
if S[K-1] == "A":
  S[K-1] = "a"
elif S[K-1] == "B":
  S[K-1] = "b"
else:
  S[K-1] = "c"
print(str(S))


N, K = map(int, input().split())
S = input()
if S[K-1] == "A":
  S[K-1] = "a"
elif S[K-1] == "B":
  S[K-1] = "b"
elif S[K-1] == "C":
  S[K-1] = "c"
else:
  continue
print(S)


N, K = map(int, input().split())
S = input()
if S[K] == "A":
  S[K] = "a"
if S[K] == "B":
  S[K] = "b"
if S[K] == "C":
  S[K] = "c"
print(S)


N, K = map(int, input().split())
S = input()
if S[K-1] == "A":
  S[K-1] = "a"
elif S[K-1] == "B":
  S[K-1] = "b"
else:
  S[K-1] = "c"
print(S)


N, K = map(int, input().split())
S = list(input())
if S[K-1] == "A":
  S[K-1] = "a"
elif S[K-1] == "B":
  S[K-1] = "b"
else:
  S[K-1] = "c"
print(S)


N, K = map(int, input().split())
S = str(input())
if S[K-1] == "A":
  S[K-1] = "a"
elif S[K-1] == "B":
  S[K-1] = "b"
else:
  S[K-1] = "c"
print(S)


N, K = map(int, input().split())
S = input()
if S[K] == "A":
  S[K] = "a"
elif S[K] == "B":
  S[K] = "b"
else:
  S[K] = "c"
print(S)

N, K = map(int, input().split())
S = list(input())
if S[K-1] == "A":
  S[K-1] = "a"
elif S[K-1] == "B":
  S[K-1] = "b"
else:
  S[K-1] = "c"
ans = "".join(S)
print(ans)


Verdicts: Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
n,k=map(int,input().split())
s=input()

print(s[:k-1]+s[k-1]>lower()+s[k])


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

s1=s[:k+1]
s2=s[k+1]
s3=s[k+2:]

if s2=="A":
    s2="a"
elif s2=="B":
    s2="b"
else:
    s2="c"

print(s1+s2+s3)


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

s=s[:k-1]+s[k-1].lower()+s[k:]

print(s)


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
N, K = map(int, input().split())
S = input()

S[K-1]=S[K-1].lower()
print(S)

N,K = map(int,input().split())
S = input()

se = ''
for i in range(N):
    if i == K-1:
        se += S[K-1].lower()
    else:
        se += S[i]
print(se)

Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
a = input().split()
b = input()
 
list = list(b)
 
for i in list:
  if i == int(a[1]) - 1:
    list[i] = list[i].lower()
    
print(''.join(list))

a = input().split()
b = input()

list = list(b)

for i in list:
  if i == a[1] - 1:
    list[i] = list[i].lower()
    
print(''.join(list))

a = input().split()
b = input()
 
c = list(b)
 
for i in range(len(c)):
  if i == int(a[1]) - 1:
    c[i] = c[i].lower()
    
print(''.join(c))

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
N, K = map(int, input().split())
S = list(input())

if S[K-1] == 'A':
  S[K-1] = 'a'
elif S[K-1] == 'B':
  S[K-1] = 'b'
else:
  S[K-1] = 'c'
  
print(S)

N, K = map(int, input().split())
S = list(input())

if S[K-1] == 'A':
  S[K-1] = 'a'
elif S[K-1] == 'B':
  S[K-1] = 'b'
else:
  S[K-1] = 'c'
  
ans = ''
for i in range(len(S)):
  ans += S[i]
  
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
n,k = map(str, input().split())
s = str(input()) 

k_lower = s[:k-1]+s[k-1].lower()+s[k:]
print(k_lower)

n,k = map(str, input().split())
s = str(input()) 

k_lower = s.lower(k-1)
print(k_lower)


s = str(input()) 

k_lower = s[:k-1]+s[k-1].lower()+s[k:]
print(k_lower)


n,k = map(int, input().split())
s = list(input()) 

k_lower = s[:k-1]+s[k-1].lower()+s[k:]
print(k_lower)


n,k = map(int, input().split())
s = str(input()) 

print(s[:k-1]+s[k-1].lower()+s[k:])


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
a, b = map(int, input().split())
c = input()
print(c[b-1:]+str.lower(c[b-1])+c[:b])


a, b = map(int, input().split())
c = input()
c[b-1] += 32
print(c)

a, b = map(int, input().split())
c = input()
print(c[:b-1]+str.lower(c[b-1])+c[b:])


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
_, k, s = map(int, open(0).read().split())
s[k-1] = chr(ord(s[k-1])+26)
print(s)

_, k, s = map(int, open(0).read().split())
s[k-1] == chr(ord(s[k-1])+26)
print(s)

_, k, s = map(int, open(0).read().split())
s[k-1] ==chr(ord(s[k-1])+26)
print(s)

k = int(input()[2:])
s = list(input())
s[k-1] = chr(ord(str(s[k-1])) + 32)
print("".join(s))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
s = str(input())
first = s[0] + s[1]
second = s[2] + s[3]
if int(first) <= 12 and int(first) > 0 and (int(second) > 12 or int(second) == 0):
    print("MMYY")
elif int(second) <= 12 and int(second) > 0 and (int(first) > 12 or int(first) == 0):
    print("YYMM")
elif int(second) <= 12 and int(second) > 0 and int(first) <= 12 and int(first) > 0:
    print("AMBIGUOUS")
else:
    print("NA")


n,k = input().split()
s = input()
n = int(n)
k = int(k)
a = list(s)
a[k-1] = a[k-1].lower()
print(''.join(a))

Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
n, k = [x for x in input()]
s = input()

s[k-1] = s[k-1].lower()
print(s)

n, k = [int(x) for x in input().split()]
s = list(input())

s[k-1] = s[k-1].lower()
s = "".join(s)
print(s)

Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
N , K = map(int,input().split())
S = str(input())

for i in range(1,N+1):
    if i == K :
        S[i] = S[i].lower()
print(S)

N , K = map(int,input().split())
S = str(input())

for i in range(1:N+1):
    if i == K :
        S[i] == S[i].lower()
print(S)

N , K = map(int,input().split())
S = str(input())

for i in S:
    if i == K :
        S[i] == S[i].lower()
print(S)

N , K = map(int,input().split())
S = str(input())

for i in N:
    if i == K :
        S[i] == S[i].lower()
print(S)

N , K = map(int,input().split())
S = str(input())

for i in range(1,N+1):
    if i == K :
        S[i] == S[i].lower()
print(S)

N , K = map(int,input().split())
S = str(input())

for i in range(N):
    if i == K :
        S[i] == S[i].lower()
print(S)

N , K = map(int,input().split())
S = list(input())

for i in range(1,N+1):
    if i == K :
        S[i-1] = S[i-1].swapcase()
print(''.join(S))

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
N, K = (int(i) for i in input().split())
S = list(input())
print(S)
K -= 1
x = S.pop(K)

if x == 'A':
  x = 'a'
elif x == 'B':
  x = 'b'
else:
  x = 'c'
S.insert(K, x)
ans = ''
for i in S:
  ans += i
print(ans)

N, K = (int(i) for i in input().split())
S = list(input())
print(S)
K -= 1
x = S.pop(K)

if x == 'A':
  x = 'a'
elif x == 'B':
  x = 'b'
else:
  x = 'c'
S.insert(K, x)
ans = ''
for i in S:
  ans += i
print(ans)

N, K = (int(i) for i in input().split())
S = list(input())
K -= 1
x = S.pop(K)

if x == 'A':
  x = 'a'
elif x == 'B':
  x = 'b'
else:
  x = 'c'
S.insert(K, x)
ans = ''
for i in S:
  ans += i
print(ans)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
N, K = map(int, input().split())
S = input()

ans = S[:K-1] + S[K-1].lower() + S[K:]
print(ans3 1) 

N, K = map(int, input().split())
S = input()
 
ans = S[:K-1] + S[K-1].lower() + S[K:]
print(ans) 

Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
from collections import defaultdict
import sys
sys.setrecursionlimit(10**7)

n = int(input())
seen = [-1]*(n+1)
path = defaultdict(dict)

for _ in range(n-1):
    u, v, w = map(int, input().split())
    path[u][v] = w
    path[v][u] = w


def dfs(seen, pos, color):
    if seen[pos] != -1:
        return
    else:
        seen[pos] = color
        change_color = 1 - color
        for nx in path[pos].keys():
            check = path[pos][nx]
            if check % 2 == 1:
                dfs(seen, nx, change_color)
            dfs(seen, nx, color)


dfs(seen, 1, 0)
for i in range(1, n+1):
    print(seen[i])


n, k = map(int, input().split())
S = list(input())
S[k-1] = S[k-1].lower()

print(''.join(S))


Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
import sys
n,k = list(map(int, input().split()))
s = input()

if s[k-1] == "A":
    s[k-1] = "a"
elif s[k-1] == "B":
    s[k-1] = "b"
else:
    s[k-1] = "c"

print(s)

import sys
n,k = list(map(int, input().split()))
s = list(input())

if s[k-1] == "A":
    s[k-1] = "a"
elif s[k-1] == "B":
    s[k-1] = "b"
else:
    s[k-1] = "c"

print("".join(s))

Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
n,k = map(int,input().split())
s = input()
s[k-1] = s[k-1].lower()
print(s)

n,k = map(int,input().split())
s = input()
ret=""
for i in range(n):
  if i != k-1:
    ret +=s[i]
  else:
    ret+=s[i].lower()

print(ret)

Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
Big=["A","B","c"]
Small=["a","b","c"]

N,K=map(int,input().split())
S=list(input())

for i in range(3):
  if S[K]==Big[i]:
    S[K]=Small[i]

print("".join(S))

N=list(input())
MM=["01","02","03","04","05","06","07","08","09","10","11","12"]
YY=["00","01","02","03","04","05","06","07","08","09"]

for i in range(10,100):

        YY.append(str(i))

if str(N[0])+str(N[1]) in YY and str(N[0])+str(N[1]) in MM and str(N[2])+str(N[3]) in YY and str(N[2])+str(N[3]) in MM:
    print("AMBIGUOUS")

elif str(N[0])+str(N[1]) in MM and str(N[2])+str(N[3]) in YY:
    print("MMYY")

elif str(N[0])+str(N[1]) in YY and str(N[2])+str(N[3]) in MM:
    print("YYMM")

else:
    print("NA")


Big=["A","B","C"]
Small=["a","b","c"]

N,K=map(int,input().split())
S=list(input())

for i in range(3):
  if S[K-1]==Big[i]:
    S[K-1]=Small[i]

print("".join(S))

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
N, K = map(int,input().split())
S = input()
S[K-1] = S[K-1].lower()
print(S)


N,K=map(input().split())
S=input()
S = S[:K] + S[K+1].lower() + S[K+2:]

N, K = map(int, input().split())
S = input()
S[K-1] = S[K-1].lower()
print("".join(S))

N,K=map(input().split())
S=input()
S[K-1] = S[K-1].lower()


N, K = map(int, input().split())
S = list(input())
S[K-1] = S[K-1].lower()
print(S)

N, K = map(int,input().split())
S = input()
S[K-1] = S[K-1].lower()
print('',join(S))


N, K = map(int, input().split())
S = input()
S[K-1] = S[K-1].lower()
print(S)

N,K=map(input().split())
S=str.input()
S[K-1] = S[K-1].lower()
print(S)


N,K=map(input().split())
S=input()
S = S[:K] + S[K+1].lower() + S[K:]


N,K=map(input().split())
S=str.input()
S[K-1] = S[K-1].lower()



N, K = map(int,input().split())
S = input()
S[K-1] = S[K-1].lower()
print(''.join(S))

N, K = map(int, input().split())
S =input()
print(S[:K-1] + S[K-1].lower() + S[K:])

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
import sys

S = input()
mon30 = ["02","04","06","09","11"]
mon31 = ["01","03","05","07","08","10","12"]

f_yymm = 0
f_mmyy = 0

if (S[0]+S[1]) in mon30 and  int(S[2]+S[3]) <= 30:
	f_yymm = 1
elif (S[0]+S[1]) in mon31 and  int(S[2]+S[3]) <= 31:
	f_yymm = 1
if (S[2]+S[3]) in mon30 and  int(S[0]+S[1]) <= 30:
	f_mmyy = 1
elif (S[2]+S[3]) in mon31 and  int(S[0]+S[1]) <= 31:
	f_mmyy = 1
if (S[0]+S[1]) == "00" or (S[2]+S[3]) == "00":
	print("NA")
	sys.exit()

if  f_yymm == 1 and f_mmyy == 1:
	print("AMBIGUOUS")
elif f_yymm == 1:
	print("YYMM")
elif f_mmyy == 1:
	print("MMYY")
else:
	print("NA")

N,K = input().split()
S = list(input())

for i,j in enumerate(S):
	if i+1 == int(K):
		S[i] = j.lower()
print("".join(S))

Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
S=input("Enter String: ")
N=len(S)
B=int(input("Enter K: "))
K=B-1
if N<0 or N>50:
  print("Error")
else:
  A=S[:K]+S[K].lower()+S[K+1:]
  print(A)

import sys
a=sys.stdin.readline()
res = [int(i) for i in a.split() if i.isdigit()] 
N,K = [res[i] for i in (0,1)]
S=sys.stdin.readline(N)
K-=1
if N<0 or N>50:
  print("Error")
else:
  x=S[:K]
  y=S[K].lower()
  z=S[K+1:]
  print(x+y+z)

Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
N , K = map(int,input().split())
S = input()

for i in range(N) :
    if i == K - 1:
        print(S[i].replace('A','a').replace('B','b').replace('C','c'))
    else :
        print(S[i])


N , K = map(int,input().split())
S = input()

if S[K] == 'A' :
    S[K] = 'a'
if S[K] == 'B' :
    S[K] = 'b'
if S[K] == 'C' :
    S[K] = 'c'

print(S)

N , K = map(int,input().split())
S = input()

ans = S[:K-1] + S[K-1].replace('A','a').replace('B','b').replace('C','c') + S[K:]

print(ans)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
n,k=map(int,input().split())
s=input()
print(s[:k]+s[k-1].lower()+s[k+1:])

n,k=map(int,input().split())
s=input()
print(s[:k-1]+s[k-1].lower()+s[k:])

Verdicts: Wrong Answer

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
n, k = list(map(int, input().split()))
s = input()
print(s[:k-1]+s[k].lower()+s[k:])


n, k = list(map(int, input().split()))
s = input()



print(s[:k-1]+s[k-1].lower()+s[k:])

Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
N, K = list(map(int, input().split()))
S = input()

T = [s for s in S]
print(T)
T[K - 1] = T[K - 1].lower()
print("".join(T)) 

N, K = list(map(int, input().split()))
S = input()

T = [s for s in S]
T[K - 1] = T[K - 1].lower()
print("".join(T)) 

Verdicts: Wrong Answer

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
def main():
  inp = input()
  temp = inp.split()
  N = int(temp[0]); K = int(temp[1])
  S = input()[:-1]
  lower = S[K-1].lower()
  ans = S[:K-1] + lower + S[K:]
  print(ans)
  
if __name__ == "__main___":
  main()

def main():
  inp = input()
  temp = inp.split()
  N = int(temp[0]); K = int(temp[1])
  S = input()
  lower = S[K-1].lower()
  ans = S[:K-1] + lower + S[K:]
  print(ans)
  
if __name__ == "__main__":
  main()

Verdicts: Wrong Answer

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
a,b=map(int,input().split())
c=input()
print(c[0:b-1]+c[b-1].swapcase()+c[a-b])

a,b=map(int,input().split())
c=input()
print(c[0:b-1]+c[b-1].swapcase()+c[b:a])

Verdicts: Wrong Answer

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
N, K = map(int, input().split())
S = str(input())
S[K] = S[K].lower()

N, K = map(int, input().split())
S = str(input())
ans = ""
for i in range(0, K-1):
  ans.append(S[i])
ans.append(S[K].lower())
for j in range(K+1,N):
  ans.append(S[j])
print(ans)

N, K = map(int, input().split())
S = str(input())
ans = ""
for i in range(0, K-1):
  ans += S[i]
ans += S[K].lower()
for j in range(K+1,N):
  ans += S[j]
print(ans)


N, K = map(int, input().split())
S = str(input())
ans = []
for i in range(0, K-1):
  ans.append(S[i])
ans.append(S[K].lower())
for j in range(K+1,N):
  ans.append(S[j])
print(ans)

N, K = map(int, input().split())
S = str(input())
S[K] = S[K].lower()
print(S)

N, K = map(int, input().split())
S = str(input())
ans = ""
for i in range(N):
  if i == K-1:
    ans += S[i].lower()
  else:
    ans += S[i]
print(ans)


Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
s, k = map(int, input().split())
x = input()

if x[k-1] == 'A':
  print('a')

if x[k-1] == 'B':
  print('b')
  
if x[k-1] == 'C':
  print('c')

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

if s[k-1] == 'A':
  mid = 'a'

if s[k-1] == 'B':
  mid = 'b'

if s[k-1] == 'C':
  mid = 'c'

ans = s[:k-1]+ mid + s[k:] 
  
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
s=input()
sf=int(s[:2])
sl=int(s[2:])
#print(int(sf)+int(sl))
if (1<= sf <=12 and 1<=sl <=12):
  print("AMBIGUOUS")
elif 1<= sf <=12 and (sl==0 or 12<sl):
  print("MMYY")
elif 1<= sl <=12 and (sf==0 or 12<sf):
  print("YYMM")
else:
  print("NA")

n,k= map(int,input().split())
s=input()
a=""
for i in range(k-1):
  a=a+s[i]
a=a+s[k-1].lower()
for i in range(n-k-1):
  a=a+s[i+k]
print(a)

n,k= map(int,input().split())
s=input()
s[k-1]=s[k-1].lower
print(s)

n,k= map(int,input().split())
s=input()
a=""

#print(s)
#print(s[0])
#print(s[2])
for i in range(k-1):
  a=a+s[i]
#print(a)
a=a+s[k-1].lower()
#print(a)
for i in range(n-k):
  a=a+s[i+k]
print(a)

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
n,k=map(int,input().split())
s=input()
ss=s[k]

print(s[:k]+ss.lower()+s[k+1:])

n,k=map(int,input().split())
s=input()
ss=s[k-1]

print(s[:(k-1)]+ss.lower()+s[k:])

Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
total, index = map(int, input().split())
string = list(map(str, input().split()))
string[index-1] = string[index-1].lower()
print(string)

n, k = map(int, input().split())
string = str(input())
arr = list(string)
arr[k-1] = arr[k-1].lower()
print(*arr, sep="")

Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
hoge = input().split()
n = int(hoge[0])
k = int(hoge[1])
s = hoge[2]
new_s = s[:k-1] + s[k-1].lower() + s[k:]
print(new_s)

hoge = input().split()
s = input()
n = int(hoge[0])
k = int(hoge[1])
new_s = s[:k-1] + s[k-1].lower() + s[k:]
print(new_s)

Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
N, K = map(int, input().split())
S = input()
for i in range(N):
  if i + 1 == K:
    S[i] = S[i].lower()
  else:
    S[i] = S[i]
print(S)

n, k = map(int, input().split())
s = input()
t = ''
for i in range(n):
  if i == k-1:
    t += s[i].lower()
  else:
    t += s[i]
print(t)

Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
N,K=[int(x) for x in input().split()]
S=input()
print(S[:K]+S[K].lower()+S[min(K+1,N-1)]:)

N,K=[int(x) for x in input().split()]
S=input()
print(S[:K]+S[K].lower()+S[min(K+1,N-1):])

N,K=[int(x) for x in input().split()]
S=input()
print(S[:K-1]+S[K-1].lower()+S[K:])

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
n, k = map(int, input().split())
s = input()

temp = s[k].lower()
ans = s[0:k]+temp+s[k+1:]
print(ans)

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

temp = s[k-1].lower()
if k-1 != len(s):
    ans = s[0:k-1] + temp + s[k:]
else:
    ans = k[0:k-1] + temp
print(ans)

Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):

a,b=map(int,input().split())
s=input()

s[b-1]=s[b-1].lower()
print(s)

a,b=map(int,input().split())
s=input()
 

print(s[:b-1]+s[b-1].lower()+s[b:])

Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
N,K = map(int,input().split())
S = list(input())

x = S[K-1]
x.lower()
S[K-1] = x

print("".join(S))

N,K = map(int,input().split())
S = list(input())

x = S[K-1]
S[K-1] = x.lower()

print("".join(S))

Verdicts: Wrong Answer

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
n,k=map(int, input().split())
String=input()
String=list(String)
String[k]=String[k].lower()
String="".join(String)
print(String)

n,k=map(int, input().split())
String=input()
String=list(String)
String[k]=String[k].upper()
String="".join(String)
print(String)

n,k=map(int, input().split())
String=input()
String=list(String)
String[k-1]=String[k-1].lower()
String="".join(String)
print(String)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
import sys
sys.setrecursionlimit(100000)

N=int(input())
edges = [[] for i in range(N)]
colors = [-1]*N
for i in range(N-1):
    u,v,w=[int(a) for a in input().split()]
    edges[u-1].append((v-1,w))
    edges[v-1].append((u-1,w))
 
diff = lambda n: 1 if n==0 else 0
 
def dfs(prev,curr):
    for node,d in edges[curr]:
        if node==prev:
            continue
        colors[node] = colors[curr] if d%2==0 else diff(colors[curr])
        dfs(curr,node)
 
colors[0]=0
dfs(1000000,0)
for i in range(N):
    print(colors[i])


N,K=[int(a) for a in input().split()]
S=input()
print(S[:K-1]+{"A":"a","B":"b","C":"c"}[S[K-1]]+S[K:])

Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
N, K = map(int, input().split())
S = input()

if (S[K] == 'A'):
  S[K] = 'a'
elif (S[K] == 'B'):
  S[K] = 'b'
else:
  S[K] = 'c'
    
printf(S)



N, K = map(int, input().split())
S = list(input())

if (S[K] == 'A'):
  S[K] = 'a'
elif (S[K] == 'B'):
  S[K] = 'b'
else:
  S[K] = 'c'
  
ans = ','.join(S)
    
print(ans)



N, K = map(int, input().split())
S = list(input())

S[K-1].lower()

ans = ''
ans = ''.join(S)

print(ans)

N, K = map(int, input().split())
S = input()

if (S[K] == 'A'):
  S[K] = 'a'
elif (S[K] == 'B'):
  S[K] = 'b'
else:
  S[K] = 'c'
    
print(S)



N, K = map(int, input().split())
S = list(input())

if (S[K-1] == "A"):
  S[K] = "a"
elif (S[K-1] == "B"):
  S[K] = "b"
elif (S[K-1] == "C"):
  S[K] = "c"
  
ans = ','.join(S)
    
print(ans)



N, K = map(int, input().split())
S = [str(_) for _ in input().split()]

if (S[K] == 'A'):
	S[K] = 'a'
elif (S[K] == 'B'):
    S[K] = 'b'
else:
	S[K] = 'c'
    
printf(S)

N, K = map(int, input().split())
S = list(input())

if (S[K-1] == 'A'):
  S[K] = 'a'
elif (S[K-1] == 'B'):
  S[K] = 'b'
elif (S[K-1] == 'C'):
  S[K] = 'c'
  
ans = ''.join(S)
    
print(ans)



N, K = map(int, input().split())
S = [str(_) for _ in input().split()]

if (S[K] == 'A'):
  S[K] = 'a'
elif (S[K] == 'B'):
  S[K] = 'b'
else:
  S[K] = 'c'
    
printf(S)


N, K = map(int, input().split())
S = list(str(input()))

if (S[K-1] == 'A'):
  S[K-1] = 'a'
elif (S[K-1] == 'B'):
  S[K-1] = 'b'
elif (S[K-1] == 'C'):
  S[K-1] = 'c'
  
ans = ''.join(S)
    
print(ans)



Verdicts: Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
N, K = map(int, input().split())
S = input()
print(S[:K - 1] + S[K - 1].lower() + S[K])

N, K = map(int, input().split())
S = input()
print(S[:K - 1] + S[K - 1].lower() + S[K:])

Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
N, K = map(int,input().split())
S = input()

s = S[:K-2] + S[K-1].lower() + S[K:]

print(s)



N, K = map(int,input().split())
S = input()


if K == 1:
  s = S[0].lower() + S[1:]
elif K == N:
  s = S[:-1] + S[-1].lower()
else:
  s = S[:K-1] + S[K-1].lower() + S[K:]

print(s)



Verdicts: Wrong Answer

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
n,k=map(int, input().split())
s=input()
if s[k-1]=='A':
  s=s[:k-1]+'a'+s[k:]
if s[k-1]=='B':
  s=s[:k-1]+'b'+s[k:]
else:
  s=s[:k-1]+'c'+s[k:]
print(s)

n,k=map(int, input().split())
s=input()
if s[k-1]=='A':
  s=s[:k-1]+'a'+s[k:]
if s[k-1]=='B':
  s=s[:k-1]+'b'+s[k:]
if s[k-1]=='C':
  s=s[:k-1]+'c'+s[k:]
print(s)

Verdicts: Wrong Answer

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
n,k=map(int,input().split())
s=input()
ans=s[k-1]+s[k-1].lower()+s[k:]
print(ans)

n, k = map(int, input().split())
s = input()
ans = s[:k-1] + chr(ord(s[k-1])+32) + s[k:]
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
a = input().split()
n, k, s = a
k = int(k)
print(s.replace(s[k-1], s[k-1].lower()))

n, k = [int(i) for i in input().split()]
s = input()
if k == 1:
    print(s[0].lower() + s[1:])
else:
    print(s[0:k-1] + s[k-1].lower() + s[k:])

Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
# cook your dish here
import math
def power(x, y): 
  
    if(y == 0): return 1
    temp = power(x, int(y / 2))  
      
    if (y % 2 == 0): 
        return temp * temp 
    else: 
        if(y > 0): return x * temp * temp 
        else: return (temp * temp) / x 
        
n,k=map(int,input().split())
summ=0
for i in range(1,n+1):
    value=0
    if i<k:
        value=math.log(k)-math.log(i)
        value=int(value)+1
    po=(0.5)**value
    summ+=po
    
summ=summ/n
print('{0:.12f}'.format(summ))

# cook your dish here
# cook your dish here
import math
        
n,k=map(int,input().split())
summ=0
for i in range(1,n+1):
    if k/i<=1:
        value=0
    elif abs((math.log(k)-math.log(i))//math.log(2)-(math.log(k)-math.log(i))/math.log(2))<=0.00001:
        value = (math.log(k)-math.log(i))//math.log(2)
    else:
        value = (math.log(k)-math.log(i))//math.log(2)+1    
    po=(0.5)**value
    summ+=po
    
summ=summ/n
print(summ)

# cook your dish here
import math
        
n,k=map(int,input().split())
summ=0
for i in range(1,n+1):
    if k/i<=1:
        value=0
    else:
        value=math.log(k)-math.log(i)
    po=(0.5)**value
    summ+=po
    
summ=summ/n
print('{0:.12f}'.format(summ))

# cook your dish here
# cook your dish here
import math
        
n,k=map(int,input().split())
summ=0
for i in range(1,n+1):
    if k/i<=1:
        value=0
    elif abs((math.log(k)-math.log(i))//math.log(2)-(math.log(k)-math.log(i))/math.log(2))<=0.00001:
        value = (math.log(k)-math.log(i))//math.log(2)
    else:
        value = (math.log(k)-math.log(i))//math.log(2)+1    
    po=(0.5)**value
    summ+=po
    
summ=summ/n
print('{0:.12f}'.format(summ))

# cook your dish here
import math
        
n,k=map(int,input().split())
summ=0
for i in range(1,n+1):
    if k/i<=1:
        value=0
    elif abs((math.log(k)-math.log(i))//math.log(2)-(math.log(k)-math.log(i))/math.log(2))<=0.00001:
        value = (math.log(k)-math.log(i))//math.log(2)
    else:
        value = (math.log(k)-math.log(i))//math.log(2)+1    
    else:
        value=math.log(k)-math.log(i)
    po=(0.5)**value
    summ+=po
    
summ=summ/n
print('{0:.12f}'.format(summ))

# cook your dish here
n,k=map(int,input().split())
s=input()
a=""
for i in range(n):
    if i==k-1:
        a+=(s[i].lower())
    else:
        a+=s[i]
print(a)        
    
    


Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
s=input()
a=int(s[0:2])
b=int(s[2:4])
if 0<a<13:
  if 0<b<13:
    print('AMBIGUOUS')
  else:
    print('MMYY')
else:
  if 0<b<13:
    print('YYMM')
  else:
    print('NA')

n,k=map(int, input().split())
s=input()
if s[k-1]=='A':
  print(s[0:k-1]+'a'+s[k::])
elif s[k-1]=='B':
  print(s[0:k-1]+'b'+s[k::])
else:
  print(s[0:k-1]+'c'+s[k::])

Verdicts: Wrong Answer

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
N,K = (i for i in input().split())
K = int(K)
X = list(N)
if X[K-1] == 'A':
    X[K-1] = 'a'
if X[K-1] == 'B':
    X[K-1] = 'b'
if X[K-1] == 'C':
    X[K-1] = 'c'
print(''.join(X))

T,K = (i for i in input().split())
N = input()
K = int(K)
X = list(N)
if X[K-1] == 'A':
    X[K-1] = 'a'
if X[K-1] == 'B':
    X[K-1] = 'b'
if X[K-1] == 'C':
    X[K-1] = 'c'
print(''.join(X))

Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
N, K = map(int,input().split())
S = input()
if S[K-1] == 'A':
    S[K-1].lower()
elif S[K-1] == 'B':
    S[K-1].lower()
else:
    S[K-1].lower()
print(S)

N, K = map(int,input().split())
S = input()
if S[K-1] == 'A':
    S[K-1] = 'a'
elif S[K-1] == 'B':
    S[K-1] = 'b'
else:
    S[K-1] = 'c'
print(S)

N, K = map(int,input().split())
S = input()
S1 = []
for i in range(N):
    if i == K-1:
        S1.append(S[i].lower())
    else:
        S1.append(S[i])
print(''.join(S1))

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

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

a,b=int(s[0]+s[1]),int(s[2]+s[3])

if b==0:
    print('NA')
elif a==0:
    print('NA')
elif a>12:
    if b>12:
        print('NA')
    elif 0<b<13:
        print('YYMM')
elif 0<a<13:
    if b>12:
        print('MMYY')
    elif 0<b<13:
        print('AMBIGUOUS')


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

for i in range(len(s)):
    if i==k-1:
        if s[k-1]=='A':
            print('a',end='')
        elif s[k-1]=='B':
            print('b',end='')
        elif s[k-1]=='C':
            print('c',end='')
    else:
        print(s[i],end='')

print()


Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
n,k=map(int,input().split())
s=input()
if s[k+1]=="A":
    s[k+1]="a"
elif s[k+1]=="B":
    s[k+1]="b"
elif s[k+1]=="C":
    s[k+1]="c"
print(s)


n,k=map(int,input().split())
s=str(input())
if s[k+1]=="A":
    s[k+1]="a"
elif s[k+1]=="B":
    s[k+1]="b"
elif s[k+1]=="C":
    s[k+1]="c"
print(s)


n,k=map(int,input().split())
s=str(input())
if s[k-1]=="A":
    s[k-1]="a"
elif s[k-1]=="B":
    s[k-1]="b"
elif s[k-1]=="C":
    s[k-1]="c"
print(s)


n,k=map(int,input().split())
s=list(input())
if s[k-1]=="A":
    s[k-1]="a"
elif s[k-1]=="B":
    s[k-1]="b"
elif s[k-1]=="C":
    s[k-1]="c"
print("".join(s))


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
n,k= map(int,input().split())
s=input()
print(s[:k-2]+s.lower()[k-1]+s[n-1:])

n,k= map(int,input().split())
s=input()
print(s.lower()[k-1])

n,k= map(int,input().split())
s=input()
print(s[:k-1] + s.lower()[k-1] + s[k:n])

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
inputstr1 = input().split()
n = inputstr1[0]
k = inputstr1[1]
s = input()
 
N = int(n)
K = int(k)

ret = ""

for i in range(N):
  if i != K:
    ret += s[i]
  else:
    ret += s[i].lower()

import math

N, K = list(map(int, input().split()))

proba = 0

for i in range(1, k):
  n_coin = int(math.log(k/i,2)) + 1
  print(i, n_coin)
  proba += float(1)/n*((0.5)**n_coin)

if n >= k:
	proba += float(n-k+1)/n


n, k = [int(e) for e in input().split()]
s = input()
s[k] = s[k].lower()
print(s)

inputstr1 = input().split()
n = inputstr1[0]
k = inputstr1[1]
s = input()
 
N = int(n)
K = int(k)

ret = ""

for i in range(N):
  if i != K-1:
    ret += s[i]
  else:
    ret += s[i].lower()


inputstr1 = input().split()
n = inputstr1[0]
k = inputstr1[1]
s = input()
 
N = int(n)
K = int(k)

ret = ""

for i in range(N):
  if i != K:
    ret += s[i]
  else:
    ret += s[i].lower()
print(ret)

inputstr1 = input().split()
n = inputstr1[0]
k = inputstr1[1]
s = input()
 
N = int(n)
K = int(k)

ret = ""

for i in range(N):
  if i != K-1:
    ret += s[i]
  else:
    ret += s[i].lower()

print(ret)

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
N,K = map(int,input().split())
S = str(input())
if S[K-1] == 'A':
  S[K-1] = 'a'
elif S[K-1] == 'B':
  S[K-1] = 'b'
else:
  S[K-1] = 'c'
print(S)

N,K = map(int,input().split())
S = list(str(input()))
if S[K-1] == 'A':
  S[K-1] = 'a'
elif S[K-1] == 'B':
  S[K-1] = 'b'
else:
  S[K-1] = 'c'
print(''.join(S))

Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):

N, K = input().split()

S = list(input())


K = int(K)

S[K-1] = str(S[K-1]).lower()

print(S)


N, K = input().split()

S = list(input())


K = int(K)

S[K-1] = str(S[K-1]).lower()

print("".join(S))

Verdicts: Wrong Answer

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
length, pos = input().split(' ')
length,pos = int(length), int(pos)
target = input()
if target[pos-1] == 'A':
  target[pos-1] = 'a'
if target[pos-1] == 'B':
  target[pos-1] = 'b'
if target[pos-1] == 'C':
  target[pos-1] = 'c'

print(target)


length, pos = input().split(' ')
length,pos = int(length), int(pos)
target = input()
if target[pos-1] == 'a':
  target[pos-1] = 'A'
if target[pos-1] == 'b':
  target[pos-1] = 'B'
if target[pos-1] == 'c':
  target[pos-1] = 'C'

print(target)


length, pos = input().split(' ')
length, pos = int(length), int(pos)
target = input()
answer = ''
if pos == 1:
  answer = str(target[pos-1].lower() + target[1:])
elif pos == length:
  answer = str(target[:-1] + target[pos-1].lower())
else:
  answer = str(target[:pos-1] + target[pos-1].lower() + target[pos:])

print(answer)


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
length, index = map(int, input().split())
string = list(input())
string = replace(string[index],string[index].lower())
print(string.join())

N, change = map(int, input().split())
string = list(input())
string[change-1] = string[change-1].lower()
print(''.join(string))

Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
N, K = map(int, input().split())
S = [i for i in input()]

for i in range(65, 65+26):
    if S[K]==chr(i):
        S[K]=chr(i+32)

print(''.join(S))

N, K = map(int, input().split())
S = [i for i in input()]

for i in range(65, 65+26):
    if S[K-1]==chr(i):
        S[K-1]=chr(i+32)

print(''.join(S))

Verdicts: Runtime Error

Accepted
Problem: You are given a string S of length N consisting of `A`, `B` and `C`, and an integer K which is between 1 and N (inclusive). Print the string S after lowercasing the K-th character in it.

Submission attempts (in order):
n, k = list(map(int, input().split()))
s = input()
s[k-1] = s[k-1].upper()
print(s)

n, k = list(map(int, input().split()))
s = list(input())
s[k-1] = s[k-1].lower()
print("".join(s))

Verdicts: Runtime Error

Accepted