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):
S=input()
if 1<=int(S[:2])<=12 and 13<=int(S[2:]) or int(S[2:])==0:
    print("MMYY")
elif 1<=int(S[2:])<=12 and (13<=int(S[:2]) or int(S[:2])==0):
    print("YYMM")
elif 1<=int(S[2:])<=12 and 1<=int(S[:2])<=12:
    print("AMBIGUOUS")
elif (13<=int(S[2:]) or int(S[2:]))==0 and (13<=int(S[:2]) or int(S[:])==0):
    print("NA")

S=input()
if 1<=int(S[:2])<=12 and 13<=int(S[2:]) or int(S[2:])==0:
    print("MMYY")
elif 1<=int(S[2:])<=12 and 13<=int(S[:2]) or int(S[:2])==0:
    print("YYMM")
elif 1<=int(S[2:])<=12 and 1<=int(S[:2])<=12:
    print("AMBIGUOUS")2
elif 13<=int(S[2:]) or int(S[2:])==0 and 13<=int(S[:2]) or int(S[:])==0:
    print("NA")

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"
if S[k-1]=="C":
    S[k-1]="c"
print(S)



N,K=map(int,input().split())
if N>K:
    ans=(N-K+1)/N
else:
    ans=0
for j in range(N):
    l=j
    m=0
    if j==0:
        pass
    while l<K:
        l=2*j
        m+=1
    else:
        ans+=(1/N)*1/(2**m)
print(ans)

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



Verdicts: Wrong Answer

Runtime Error

Runtime Error

Time Limit Exceeded

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())
print(input().replace(s[k-1], s[k-1].lower()))

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 = ord(s[k+1])
C =  chr(int(S)+26)

print(C)

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

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

c=b[K-1]
b[K-1]='c'.lower()
print(''.join(map(str,b)))

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

c=b[K-1]
b[K-1]=c.lower()
print(''.join(map(str,b)))

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


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

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

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

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):
import numpy as np
n,k=map(int,input().split())
s=list(input())
s[k]=s[k].lower()
for i in range(len(s)):
  print(s[i],end="")
#print()

import numpy as np
n,k=map(int,input().split())
s=list(input())
s[k]=s[k].lower()
for i in range(len(s)):
  print(s[i],end="")
print("")

n,k=map(int,input().split())
s=list(input())
s[k]=s[k].lower()
for i in range(len(s)):
  print(s[i],end="")
print("\n")

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

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

a[m] = a[m].remove("A","a").remove("B","b").remove("C","c")
print("".join(a))

n,m = map(int,input().split())
a = list(input())

a[m] = a[m].replace("A","a").replace("B","b").replace("C","c")
print("".join(a))


n,m = map(int,input().split())
a = list(input())

a[m-1] = a[m-1].replace("A","a").replace("B","b").replace("C","c")
print("".join(a))


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




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):
n,k=map(int,input().split())
s=input()
ls=[c for c in s]
for i in range(n):
    if i==k and s[i]=='A':
        ls[i]='a'
    elif i==k and s[i]=='B':
        ls[i]='b'
    elif i==k and s[i]=='C':
        ls[i]='c'
ss = ''.join(ls)
print(ss)

n,k=map(int,input().split())
s=input()
ls=[c for c in s]
for i in range(n):
    if i==k-1 and s[i]=='A':
        ls[i]='a'
    elif i==k-1 and s[i]=='B':
        ls[i]='b'
    elif i==k-1 and s[i]=='C':
        ls[i]='c'
ss = ''.join(ls)
print(ss)

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=input().split()
S=input()
S[K+1].swapcase()
print(S)

N,K=input().split()
S=input()
S[K].swapcase()
print(S)


N,K=input().split()
S=input()
S[K-1].swapcase()
print(S)


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


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



Verdicts: 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):
import sys
from math import log2, ceil
from collections import defaultdict

input = sys.stdin.readline

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

d = defaultdict(int)


for die in range(1,N+1):

    if die < K:
        d[ceil( log2( K/die ) )] += 1

    else:
        d[0] += 1


cumulative = 0

for power in d:
    current = d[power]
    for _ in range(power):
        current /= 2

    cumulative += current



print(cumulative / N)


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

S = input()

for i, c in enumerate(S,1):
    if i == K:
        print(c.lower(), end='')
    else:
        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 = map(int,input().split())
S = list(input())
print(S[K-1])
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: 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()

sa = ""
for i in range(len(S)):
  if S[i] == S[int(K)]:
    sa = sa + str(S[i].lower())
  else:
    sa = sa + str(S[i])
print(sa)

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

if a==0 or b==0:
    print('NA')
elif a>=1 and a<=12 and b>=1 and b<=12:
    print('AMBIGUOS')
elif a>=1 and a<=12 and b>=13:
    print('MMYY')
elif a>=13 and b>=1 and b<=12:
    print('YYMM')
    

s=str(input())
a=int(s[:2])
b=int(s[2:])

if (a==0 or a>=13 ) and ( b==0 or b>=13):
    print('NA')
elif (a>=1 and a<=12 ) and (b>=1 and b<=12):
    print('AMBIGUOS')
elif (a>=1 and a<=12) and b>=13:
    print('MMYY')
elif a>=13 and (b>=1 and b<=12):
    print('YYMM')
    

n,k=map(int,input().split())
S=list(str(input()))
S[k-1]=S[k-1].lower()
ans=''.join(S)
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()
print(s[:k-1] + s[k-1].lower + s[k:])

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

for i in range(n):
  if i == k:
    s[i] = s[i].lower()
    break
    
print("".join(s))

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

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

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

b = s[:k-1]

a = s[k:]

new_s = b + word + a

print(new_s)



n = input()
k = input()
s = input()

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

b = s[:k-1]

a = s[k:]

new_s = b + word + a

print(new_s)


n, k = input().split()
#k = input()
s = input()

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

b = s[:k-1]

a = s[k:]

new_s = b + word + a

print(new_s)



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

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

b = s[:k-1]

a = s[k:]

new_s = b + word + a

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

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

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

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

import functools
def a(c0, c1):
   return c0+c1

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

s[k-1] = s[k-1].lower()
d = functools.reduce(a, s)

print(d)

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

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

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


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

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


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

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


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

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


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=(int(i) for i in 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(S)


S=int(input())

a=S/100
b=S%100

if(a>12 and b>12):
    print("NA")

elif(a==0 and b==0):
    print("NA")

elif((a>12 or a==0) and 1<=b<=12):
        print("YYMM")

elif(1<=a<=12 and (b>12 or b==0)):
        print("MMYY")

elif(1<=a<=12 and 1<=b<=12):
        print('AMBIGUOU')

else:
    print("NA")


S=int(input())

a=S/100
b=S%100

if((a>12 or a==0) and 1<=b<=12):
        print("YYMM")

elif(1<=a<=12 and (b>12 or b==0)):
        print("MMYY")

elif(1<=a<=12 and 1<=b<=12):
        print('AMBIGUOUS')

else:
    print("NA")


N,K=(int(i) for i in input().split())
s=input()
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'

A=''.join(S)
print(A)


Verdicts: 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 sys import stdin

N, K = [int(x) for x in stdin.readline().rstrip().split()]
input_str = stdin.readline().rstrip()
str = input_str[0]
for i in range(1,N):
  if(i==K):
    str = str + input_str[i].lower()
  else:
    str = str + input_str[i]
print(str)

from sys import stdin

N, K = [int(x) for x in stdin.readline().rstrip().split()]
input_str = stdin.readline().rstrip()
str = input_str[0]
for i in range(1,N):
  if(i==K-1):
    str = str + input_str[i].lower()
  else:
    str = str + input_str[i]
print(str)

from sys import stdin
from collections import defaultdict

N, K = [int(x) for x in stdin.readline().rstrip().split()]

S = stdin.readline().rstrip()


if K == 1:
    S3 = list(S[0].lower())
else:
    S3 = list(S[0])
for i in range(1,N):
  if i+1 == K:
    S3.append(S[i].lower())
  else:
    S3.append(S[i])

S4 = ''.join(S3)
print(S4)

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, B = (int(x) for x in input().split())
if A <= 5:
    print(0)
elif A <= 12:
    print(int(B / 2))
else:
    print(B)

N, K = [int(x) for x in input().split()]
S = input()
for i in range(N):
    if i == (K-1):
        print(S[i].lower(), end='')
    else:
        print(S[i], 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 = map(int,input().split())
s = input()
ans = []
for i,char in enumerate(s):
    if i==k:
        char = char.lower()
    ans.append(char)

print("".join(ans))

n,k = map(int,input().split())
s = list(input())
for i,char in enumerate(s):
    if i==k-1:
        s[i] = char.lower()
#print(s)
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()
s[k - 1] = s[k - 1].lower()
print(s)


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

s = input()
s = s[:4]
a = s[:2]
b = s[2:]

if (int(a) > 12 and int(b) > 12) or  int(b) == 0  or int(a) == 0:
	
	print("NA")
	sys.exit()
	
if 0 <  int(a) <= 12 and 0 <  int(b) <= 12:
	print("AMBIGUOUS")

	
if int(a) > 12 and 0 < int(b) <= 12:

	print("YYMM")
	sys.exit()

if 0 < int(a) <= 12 and int(b) > 12:

	print("MMYY")
	sys.exit()

print("NA")




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


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


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

abc = "ABCAB" * 10

abc = abc[:n+1]
print( abc[:k] + abc[k].lower() + abc[k+1:-1])


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


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




Verdicts: 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()
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("".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):
x = input().split(" ")
command = x[1]
N = x[0]
N = command.lower(x[1])
print(N)

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

s = int(input())
a = s % 100
b = ((s-a) % 100)
if a <= 31 and b <= 12:
  print("YYMM")
elif a <= 12 and b <= 31:
  print("MMYY")
elif  a <= 12 and b <= 31 and a <= 31 and b <= 12:
  print("AMBIGUOUS")
else:
  print("NA")
   

x = input().split(" ")
command = x[1]
N = x[0]
N += command.lower(x[1])
print(N)

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

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):
n,k=map(int,input().split())
s=list(input())
ss=s[k-1]

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

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

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

N , K = [int(n) for n in input().split()]
S = input()
print(S[:K]+S[k].lower()+S[K:])

N , K = [int(n) for n 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()
for i in n:
	if i==k:
        if i=='A':
            i='a'
        elif i=='B':
            i='b'
        elif i=='C':
            i='c'        
print(i)
    

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

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=list(input())
a.remove(" ")
n=int(a[0])
k=int(a[1])

s=list(input())
str=""

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


a=list(input())
a.remove(" ")
n=int(a[0])
k=int(a[1])
if(k>n):
    exit()
#n=int(input())
#k=int(input())
s=list(input())
str=""

s[k]=s[k].lower()
print(str.join(s))
#print(str)
#print(s)
a=list(input())
a.remove(" ")
n=int(a[0])
k=int(a[1])
if(k>n):
    exit()
#n=int(input())
#k=int(input())
s=list(input())
str=""

s[k]=s[k].lower()
print(str.join(s))
#print(str)
#print(s)


a=list(input())
a.remove(" ")
n=int(a[0])
k=int(a[1])
if(k>n):
    exit()
#n=int(input())
#k=int(input())
s=list(input())
str=""

s[k]=s[k].lower()
print(str.join(s))
#print(str)
#print(s)


N,K=map(int,input().split())
S=list(input())
S[K-1]=S[K-1].lower()
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):
import re
pat = r'[0-9]+'

Input_num = input()
Input_cou = input()

num_list = re.findall(pat, Input_num)
num = int(num_list[1])

print(Input_cou[:num] + Input_cou[num-1].lower() + Input_cou[num:])


Input_num = input().split()
Input_cou = input()

num = int(Input_num[1])

print(Input_cou[:num-1] + Input_cou[num-1].lower() + Input_cou[num:])

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

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

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

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

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

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

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

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

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

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):
N,K = map(int, input().split())
S = input()
for s in range(len(S)):
    if s == K:
        print(S[s].lower(), end="")
    else:
        print(S[s], end="")

print("")


N,K = map(int, input().split())
S = input()
for s in range(len(S)):
    if s == K-1:
        print(S[s].lower(), end="")
    else:
        print(S[s], 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 = int(input())
graph = {}
root = -1
for n in range(N-1):
    u, v, w = map(int, input().split())
    u -= 1
    v -= 1

    if root == -1:
        root = u
    if u not in graph:
        graph[u] = {}
    if v not in graph:
        graph[v] = {}
    graph[u][v] = w
    graph[v][u] = w    

answer = [-1] * N
def search(node, depth):
    answer[node] = depth
    for n in graph[node]:
        if answer[n] == -1:
            search(n,depth + graph[node][n])
if N == 1:
    print('0')
else:
    search(root, 0)
    for a in answer:
        print('0' if a % 2 else '1')

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 = input()
count = 1
for x in S:
    if count == K :
        print(x.lower(),end="")
        continue
    print(x,end="")
    count += 1
print()


N,K = map(int,input().split())
S = input()
count = 1
for x in S:
    if count == K :
        print(x.lower(),end="")
        count += 1
        continue
    print(x,end="")
    count += 1
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):
a, b = map(int, input().split())
c = input()
 
print(c[:b-1] + c[b-1].lower() + c[b:]

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

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

n,k=map(int,input().split())
s=input()
ans=""
for i in range(n):
  if k==i+1:
    ans+=str.lower(s[i])
  else:
    ans+=s[i]
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):
import numpy as np
 
N, K = map(int, input().split())
 
def get_x(n, K):
    if n >= K:
        return 0
    else:
        x_raw = np.log2(K) - np.log2(n)
        return np.ceil(x_raw)

def get_prob(n, K):
    x = get_x(n, K)
    if x == 0:
        return 1
    else:
        return (1/2)**x
    
ans = np.mean([get_prob(n, K) for n in range(1, N+1)])
 
print(ans)

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 = 0
while N<1 or N>50:
	N = int(input('N: '))
    if N<1 or N>50:
      print('1 <= N <= 50')
K = 0
while K<1 or K>N:
  K = int(input('K: '))
  if K<1 or K>N:
    print('1 <= K <= N')
S = ''
while len(S) != N:
  S = input('S: ')
  if len(S) != N:
    print("Length doesn't Match")
  for i in S:
    if i != 'A' and i != 'B' and i != 'C':
      print('Only A, B and C allowed')
      S = ''
      break

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

N = int(input('N: '))
K = int(input('K: '))
S = input('S: ')
S1 = ''
for i in range (N):
    if i + 1 == K:
        if S[i] == 'A':
            S1 += 'a'
        elif S[i] == 'B':
            S1 += 'b'
        elif S[i] == 'C':
            S1 += 'c'
    else:
        S1 += S[i]

print(S1)


N = 6
K = 3
S = 'ABBCAB'
print('ABbCAB')

n, k = map(int, input().split())
s = list(input())
s[k-1] = chr(ord(s[k-1])+ord('a')-ord('A'))
print(''.join(s))

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


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

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

s[k-1]=s[k-1].lower()
print(*s,sep='')

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

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

def check_YYMMorMMYY(str_date):
    str1=str_date[:2]
    str2=str_date[2:]
    num1=int(str1)
    num2=int(str2)
    # if 1<=num1<=12 and 1<=num2<=12:                                                      
    #     print("AMBIGUOUS")                                                               
    # elif 13<=num1<=99 and 1<=num2<=12:                                                   
    #     print("YYMM")                                                                    
    # elif 1<=num1<=12 and 13<=num2<=99:                                                   
    #     print("MMYY")                                                                    
    # elif 13<=num1<=99 and 13<=num2<=99:                                                  
    #     print("NA")                                                                      
    # elif num1==0 or num2==0:                                                             
    #     print("NA")                                                                      
    if 1<=num1<=12:
        if 1<=num2<=12:
            print("AMBIGUOUS")
        else :
            print("MMYY")
    else:
        if 1<=num2<=12:
            print("YYMM")
        else:
            print("NA")

str_S=input()


if str_S.isdecimal()==0 or len(str_S)!=4 :
    print("Unexpected S")
    sys.exit()

check_YYMMorMMYY(str_S)


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

if isinstance(N,int)==1 and isinstance(K,int)==1 \
   and 1<=N<=50 and 1<=K<=N :

    S=input()
    null_char=S.replace('A','').replace('B','').replace('C','')

    if len(S)==N and S.isupper()==1 and not null_char:
        small_S=S[K-1:K].lower()
        print(S[:K-1] + small_S + S[K:])

    else :
        print("Unexpected parameter S")
        exit()

else :
    print("Unexpected parameter N or K")
    exit()


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

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):
n,k=map(int,input().split())
s=list(input())
t=s.pop(k-1)
s.insert(k-1,t.lower())
print("".join(s)

a=int(input())
if(0<a%100<13):
  if(0<a//100<13):
    print("AMBIGUOUS")
  else:
    print("MMYY")
else:
    if(0<a//100<13):
      print("YYMM")
    else:
      print("NA")


n,k=map(int,input().split())
s=input()
t=s.pop(k-1)
s.insert(k-1,t.lower())
print(s)

n,k=map(int,input())
s=input()
t=s.pop(k-1)
s.insert(k-1,t.lower())
print(s)

n,k=map(int,input().split)
s=input()
t=s.pop(k-1)
s.insert(k-1,t.lower())
print(s)

n,k=map(int,input().split())
s=list(input())
t=s.pop(k-1)
s.insert(k-1,t.lower())
print("".join(s))

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

if s[k] is 'A':
	o = s[:k] + 'a' +s[k:] 
elif s[k] is 'B':
	o = s[:k] + 'b' +s[k:] 
elif s[k] is 'C':
	o = s[:k] + 'c' +s[k:] 

print(o)


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

s = (input())

if s[k-1] is 'A':
	o = s[:k-1] + 'a' +s[k-1:] 
elif s[k-1] is 'B':
	o = s[:k-1] + 'b' +s[k-1:] 
elif s[k-1] is 'C':
	o = s[:k-1] + 'c' +s[k-1:] 

print(o)

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

if s[k] is 'A':
	s[k] = 'a'
elif s[k] is 'B':
	s[k] = 'b'
elif s[k] is 'C':
	s[k] = 'c'

print(s)


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

if s[k] is 'A'
	s[k] = 'a'
elif s[k] is 'B'
	s[k] = 'b'
elif s[k] is 'C'
	s[k] = 'c'

print(s)

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

s = (input())

if s[k-1] is 'A':
	o = s[:k-1] + 'a' +s[k:] 
elif s[k-1] is 'B':
	o = s[:k-1] + 'b' +s[k:] 
elif s[k-1] is 'C':
	o = s[:k-1] + 'c' +s[k:] 

print(o)


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


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):
S=input()
S1=int(S[0:2])
S2=int(S[2:4])
#print(S1,S2)
if S1==0 and S2==0:print("NA");exit()
if S1==0:print("YYMM");exit()
if S2==0:print("MMYY");exit()
if S1>12 and S2>12:print("NAa");exit()
if S1>12:print("YYMM");exit()
if S2>12:print("MMYY");exit()
print("AMBIGUOUS")

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

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())
print(input().replace(s[k-1],s[k-1].lower()))

S = int(input())

if 0 < S // 100 <= 12 and 0 < S % 100<= 12:
    print("AMBIGUOUS")
elif 0 < S // 100 <= 12:
    print("MMYY")
elif 0 < S % 100 <= 12:
    print("YYMM")
else :
    print("NA")

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

print(S[0:K-1] + S[K-1].lower() + S[K:N])

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()
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=list(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(''.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] == "A":
  s=s[0:k]+"a"+s[k+1:n]
elif s[k] == "B":
  s=s[0:k]+"b"+s[k+1:n]
else:
  s=s[0:k]+"c"+s[k+1:n]
print(s)

n,k = map(int,input().split())
s = input()
 
if s[k-1] == "A":
  s=s[0:k-1]+"a"+s[k:n]
elif s[k-1] == "B":
  s=s[0:k-1]+"b"+s[k:n]
else:
  s=s[0:k-1]+"c"+s[k:n]
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=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())
k-=1

if s[k]=="A":
    s[k]="a"
elif s[k]=="B":
    s[k]="b"
else:
    s[k]="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]+str.lower(s[k-1])+s[k:])

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

import math
n,k = map(int,input().split())

pi = 0
for i in range(1,n+1):
  need = math.ceil(math.log(k/i,2))  
  if need > 0:
    pi += (1/2) ** need
  else :
    pi +=1      
print(pi/n)    

n,k = map(int,input().split())
s = list(input())
s[k-1]= str.lower(s[k-1])
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()
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)if s[k-1] == 'A':
  s[k-1] = '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())
string = input()

mojiretu_list = [0 for _ in range(N)]
for i in range(N):
    mojiretu_list[i] = string[i]

if mojiretu_list[k] == 'A':
    mojiretu_list[k] = 'a'

if mojiretu_list[k] == 'B':
    mojiretu_list[k] = 'b'

if mojiretu_list[k] == 'C':
    mojiretu_list[k] = 'c'

ans = ''
for i in range(N):
    ans += mojiretu_list[i]

print(ans)

N, k = map(int, input().split())
string = input()

mojiretu_list = [0 for _ in range(N)]
for i in range(N):
    mojiretu_list[i] = string[i]

if mojiretu_list[k-1] == 'A':
    mojiretu_list[k-1] = 'a'

if mojiretu_list[k-1] == 'B':
    mojiretu_list[k-1] = 'b'

if mojiretu_list[k-1] == 'C':
    mojiretu_list[k-1] = 'c'

ans = ''
for i in range(N):
    ans += mojiretu_list[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(input())
for i in range(n):
    if i==k:
        s[i]=s[i].lower()
str_s="".join(s)
print(str_s)

                                                        
                                                        
                                                        
                                                        
                                                        

n,k=(int(x) for x in input().split())
s=list(input()) 
for i in range(n):
    if i==k-1:
        s[i]=s[i].lower()
str_s="".join(s)
print(str_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):

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

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

print("N:" + n)
print("K:" + k)
print("S:" + s)


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

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

print("N:" + n)
print("K:" + k)
print("S:" + s)


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

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

print(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):
s=list(input())
k=int(input())
s[k-1]=s[k-1].lower()
print(*s,sep="")

n,k=int(input())
s=input()
s[k-1]=s[k-1].lower()
print(*s,sep="")

s=input()
k=int(input())
x=s[k-1]
y=x.lower()
print(s.replace(x,y))

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

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

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):
try:
    s = input()

    f = int(s[:2])
    b = int(s[2:])

    if f != 0:
        if b != 0:
            if f > 12:
                print('YYMM')
            else:
                print('AMBIGUOUS')
        else:
            print('NA')
    else:
        print('NA')

except EOFError:
    pass

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

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

print(''.join(c for c in 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 = list(S)
print(s[K+1].lower())


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

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


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

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

print(S)

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

t = S.lower()
answer = ''

for i in range(N):
  if i == K-1:
    answer = answer + t[i]
  else:
    answer = answer + S[i]

print(answer)

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()
aa=int(s[:2])
bb=int(s[3:])
if 0<aa<=12 and 0<bb<=12: ans='AMBIGUOUS'
elif 0<bb<=12: ans='YYMM'
elif 0<aa<=12: ans='MMYY'
else: ans='NA'
print(ans)

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 math
from functools import reduce

N, K = map(int, input().split())
p = 0
dnms = []


def calc_p(n, c):
    return 1/n * pow(1/2, c)


def calc_dnm(n, c):
    return n * 2 ** c


def calc_lcm(ns):
    return reduce(lcm, ns, 1)


def lcm(x, y):
    return (x * y) // math.gcd(x, y)


for i in range(1, N+1):
    score = i
    cnt = 0
    while score <= K:
        score *= 2
        cnt += 1
    dnms.append(calc_dnm(N, cnt))
    p += calc_p(N, cnt)

print(p)

l = calc_lcm(dnms)
mlcls = [l/x for x in dnms]
print(sum(mlcls) / calc_lcm(dnms))


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

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

n,k=[int(x) for x in input().split()]
s=input()
 
ans=s[:k-1]+s[k-1].lower()+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):
　l = list(map(int,input().split()))
N = l[0]
K = l[1] 
S = input()
list_S = list(S)
if list_S[K-1] == 'A':
    list_S[K-1] = 'a'
elif list_S[K-1] == 'B':
    list_S[K-1] = 'b'
if list_S[K-1] == 'C':
    list_S[K-1] = 'c'
L = ''.join(list_S)
print(L)


N, M = map(int, input().split())
X = [0] * M
Y = [0] * M
Z = [0] * M 
for i in range(M):
  X[i], Y[i], Z[i] = map(int, input().split())

G = [[] for _ in range(N)]

for i in range(M) :
    G[Y[i]-1].append(X[i])
    G[X[i]-1].append(Y[i])

c = [False for _ in range(N)]
 
def DFS(G,s):
    c[s-1] = True
    for i in G[s-1]:
        if not c[i-1]:         
            DFS(G,i)
ans = 0
for i in range(N):
    if not c[i]:
        DFS(G,i+1)
        ans += 1

print(ans)


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


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

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

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

Verdicts: Runtime Error

Runtime Error

Accepted