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 = (int(i) for i in input().split())  
s = input()
s_ = s[:k-1] + s[k].lower() + s[k:]
print(s_)

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

n, k = (int(i) for i in 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()
k-=1
print(s[:k]+s[k:k+1].lower()+s[k+1])

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

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()
tmp=list(S)
tmp[K]=tmp[K].lower()
print(tmp)

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


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'):
    x = s[0:k - 2] + 'a' + s[k:n - 1]
elif (s[k - 1] == 'B'):
    x = s[0:k - 2] + 'b' + s[k:n - 1]
else:
    x = s[0:k - 2] + 'c' + s[k:n - 1]


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

if (s[k - 1] == 'A'):
    x = s[0:k - 1] + 'a' + s[k:n]
elif (s[k - 1] == 'B'):
    x = s[0:k - 1] + 'b' + s[k:n]
else:
    x = s[0:k - 1] + 'c' + s[k:n]
print(x)


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

print(s.replace('s[k-1]', ''s[k-1]'.lower()')

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):
a, b = map(int, input().split())
t = input()
print(t.replace(t[b-1], t[b-1].upper()))

a, b = map(int, input().split())
t = input()
print(t.replace(t[a-1], t[a-1].upper()))

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

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):
m,k = map(int, input().split())
s = input()
s[k] = s[k].lower()
print(s)

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

m,k = map(int, input().split())
s = input()
i = k-1
s = s[:i] + s[i].lower() + s[i+1:]
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 = list(input())
print(S)
S[K-1] = S[K-1].lower()
for c in S:
	print(c, end="")
print()

N, K = map(int, input().split())
S = list(input())
S[K-1] = S[K-1].lower()
for c in S:
	print(c, end="")
print()

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=list(input())
s_str=""
s[k-1]=s[k-2].lower()
for i in s:
    s_str +=s[i]
print(s_str)


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

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


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

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


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

n,k=list(map(int,input().split(" ")))
s=list(input())
s_str = ""
if s[k-1]=="A":
    s[k-1]="a"
elif s[k-1]=="B":
    s[k-1]="b"
else:
    s[k-1]="c"
for i in s:
    s_str += i
print(s_str)
  
    


Verdicts: Runtime Error

Runtime Error

Runtime Error

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):
from collections import defaultdict
import sys
import math
from datetime import datetime

def sol(n, k, S):
    return S[:k-1]+S[k-1].lower()+S[k:]


do_submit = True


def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [list(map(str, line.split())) for line in lines]
    print(parsed_lines)
    n = int(parsed_lines[0][0])
    k = int(parsed_lines[0][1])
    S = parsed_lines[1][0]
    return n, k, S


if not do_submit:
    a, b, c = input_parse("""
    3 1
    ABC
    """)
    print(sol(a, b, c))

    a, b, c = input_parse("""
    4 3
    CABA
    """)
    print(sol(a, b, c))

else:
    n, k = list(map(int, input().split()))
    S = input().split()
    print(sol(n, k, S))
    # S = input().strip()
    # print(sol(S))


from collections import defaultdict
import sys
import math
from datetime import datetime

def sol(n, k, S):
    return S[:k-1]+S[k-1].lower()+S[k:]


do_submit = True


def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [list(map(str, line.split())) for line in lines]
    print(parsed_lines)
    n = int(parsed_lines[0][0])
    k = int(parsed_lines[0][1])
    S = parsed_lines[1][0]
    return n, k, S


if not do_submit:
    a, b, c = input_parse("""
    3 1
    ABC
    """)
    print(sol(a, b, c))

    a, b, c = input_parse("""
    4 3
    CABA
    """)
    print(sol(a, b, c))

else:
    n, k = list(map(int, input().split()))
    S = input().split()
    print(sol(n, k, S[0]))

    # S = input().strip()
    # print(sol(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()
t = s.lower()
print(s[:(k-2)] + t[k-1] + s[k:])


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


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

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

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


Verdicts: Wrong Answer

Wrong Answer

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):
num,loc = map(int,input().split())
dummy = ["" for i in range(num)]
moj = input()
count = 0
for j in moj:
  dummy[count] = j
  count = count + 1
S = dummy[loc-1]
W = S.swapcase()
dummy[loc-1] = W
print(dummy)

num,loc = map(int,input().split())
dummy = ["" for i in range(num)]
moj = input()
count = 0
for j in moj:
  dummy[count] = j
  count = count + 1
S = dummy[loc-1]
W = S.swapcase()
dummy[loc-1] = W
ans = ""
for l in dummy:
  ans = ans + l
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(int, input().split())
S = str()
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'

S = list(input())
a = S[0] + S[1]
b = S[2] + S[3]
A = int(a)
B = int(b)

if (0 < A < 13 and 0 < B < 13):
  print("AMBIGUOUS")
elif (0 < A < 13 and 12 < B < 100):
  print("MMYY")
elif (0 < A < 13 and B == 0):
  print("MMYY")
elif (0 < B < 13 and 12 < A < 100):
  print("YYMM")
elif (0 < B < 13 and A == 0):
  print("YYMM")
  
else:
  print("NA")


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

S = list(input())
a = S[0] + S[1]
b = S[2] + S[3]
A = int(a)
B = int(b)

if (0 < A < 13 and 0 < B < 13):
  print("AMBIGUOUS")
elif (0 < A < 13 and (12 < B < 100 or B == 0)):
  print("MMYY")
elif (0 < B < 13 and (12 < A < 100 or A == 0)):
  print("YYMM")
else:
  print("NA")

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"
           
"".join(S)

S_1 = S[0]
for i in range(1,N):
  S_1 = S_1 + S[i]
print(S_1)


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):
from math import log2

def prob(num, dice, K):
	times = int(log2(K/num) + 1)
	base  = 1/dice
	if times < 0:
		times = 0
	p = base * pow(0.5,times)
	return p

def sum_prob(dice, K):
	probabilty = 0
	for i in range(1,dice+1):
		probabilty += prob(i, dice, K)
	return probabilty


inputs = list(map(int,input().split(' ')))[:2]
dice = inputs[0]
K = inputs[1]
probabilty = sum_prob(dice, K)
print(probabilty)

from math import log2

def calProb(dice, K):
    time = log2(K)
    prob = 0
    base = 1/dice
    count = 0
    for i in range(1,dice+1):
        temp = base
        now = i
        while now < K:
            now *= 2
            temp *= 0.5
        prob += temp
        count += 1
    return prob + ((count - i)/dice)


inputs = list(map(int,input().split(' ')))[:2]
dice = inputs[0]
K = inputs[1]
probabilty = calProb(dice, K)
print(probabilty)


from math import log2

def prob(num, dice, K):
	times = int(log2(K/num) + 1)
	base  = 1.0/dice
	if times < 0:
		times = 0
	p = base * pow(0.5,times)
	return p

def sum_prob(dice, K):
	probabilty = 0
	for i in range(1,dice+1):
		probabilty += prob(i, dice, K)
	return probabilty


inputs = list(map(int,input().split(' ')))[:2]
dice = inputs[0]
K = inputs[1]
probabilty = sum_prob(dice, K)
print(probabilty)

from math import log2

def prob(num, dice, K):
	times = int(log2(K/num) + 1)
	base  = 1.0/dice
	if times < 0:
		times = 0
	p = base * pow(0.5,times)
	return p

def sum_prob(dice, K):
	probabilty = 0
	for i in range(1,dice+1):
		probabilty += prob(i, dice, K)
	return probabilty


inputs = list(map(int,input().split(' ')))[:2]
dice = inputs[0]
K = inputs[1]
probabilty = sum_prob(dice, K)
print(probabilty)

from math import log2

def prob(num, dice, K):
	times = int(log2(K/num) + 1)
	base  = 1.0/dice
	if times < 0:
		times = 0
	p = base * pow(0.5,times)
	return p

def sum_prob(dice, K):
	probabilty = 0
	for i in range(1,dice+1):
		probabilty += prob(i, dice, K)
	return probabilty


inputs = list(map(int,input().split(' ')))[:2]
dice = inputs[0]
K = inputs[1]
probabilty = sum_prob(dice, K)
print(probabilty)

from math import log2

def prob(num, dice, K):
	times = int(log2(K/num) + 1)
	base  = 1/dice
	if times < 0:
		times = 0
	p = base * pow(0.5,times)
	return p

def sum_prob(dice, K):
	probabilty = 0
	for i in range(1,dice+1):
		probabilty += prob(i, dice, K)
	return probabilty


inputs = list(map(float,input().split(' ')))[:2]
dice = inputs[0]
K = inputs[1]
probabilty = sum_prob(dice, K)
print(probabilty)

length_and_index = list(map(int,input().split(' ')))
input_str = list(input()[:length_and_index[0]])
input_str[length_and_index[1]-1] = chr(ord(input_str[length_and_index[1]-1])+32)
out = "".join(str(x) for x in input_str)
print(out)

Verdicts: Wrong Answer

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):
N, K= map(int, input().split())

import math
Ans = 0

if K < N:
    for X in range(1, K+1):
        R = math.log(K/X, 2)
        S = math.ceil(R)
        Ans = Ans + (0.5**S / N)
    Ans = Ans + (N-K)/N
    print(Ans)

if K == N:
    for X in range(1, K+1):
        R = math.log(K/X, 2)
        S = math.ceil(R)
        Ans = Ans + (0.5**S / N)
    Ans = Ans + 1/N
    print(Ans)
    
if K > N:
    for X in range(1,N+1):
        R = math.log(K/X, 2)
        S = math.ceil(R)
        Ans = Ans + (0.5**S / N)
    print(Ans)

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

S1 = S[:K-1]
S2 = S[K-1]
S3 = S[K:]

Ans = S1+ str.lower(S2) + S3
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(int,input().split())
s=list(input())
s[k]=chr(ord(s[k])+32)

print(*s,sep='')

n,k=map(int,input().split())
s=list(input())
s[k-1]=chr(ord(s[k-1])+32)
 
print(*s,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):
a,b=map(int,input().split())
c = input()



d=a-b+1
c = list(c)
print(c)
d = c[b-1]
c[b-1] = d.lower()

c = "".join(c)
print(c)

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



d=a-b+1
c = list(c)
d = c[b-1]
c[b-1] = d.lower()

c = "".join(c)
print(c)

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

n,k = map(int,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 = input().split()
c = list(input()) 
c[int(n[1] - 1)] = c[int(n[1]) - 1].lower()
print("".join(c))


n = input().split()
c = list(input()) 
c[int(n[1])] = c[int(n[1])].lower()
print("".join(c))


n = input().split()
c = list(input()) 
c[int(n[1]) - 1] = c[int(n[1]) - 1].lower()
print("".join(c))


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 = s[:k] + s[k].lower() + s[k+1:]
print(s)

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

s = s[:k-1] + s[k-1].lower() + s[k:]
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 = 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))

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(''.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] = s[k].lower()
print(s)

#!/usr/bin/env python
import bisect
from collections import defaultdict

def main():
    N, K = map(int, input().split())
    S = list(input().strip())

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


if __name__ == '__main__':
    main()


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

for i in range(N):
    if 2**i > N:
        a = i-1
        b = N - 2**a
        break
for j in range(K):
    if 2**j > K:
        c = j-1
        d = K - 2**c
        break

if N <= K:
    print((2**(2*a-c+1)+2**(-c)+3*2**(a-c+1)*b)/3*N)
else:
    print((2**(c+1)+2**(-c)+3*2*b)/*3N + (N-K+1)/N)

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

if K == 1:
    S = S[0].lower() + S[1:]
elif K == N:
    S = S[:-1] + S[N-1].lower()
else:
    S = S[:K-1] + S[K-1].lower() + S[K:]
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):
input();a=sorted(map(int,input().split()));print("{} {} {}".format(a[0],a[-1],sum(a)))

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

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

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

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

print(S)

N,K = map(int,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()

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

elif s[k-1] == 'B':
    print(s[:k-1] + 'b' + s[k:])

else:
    print(s[:k-1] + 'c' + s[k:])

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'

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

x = s[k-1]
y = x.lower()
s[k-1] = y

print(s)

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

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

elif s[k-1] == 'B':
    print(s[:k-1] + 'b' + s[k:])

else:
    print(s[:k-1] + 'c' + s[k:])

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

x = s[k-1]
y = x.capitalize()
s[k-1] = y

print(s)

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

x = str(s[k-1])
y = x.lower()
s[k-1] = y

print(s)

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

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

elif s[k-1] == 'B':
    print(s[:k-1] + 'b' + s[k:])

else:
    print(s[:k-1] + 'c' + s[k:])

Verdicts: 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):
s = input()
a = int(s[:2]) > 13
b = int(s[2:]) > 13
if a and b:
  print("AMBIGUOUS")
if not a and not b:
  print("NA")
if not a and b:
  print("MMYY")
if a and not b:
  print("YYMM")
      

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


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):
li = input().split()
str = input()


for i in range(0,int(li[0])):
    if i==int(li[1]):
        print(str[i].lower(),end="")
    else:
        print(str[i],end="")

li = input().split()
str = input()


for i in range(0,int(li[0])):
    if i==int(li[1]):
        print(str[i].lower(),end="")
    else:
        print(str[i],end="")

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

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 = str(input())
ans = ''
for i in range(len(s)):
  if i == k:
    ans = ans + s[i].lower()
  else:
    ans = ans + s[i]
print (ans)

n,k = map(int,input().split())
s = str(input())
ans = ''
for i in range(len(s)):
  if i == k-1:
    ans = ans + s[i].lower()
  else:
    ans = 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(int,input().split())
s=input()
print(s[:k-1]+s[k-1]+s[k:])

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):
import sys
import os

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


count=[0]*N

print(count)
KK=K
i=0
while  KK >= 1:
    i=i+1
    for j in range(KK):
        if j<N:
            count[j]=count[j]+1
        print(j)
        print(count)
    KK=int(KK/2)
    print(i)

sum=0
for l in range(N):
    sum=sum + (1/N)*(1/2)**(count[l])

print(sum)

import sys
import os

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

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

mojiretsu = "".join(S)

print(mojiretsu)

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():
    N,K = map(int, input().split())
    S =	input()
    if K == 1:
	print(S[0].lower() + S[1:])
    elif K == N:
	print(S[:N-1] + S[N-1].lower())
    else:
      	print(S[0:K-1] + S[K-1].lower() + S[K:])

if __name__ == '__main__':
    main()

def main():
    N,K = map(int, input().split())
    S = input()
    if K == 1:
        print(S[0].lower() + S[1:])
    elif K == N:
        print(S[:N-1] + S[N-1].lower())
    else:
        print(S[0:K-1] + S[K-1].lower() + S[K:])

if __name__ == '__main__':
    main()


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()
b=int(a[0:2])
c=int(a[2:4])
if 0<b<=12 & 0<c<=12:
    print('AMBIGUOUS')
elif 0<b<=12 & (c>12 or c ==0) :
    print('MMYY') 
elif (b>12 or b==0) & 0<c<=12:
    print('YYMM')
else:
    print('NA')

a = input()
b=int(a[0:2])
c=int(a[2:4])
if 1<=b<=12 & 1<=c<=12:
    print('AMBIGUOUS')
elif 1<=b<=12 :
    print('MMYY') 
elif 1<=c<=12:
    print('YYMM')
else:
    print('NA')


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

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

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

print(s)

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

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

print(str(s))

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

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

print(''.join(s))

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 = list(map(int, input().split()))
S = input()

B = S[A[1]]

if(B == "A"):
    B = "a"
else if(B == "B"):
    B = "b"
else:
    B = "c"

S[A[1]] = B
print(S)

A = list(map(int, input().split()))
S = input()

C = A[1]
D = A[0]
ans = ""

B = S[C-1]



if(B == "A"):
    B = "a"
elif(B == "B"):
    B = "b"
else:
    B = "c"



for i in range(D):
    if (i == C-1 ):
        ans = ans + B
        continue
    ans = (ans + S[i]) 

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):
N,K = map(int, input().split())
S = Input()
dir = {'A':'a', 'B':'b', 'C':'c'}

print(S[0:K-1] + dir[S[K-1]]+ S[K::])


N,K = map(int, input().split())
S = input()
dir = {'A':'a', 'B':'b', 'C':'c'}

print(S[0:K-1] + dir[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):
import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()


s = ns()
s1 = int(s[:2])
s2 = int(s[2:])

if s1 == 0 and s2 > 12:
    ans = "NA"
elif s1 > 12 and s2 == 0:
    ans = "NA"
elif s1 == 0 and s2 == 0:
    ans = "NA"
elif s1 == 0:
    ans = "YYMM"
elif s2 == 0:
    ans = "MMYY"
elif s1 > 12 and s2 > 12:
    ans = "NA"
elif s1 > 12:
    ans = "YYMM"
elif s2 > 12:
    ans = "MMYY"
else:
    ans = "AMBIGUOUS"

print(ans)


import sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()

n, k = na()
s = ns()

ans = ""
for i in range(n):
    if i+1 == k:
        ans = ans + s[i].lower()
    else:
        ans = 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 = list(map(int, input().split()))
s = str(input())
a = ""
for i in range(n):
    if i == k:
        a += s[i].lower()
    else:
        a += s[i]

print(a)



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

print(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,a=map(int,input().split())
l=list(input())
if l[a]=='A':
  l[a]='a'
if l[a]=='B':
  l[a]='b'
if l[a]=='C':
  l[a]='c'
k=''.join(l)
print(k)

n,a=map(int,input().split())
l=list(input())
if l[a-1]=='A':
  l[a-1]='a'
if l[a-1]=='B':
  l[a-1]='b'
if l[a-1]=='C':
  l[a-1]='c'
k=''.join(l)
print(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):
s, n = map(str, input().split())
n = int(n)
s = list(s)
s[n] = s[n].lower()
print(*s, sep="")

hoge, n = map(int, input().split())
s = list(input())
s[n] = s[n].lower()
print(*s, sep="")

hoge, n = map(int, input().split())
s = list(input())
s[n-1] = s[n-1].lower()
print(*s, sep="")

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 = [int(x) for x in input().strip().split()]
s = input().strip()
s[k-1] = s[k-1].lower()
print(s)

n, k = [int(x) for x in input().strip().split()]
s = input().strip()
s[k-1:k] = s[k-1].lower()
print(s[:k-1]+s[k-1].lower()+s[k:])

n, k = [int(x) for x in input().strip().split()]
s = input().strip()
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 = input().split()
n, k = int(n), int(k)

s = input()

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

if s[k - 1] =='A':
  s3.append('a')
  print(s3 + s2)
elif s[k - 1] == 'B':
  s3.append('b')
  print(s3 + s2)
elif s[k - 1] == 'C':
  print(s3 + s2)

n,k=map(int, input().split())
S=input()
s=S.lower()
print(S[:k-1]+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):
#!/usr/bin/env python
# coding: utf-8


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


if __name__ == '__main__':
    main()


#!/usr/bin/env python
# coding: utf-8

def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))



def main():
    m = {'A':'a', 'B':'b', 'C':'c'}
    n, k = rli()
    s = list(input())
    s[k-1] = m[s[k-1]]
    print("".join(s))


if __name__ == '__main__':
    main()


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

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

print(S)


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

S = list(input())

S[K-1] = 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):
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()
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())
S[K-1]=S[K-1].lower()
print("".join(K))

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()
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()
n = K-1
ans = ""
for i in range(N):
    if i == n:
        ans = ans +S[i].lower()
    else:
        ans = 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):
N,K = map(int,input().split())
S = input()
S[K-1] = S[K-1].upper()
print(S)

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()
S[K-1].lower()
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 = [int(x) for x in input().split()]
s = input()
print(s[:k-1]+s[k].lower()+s[k+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

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

cnt = 0
S = ""
for c in s:
  print(c)
  if cnt == k-1:
    S = S + c.lower()
  else:
    S = S + c
  cnt = cnt + 1

print(S)

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

cnt = 0
S = ""
for c in s:
  if cnt == k-1:
    S = S + c.lower()
  else:
    S = S + c
  cnt = cnt + 1

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()
S[K-1]=S.lower()[K-1]
print(S)

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

N,K=map(int,input().split())
S=list(input())
S[K-1]=S[K-1].lower()
S="".join(S)
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 = str(input())
if S[K - 1] == "A":
    S[K - 1] = "a"
    print("".join(S))
elif S[K - 1] == "B":
    S[K - 1] = "b"
    print("".join(S))
else:
    S[K - 1] = "c"
    print("".join(S))


N, K = map(int, input().split())
S = str(input())
if S[K - 1] == "A":
    S[K - 1] = "a"
    print(S)
elif S[K - 1] == "B":
    S[K - 1] = "b"
    print(S)
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"
    print("".join(S))
elif S[K - 1] == "B":
    S[K - 1] = "b"
    print("".join(S))
else:
    S[K - 1] = "c"
    print("".join(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()

ans = ""

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

print(ans)


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

ans = ""

for i in range(N):
    if i == K-1:
        ans += S[i].lower()
    else:
        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):
S = input()
ret = ""
for i in range(len(S)):
    if i == K-1:
        ret += S[i].lower()
    else:
        ret += S[i]
print(ret)

N,K = map(int, input().split())
S = input()
ret = ""
for i in range(len(S)):
    if i == K-1:
        ret += S[i].lower()
    else:
        ret += S[i]
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):
N, K = map(int, input().split())
S = str(input())

s_list = list(S)
print(s_list)

tmp = s_list[K-1]
s_list[K-1] = tmp.lower()

S = ''.join(s_list)

print(S)


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

s_list = list(S)
print(s_list)

tmp = s_list[K-1]
s_list[K-1] = tmp.lower()

S = ''.join(s_list)

print(S)


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

s_list = list(S)
print(s_list)

tmp = s_list[K-1]
s_list[K-1] = tmp.lower()

''.join(s_list)

print(s_list)


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

s_list = list(S)

tmp = s_list[K-1]
s_list[K-1] = tmp.lower()

S = ''.join(s_list)

print(S)


Verdicts: Wrong Answer

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()
s[k], lower()
print("s")

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

n,k=map(int,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):
from collections import deque
N = int(input())
g = [[] for i in range(N)]
for i in range(N-1):
  u,v,w = map(int,input().split())
  u -= 1
  v -= 1
  g[u].append([v,w])
  g[v].append([u,w])
q = deque([])
ans = [-1] * N
q.append(0)
ans[0] = 0
while len(q) > 0:
  e = q.popleft()
  for i in g[e]:
    if ans[i[0]] > -1:
      continue
    ans[i[0]] += i[1]
    ans[i[0]] = ans[i[0]] % 2
    q.append(i[0])
for i in range(len(ans)):
  if ans[i]%2 == 1:
    print(1)
    continue
  print(0)


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

N,K = map(int,input().split())
S = list(input())
ans = ""
if S[K-1] == "A":
  S[K-1] = "a"
if S[K-1] == "B":
  S[K-1] = "b"
if S[K-1] == "C":
  S[K-1] = "c"
for n in S:
    ans += n
print(ans)


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(int,input().split())
S = input()
s = []
for i in range(N):
    x = S[i]
    if i == K-1:
        if x == 'A':
            x = 'a'
        elif x == 'B':
            x = 'b'
        else:
            x = 'c'
    s.append(x)
ans = s[0]
for i in range(1,N):
    ans += s[i]
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):
N,K=(int(x) for x in input().split())
S=list(int(i) for i in input())
S[K-1] = S[K-1].lower()
print(','.join(S))

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

N,K=(int(x) for x in input().split())
S=list(int(i) for i in input())
S[K] = S[K].lower()
print(','.join(S))

N,K=(int(x) for x in input().split())
S=list(int(i) for i in input())
S[K-1] = S[K-1].lower()
print(' '.join(S))

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

Verdicts: 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):
from collections import deque,defaultdict
n=int(input())
routes=[tuple(map(int,input().split())) for i in range(n-1)]

edges=defaultdict(list)
for v1,v2,dist in routes:
  edges[v1-1].append([v2-1,dist])

ans=[0]*n
q=deque([0])
while q:
  v=q.popleft()
  if ans[v]==0:
    color=[0,1]
  else:
    color=[1,0]
  for edge in edges[v]:
    v2=edge[0]
    dist=edge[1]
    q.append(v2)
    if dist%2==1:
      ans[v2]=color[1]
    else:
      ans[v2]=color[0]
print(*ans,sep='\n')

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

if k == 1:
  sTR = lower(s[0]) + s[1:]
else:
  sTR = s[:k-2] + lower(s[k-1]) + s[:k]

print(sTR)

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

if k == 1:
  sTR = str[0] + STR[1:]
elif k == n:
  sTR = STR[:n-1] + str[n-1]
else:
  sTR = STR[:k-1] + str[k-1] + STR[k:]

print(sTR)


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 numpy as np
words = lambda t : list(map(t, input().split()))



def search(i, visited, ns, ans) :
    #print(i+1)
    visited[i] = True
    for next, weight in ns[i]:
        if visited[next] == False:
            if weight % 2 == 0:
                ans[next] = ans[i]
            else:
                ans[next] = (ans[i]+1) % 2
            search(next, visited, ns, ans)


def dfs(ns, ans):
    visited = [False] * len(ns)
    search(0, visited, ns, ans)

def main():
    n = int(input())
    ns = [[] for _ in range(n)]
    for _ in range(n-1):
        (st,end,weight) = map(int,input().split())
        ns[st-1].append((end - 1,weight))
        ns[end-1].append((st-1,weight))
    ans = [0] * n
    dfs(ns, ans)
    for a in ans:
        print(a)

if __name__ == '__main__':
    main()


import numpy as np
words = lambda t : list(map(t, input().split()))

n,k = words(int)
str = input()

c = str[k-1]
ans = str[:k-1] + c.lower() + str[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):
N,M = map(int,input().split())
S = str(input())
SA = list(S)
D = ["a" , "b" , "c"]

if SA[M] == "A":
    SA[M] = D[0]
elif SA[M] == "B":
    SA[M] = D[1]
else:
    SA[M] = D[2]

M = ''.join(SA)

print(M)

N,M = map(int,input().split())
S = str(input())
SA = list(S)
D = ["a" , "b" , "c"]

if SA[M] == "A":
    SA[M] = D[0]
elif SA[M] == "B":
    SA[M] = D[1]
elif SA[M] == "C"
    SA[M] = D[2]

M = ''.join(SA)

print(M)

N,M = map(int,input().split())
S = str(input())
SA = list(S)
D = ["a" , "b" , "c"]

if SA[M-1] == "A":
    SA[M-1] = D[0]
elif SA[M-1] == "B":
    SA[M-1] = D[1]
elif SA[M-1] == "C":
    SA[M-1] = D[2]

M = ''.join(SA)

print(M)

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

a = 0

for i in range(N):
  j = N - i
  b = 1

  while j < K:
      b /= 2
      j *= 2

  a += b

print(a / N)


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

s = ''

for i in range(len(S)):
    if i + 1 == K:
        s += S[i].lower()
    else:
        s += S[i]

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):
num_str = input().split(" ")
S = input()

N = int(num_str[0])
K = int(num_str[1])

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)

num = input()
S = input()

num_str = input().split(" ")
S = input()

N = int(num_str[0])
K = int(num_str[1])
s = list(S)

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"

"".join(s)
print(s)


num_str = input()
num_str = num_str.split("")

num_str = input().split(" ")
S = input()

N = int(num_str[0])
K = int(num_str[1])




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

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

num_str = input()
num_str = num_str.split("")
N = int(num_str[0])
K = int(num_str[2])

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)


num_str = input().split(" ")
S = input()

N = int(num_str[0])
K = int(num_str[1])



num_str = input().split(" ")
S = input()

N = int(num_str[0])
K = int(num_str[1])
s = list(S)

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"

S = "".join(s)
print(S)


Verdicts: Runtime Error

Wrong Answer

Wrong Answer

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 = map(int, input().split())
s = input()

print(s[:k-1] + lower(s[k-1]) + 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[k-1] = S[k-1].lower()
print(S)

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()
S = S[:k-1] + S[k-1].lower() + S[k:]
print(S)

Verdicts: Runtime Error

Runtime Error

Accepted