Problem:


Score : 100 points

Problem Statement

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.

Constraints

1 ≤ N ≤ 50

1 ≤ K ≤ N

S is a string of length N consisting of A, B and C.

Input

Input is given from Standard Input in the following format:

N K
S

Output

Print the string S after lowercasing the K-th character in it.

Sample Input 1

3 1
ABC

Sample Output 1

aBC

Sample Input 2

4 3
CABA

Sample Output 2

CAbA



Sample input:
3 1
ABC


Sample output:
aBC

Submission status: Wrong Answer

Solution code:

if __name__ == '__main__':
    n, k = map(int, input().split())
    ans = input()

    if n ==1:
        ans = ans.lower()
    elif n==2:
        if k == 1:
            ans = ans[0].lower() + ans[1]
        else:
            ans = ans[0]+ ans[1].lower()

    else:
        if k == 1:
            ans = ans[0].lower() + ans[1:n]
        elif k == n:
            ans = ans[0:n - 2] + ans[n - 1].lower()
        else:
            ans = ans[0:k - 1] + ans[k - 1].lower() + ans[k:n]

    print(ans)

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    n, k = map(int, input().split())
    ans = input()

    if n ==1:
        ans = ans.lower()
    elif n==2:
        if k == 1:
            ans = ans[0].lower() + ans[1]
        else:
            ans = ans[0]+ ans[1].lower()

    else:
        if k == 1:
            ans = ans[0].lower() + ans[1:n]
        elif k == n:
            ans = ans[0:n - 2] + ans[n - 1].lower()
        else:
            ans = ans[0:k - 1] + ans[k - 1].lower() + ans[k:n - 1]

    print(ans)

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    n, k = map(int, input().split())
    ans = input()

    if k == 1:
        ans = ans[0].lower() + ans[1:n]
    elif k == n:
        ans = ans[0:n - 2] + ans[n - 1].lower()
    else:
        ans = ans[0:k - 1] + ans[k - 1].lower() + ans[k:n - 1]

    print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N, K=map(int, input().split())
S=input()
print(S.replace(S[K-1],chr(ord(S[K-1])+32)))

Submission status: Wrong Answer

Solution code:
N, K = map(int, input().split())
S = list(input())
print(ord(S[K-1]))
S[K-1] = chr(ord(S[K-1])+32)
print("".join(S))

Submission status: Wrong Answer

Solution code:
n,k = map(int,input().split())


ABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
abc = "abcdefghijklmnopqrstuvwxyz"

s = list(input())

s[k-1] = abc[ABC.find(s[k-1])]
  
print(*s)

Submission status: Wrong Answer

Solution code:
n,k = map(int,input().split())


ABC = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
abc = "abcdefghijklmnopqrstuvwxyz"

s = input()

ans = ""

for ss in s:
  ans += abc[ABC.find(ss)]
  
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(''.join(S))

Submission status: Wrong Answer

Solution code:
# A
n, k = map(int, input().split())
s = list(input())

s[n-1] = s[n-1].lower()
for i in s:
    print(i, end ="")

Submission status: Wrong Answer

Solution code:
a, b = list(map(int,input().split()))
S = list(str(input()))
S[a-1] = str.lower(S[a-1])
S = "".join(map(str,S))
print(S)

Submission status: Wrong Answer

Solution code:
n,m = map(int, input().split())
s = list(input())
abc = ['a','b','c']

s[m-1] = abc[m % 3 - 1]

print(*s, sep='')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in s:
    if s.index(i) == k-1:
        print(i.lower(), end="")
        continue
    print(i, end="")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n, k = map(int, input().split())
s = 0
for i in range(n):
	i += 1
	x = i
	cnt = 0
	while x < k:
		x *= 2
		cnt += 1
	ans = (2**cnt)*n 
	s += 1/ans
print (s)

Submission status: Wrong Answer

Solution code:
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:])

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def YorM(x):                                                                                                                                                        
        #1...YorM                                                                                                                                                   
        #0...Y                                                                                                                                                      
    if((1<=x)and(x<=12)):                                                                                                                                           
        return 1                                                                                                                                                    
    else:                                                                                                                                                           
        return 0                                                                                                                                                    
                                                                                                                                                                    
def D(a,b):                                                                                                                                                         
    n1 = YorM(a)                                                                                                                                                    
    n2 = YorM(b)                                                                                                                                                    
    #print(n1, n2)                                                                                                                                                  
    if(n1==0 and n2==0):                                                                                                                                            
        print("NA")                                                                                                                                                 
    elif(n1==0 and n2==1):                                                                                                                                          
        print("YYMM")                                                                                                                                               
    elif(n1==1 and n2==0):                                                                                                                                          
        print("MMYY")                                                                                                                                               
    else:                                                                                                                                                           
        print("AMBIGUOUS")                                                                                                                                          
                                                                                                                                                                    
                                                                                                                                                                    
S = input()                                                                                                                                                         
a = int(S[0:2])                                                                                                                                                     
b = int(S[2:4])                                                                                                                                                     
D(a, b)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
n,k = map(int,input().split())
ans = 0
for i in range(1,n+1,1):
  temp = i
  count = 0
  while (temp < k):
      temp *= 2
      count += 1
  #print("1/{} * (1/2)^{}".format(n,count))
  ans += min(1,(math.pow((1/2),count)))
print("{:1.9f}".format(ans/n))

Submission status: Wrong Answer

Solution code:
def isMonth(x):
  y = int(x)
  return (1 <= y and y <= 12)

date = input()
firstvalid = isMonth(date[0:2])
secondvalid = isMonth(date[2:])
 
if firstvalid and secondvalid:
  print('AMBIGUOUS')
elif firstvalid:
  print('MMYY')
elif secondvalid:
  print('YYMM')
else:
  print('NA')

Submission status: Wrong Answer

Solution code:
def main():
    S = input()
    first = int(S[0:2])
    last = int(S[2:4])

    if(first>12 and last<=12):
        print("YYMM")
    elif(last>12 and first<=12):
        print("MMYY")
    elif(last<=12 and first<=12):
        print("AMBIGUOUS")
    else:
        print("NA")
    
    return
main()

Submission status: Wrong Answer

Solution code:
a, b = (int(x) for x in input().split())
word = list(input())
new_word = ""

for i in word:
    if word[b-1] == i:
        new_word += i.lower()
    else:
        new_word += i

print(new_word)

Submission status: Wrong Answer

Solution code:
#INPUT
#N K
#S

#1≤N≤50
#1≤K≤N
#Sは A, B, C からなる長さNの文字列

#ex
#3 1
#ABC

#OUTPUT
#文字列SのK文字目を小文字に書き換え、新しくできたSを出力せよ。

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

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

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

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

print(str1+str2+str3)

Submission status: Wrong Answer

Solution code:
N, K = map(int,input().split())
S = input()
OOMOJI = S[K-1]
KOMOJI = (S[K-1]).lower()
output_S = S.replace(OOMOJI, KOMOJI)
print(output_S)

Submission status: Wrong Answer

Solution code:
n,k=map(int,input().split())
s=list(input())
s[k-1]=chr(ord(s[k-1])+26)
print(''.join(s))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n, k = map(lambda x: int(x), input().split())
s = input()

str = ""
for i in range(n):
  if i == k:
    str += s[i].lower()
  else:
    str += s[i]

print(str)

Submission status: Wrong Answer

Solution code:
n, k = map(lambda x: int(x), input().split())
s = input()

str = ""
for i in range(n):
  if i == k:
    str += s[i].upper()
  else:
    str += s[i]

print(str)

Submission status: Wrong Answer

Solution code:
n,k = map(int,input().split())
#print(n,k)
S=list(input())
print(S)
s=S.pop(k-1)
print(s)
s=s.lower()
print(s)
S.insert(k-1, s)

print(''.join(S))

Submission status: Wrong Answer

Solution code:
n,k = map(int,input().split())
#print(n,k)
s=list(input())
#print(s)
print(s[k-1].lower())

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N, K = map(int, input().split())
M = 0
def coin(x):
  k = 1
  while k < x:
    k *= 2
  return 1/k
for i in range(N):
  M += coin(K/(i + 1))
print(M / N)

Submission status: Wrong Answer

Solution code:
a,b = map(int,input().split())
s=input()
for i in range(len(s)):
  if i+1==b:
    print(s[i].lower(),end='')
  print(s[i],end='')

Submission status: Wrong Answer

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n,k=INTM()
    s=STR()
    if k>1and k!=n:
        S=s[0:k-1]+s[k-1].lower()+s[k:n]
        print(S)
    elif k==1:
        S=s.capitalize()
        S=S.swapcase()
        print(S)
    else:
        S=s[0:n-1]+s[n-1].upper()
        print(S)
if __name__ == '__main__':
    do()

Submission status: Wrong Answer

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

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

print(*S, end='')

Submission status: Wrong Answer

Solution code:
n,k = map(int, input().split())
s = input()
s = s.replace(s[k-1], s[k-1].lower())

print(s)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N,K =map(int,input().split())
S=input()
output=''

for i in range(len(S)):
    tmp =S[i]
    if (N-1) == i:
        tmp = tmp.lower()
    output += tmp
print(output)

Submission status: Wrong Answer

Solution code:
N,K =map(int,input().split())
S=input()
leng = len(S)
output=''

for i in range(len(S)):
    tmp = S[i]
    print(tmp)

    if (N-1) == i:
        tmp = tmp.lower()

    output += tmp

print(output)

Submission status: Wrong Answer

Solution code:
N,K = map(int,input().split())
S = str(input())
T = S.replace(S[K-1], chr(ord(S[K-1])+32),1)
print(T)

Submission status: Wrong Answer

Solution code:
N,K = map(int,input().split())
S = str(input())
T = S.replace(S[K-1], chr(ord(S[K-1])+32))
print(T)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,k=map(int,input().split());s=input();s=s.replace(s[k-1],s[k-1].lower());print(s)

Submission status: Wrong Answer

Solution code:
N,M = input().strip().split()
K = int(M)
S = input()
if K <= int(N):
  print(S[K-1].lower())

Submission status: Wrong Answer

Solution code:
n,k = map(int,input().split())
s = input()
s = s.replace(s[k-1],s[k-1].swapcase())
print(s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a=(s[n-2]).lower()

print(s[0:n-2] + a + s[n-1:])

Submission status: Wrong Answer

Solution code:
n, k = map(int, input().split())

s = input()

if n == 1:
    print(s.lower())
    exit()
else:
    l = []
    for x in s:
        if x == s[k - 1]:
            l.append(x.lower())
        else:
            l.append(x)
    a = ''.join(l)
    print(a)

Submission status: Wrong Answer

Solution code:
n, k = map(int, input().split())

s = input()

l = []

for x in s:
    if x == s[k - 1]:
        l.append(x.lower())
    else:
        l.append(x)

a = ''.join(l)

print(a)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

print(s.replace(s[n-1], s[n-1].upper()))

Submission status: Wrong Answer

Solution code:
l=list(map(int,input().split()))
s=list(str(input()))
a=l[0]
b=l[1]-1
ans=[]
for k in s:
  if(s.index(k)!=b):
    ans.append(k)
  else:
    ans.append(k.lower())
print("".join(ans))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(str(s))

Submission status: Wrong Answer

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

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

print(s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n, k = map(int, input().split())
print("A" * (k - 1) + "a" + "A" * (n - k))

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

Solution code:
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))

Submission status: Wrong Answer

Solution code:
N,K=map(int,input().split())
i=0
q=0 #確率
for j in range(1,N+1):
  while j*(2**i)<K:
    i+=1
  q+=(1/N)*((1/2)**i)
print(q)

Submission status: Wrong Answer

Solution code:
s = input()
if int(s[0:2]) == 0 or int(s[2:4]) == 0:
  print("NA")
elif 0 < int(s[0:2]) <= 12 and 0 < int(s[2:4]) <= 12 :
  print("AMBIGUOUS")
elif int(s[2:4]) < 13:
  print("YYMM")
else:
  print("MMYY")

Submission status: Wrong Answer

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

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

print(s)

Submission status: Wrong Answer

Solution code:
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))

Submission status: Wrong Answer

Solution code:
N,K = map(int,input().split())
S = input()
answer = 0
print(type(S))

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

Submission status: Wrong Answer

Solution code:
n,k = map(int,input().split())
list1 = list(input())
k = k-1
if list1[k] == "A":
    list1[k] = "a"
elif list1[k] == "B":
    list1[k] = "b"
elif list1[k] == "C":
    list1[k] = "C"

print("".join(list1))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

print(s)

Submission status: Wrong Answer

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

s[k-1].lower()

print(s)

Submission status: Wrong Answer

Solution code:
n,m=map(int,input().split())
a=input()
a[m-1].lower()
print(a)

Submission status: Wrong Answer

Solution code:
N,K = map(int,input().split())
S = input('')

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,k = map(int,input().split())
s = str(input())
print(s.replace(s[k-1],s[k-1].lower()))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(S.translate(table))

Submission status: Wrong Answer

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

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

print(s[:k-1]+mm+s[k:])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n, k = map(int, input().split())
s = input()
result = ""
for i in range(len(s)):
  if i == k:
    result += s[i].lower()
  else:
    result += s[i]
print(result)

Submission status: Wrong Answer

Solution code:
import math
n, k = map(int, input().split())
ans = 0
for i in range(n):
    a = max(math.ceil(math.log2(k/(i+1))), 0)
    ans += 1/(n*2**a)
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N,K=[int(s) for s in 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([str(n) for n in S]))

Submission status: Wrong Answer

Solution code:
N,K=[int(s) for s in input().split()]
S=input()
x=S[K-1]
if x=="A":
  y="a"
elif x=="B":
  y="b"
else:
  y="C"
Ans=S[:K-1]+y+S[K:]
print(Ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

for i in range(len(s)):
  if i == k:
    print(s[i].lower(), end="")
  else:
    print(s[i], end="")

Submission status: Wrong Answer

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

for i in range(len(s)):
  if i == k:
    print(s[i].lower, end="")
  else:
    print(s[i], end="")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N,K=map(int, input().split())
S=input()
if S[K-1]=='A':
  SS=S.replace('A','a')
if S[K-1]=='B':
  SS=S.replace('B','b')
if S[K-1]=='C':
  SS=S.replace('C','c')
print(SS)

Submission status: Wrong Answer

Solution code:
s, k = map(int, input().split())
x = input()

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

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

Submission status: Wrong Answer

Solution code:
N, K=map(int, input().split())
S= input()
T=''
for i in range (K):
    if i ==K-1:
        T += S[i].lower()
    else:
        T += S[i]
print(T)

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
n, k = map(int, input().split())
s = input()
print(s.replace(s[k-1], s[k-1].lower()))

Submission status: Wrong Answer

Solution code:
N, K = map(int, input().split())
S = str(input())
S.replace(S[K-1], S[K-1].lower())
print(S)

Submission status: Wrong Answer

Solution code:
import math
N,K=map(int,input().split())
m=0
for i in range(1,N+1):
  if i<K:
    temp=math.ceil(math.sqrt(K/i))
    m+=(1/2)**temp
  else:
    m+=1
print(m/N)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N,K=map(int,input().split())
S=list(str(input()))
S[K-1]=S[K-1].lower()

m=",".join(S)
print(m)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

S_list = [c for c in S]
print(S_list)

if S_list[K-1] == 'A':
  S_list[K-1] = 'a'
elif S_list[K-1] == 'B':
  S_list[K-1] = 'b'
else:
  S_list[K-1] = 'c'

print

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
_, k = map(int, input().split())
s = list(input())
s[k-1] = s[k-1].upper()
print(''.join(s))

Submission status: Wrong Answer

Solution code:
n, k = map(int, input().split())
s = input()
answer = []

print(s[k-1].lower())
for i, c in enumerate(s, 1):
    if i == k:
        answer.append(c.lower())
    else:
        answer.append(c)
print("".join(answer))

Submission status: Wrong Answer

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

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

if 1 < K < N-1:
    print(S[:K-1] + lower_str + S[K:])
elif (K > 1) and (K == N-1):
    print(S[:K-1] + lower_str + S[K])
elif K == 1:
    print(lower_str + S[K:])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=list(map(int,input().split()))
S=list(input())
k=N[1]
S[k-1]=S[k-1].lower()
j = ','.join(S)
print(j)

Submission status: Wrong Answer

Solution code:
N,K=map(int, input().split())
S=input()
print(S[K-1].lower())
#if K==1:
#  S=S[K-1].lower()+S[K:]
#elif K==N:
#  S=S[:K-1]+S[K-1].lower()
#else:
S=S[:K-1]+S[K-1].lower()+S[K:]
print(S)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N,K=map(int, input().split())
S=input()
print(S[K-1].lower())
if K==1:
  S=S[K-1].lower()+S[K:]
elif K==N:
  S=S[:K-2]+S[K-1].lower()
else:
  S=S[:K-2]+S[K-1].lower()+S[K:]
print(S)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n, k = map(int, input().split())

letters = ''
for i, l in enumerate(input().split()):
  if i + 1 == k:
    letters += l.lower()
  else:
    letters += l
print(letters)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
# ABC 126 C
n, k = [int(el) for el in input().split(' ')]
H = []
for i in range(1, n+1):
    h = 0
    while i < k:
        i = 2*i
        h += 1
    H.append(h)

total = 1/n * sum([(1/2)**h for h in H])
print(total)

Submission status: Wrong Answer

Solution code:
#A-Changing a Character(ABC126)
X=list(map(int, input().split()))
S=str(input())
S=S.replace(S[X[1]-1],S[X[1]-1].lower())
print(S)

Submission status: Wrong Answer

Solution code:
# n, k: 数値　s: 文字列　が与えられる
# k文字目を入れ替えよ

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

dic = {"A":"a", "B":"b", "C":"c"}

# キーとなる文字　文字列のインデックスは0から
# s[k-1]


# 小文字にする表現がある 下記なら1発
# print(s[:k-1] + s[k-i].lower() + s[k-1:])

# [開始インデックス:終了インデックス] 数値は　より大　と　未満
print(s[:k-1] + dic.get(s[k-1]) + s[k-1:])

Submission status: Wrong Answer

Solution code:
# n, k: 数値　s: 文字列　が与えられる
# k文字目を入れ替えよ

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

dic = {"A":"a", "B":"b", "C":"c"}

# キーとなる文字　文字列のインデックスは0から
# s[k-1]

# [開始インデックス:終了インデックス] 数値は　より大　と　未満
print(s[:k-1] + dic.get(s[k-1]) + s[k-1:])

Submission status: Wrong Answer

Solution code:
# n, k: 数値　s: 文字列　が与えられる
# k文字目を入れ替えよ

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

dic = {"A":"a", "B":"b", "C":"c"}

# キーとなる文字　文字列のインデックスは0から
# s[k-1]

# [開始インデックス:終了インデックス] 数値は　より大　と　未満
print(s[:k] + dic.get(s[k-1]) + s[k-1:])

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import math
n, k = map(int, raw_input().split())
p = 0.0
for i in range(1,n+1):
    if i < k:
        x = math.ceil(math.log((float(k) / float(i)), 2))
        p += (float(1) / float(n)) * ((0.5) ** x)
    else:
        p += (float(1) / float(n))

print p

Submission status: Wrong Answer

Solution code:
# -*- coding:utf-8 -*-

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

for i in range(n):
    if i == k:
        print(s[i].lower(), end="")
    else:
        print(s[i], end="")
print("")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def test():
    n,k = map(int,input().split())
    s = input()

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

if __name__ == "__main__":
    test()

Submission status: Wrong Answer

Solution code:
def test():
    n,k = map(int,input().split())
    s = input()

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


if __name__ == "__main__":
    test()

Submission status: Wrong Answer

Solution code:
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)

Submission status: Wrong Answer

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

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

print(S)

Submission status: Wrong Answer

Solution code:
n, k = map(int, input().split())
s = str(input())
t = s[k-1].lower()
ans = s.replace(s[k-1], t)
print(ans)

Submission status: Wrong Answer

Solution code:
N,K=(int(x) for x in input().split())
S=input()
Sa=S[0:K-2]+str(S[K-1].lower())+S[K:N-1]
print(Sa)