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: Accepted

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

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

if __name__ == "__main__":
    solve()

Submission status: Accepted

Solution code:
# coding: utf-8
n, k = map(int, input().split())
s = list(input())
data = {'A': 'a', 'B': 'b', 'C': 'c'}
tmp = s[k - 1]
s[k - 1] = data[tmp]
print(''.join(map(str, s)))

Submission status: Accepted

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

l1=['A','B','C']
l2=['a','b','c']

sl = list(s)

sl[K-1] = l2[l1.index(s[K-1])]

print(''.join(sl))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
inp = input()
n = int(inp.split()[0])
k = int(inp.split()[1])

s = input()

ans = ""

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N, K = (int(i) for i in input().split())

S = input()

if S[K - 1] == "A":
    S = S[:K-1]+"a"+S[K:]
if S[K - 1] == "B":
    S = S[:K-1] + "b" + S[K:]
if S[K - 1] == "C":
    S = S[:K-1]+"c"+S[K:]

print(S)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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'
else:
    S[K-1]  = 'c'
    
print(''.join(S))

Submission status: Accepted

Solution code:

N, K = [int(i) for i in input().split()]
S = input()
res = ""
for i,ch in enumerate(S):
    if i == K - 1:
        res += ch.lower()
    else:
        res += ch
print(res)

Submission status: Accepted

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

s_ = S[K-1]
if s_ == 'A':
  s_ = 'a'
elif s_ == 'B':
  s_ = 'b'
elif s_ == 'C':
  s_ = 'c'

S[K-1] = s_

print(''.join(S))

Submission status: Accepted

Solution code:
def main():
    n, k = list(map(int, input().split()))
    s = input().strip()
    result = s[0:k - 1] + s[k - 1].lower() + (s[k:] if k < n else '')
    print(result)


main()

Submission status: Accepted

Solution code:
N,K = map(int, raw_input().split())
S = raw_input()
i = 0
S2 = ""
for c in S:
	i += 1
	if(i == K):
		if c =='A':
			S2 += 'a'
		elif c == 'B':
			S2 += 'b'
		elif c == 'C':
			S2 += 'c'
	else:
		S2 += c
print(S2)

Submission status: Accepted

Solution code:
N, K = [int(s) for s in input().split()]
K = K - 1
S = input()

nS = S[:K] + str.lower(S[K]) + S[K+1:]

print(nS)

Submission status: Accepted

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

Submission status: Accepted

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


def solve(N, K, S):
    return S[:K-1] + S[K-1].lower() + S[K:]


if __name__ == '__main__':
    inputs = read()
    print("%s" % solve(*inputs))

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
s = list(str(input()))
result = ""
for index, char in enumerate(s):
    if index == k - 1:
        result += char.lower()
    else:
        result += char

print(result)

Submission status: Accepted

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

s = input()

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

Submission status: Accepted

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

s = ''.join(si if i+1 != K else si.lower() for i, si in enumerate(S))
print(s)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

S = [s.lower() if (i == K-1) else s for i, s in enumerate(S)]

print("".join(S))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, k =map(int,input().split())
str = input()
change = str[k-1]

str = str[0:k-1] + change.lower() + str[k:n]

print(str)

Submission status: Accepted

Solution code:
i = int(input().split()[1]) - 1
s = input()
ss = s[i].lower()
ans = ''
for j, sj in enumerate(s):
    if i == j:
        ans += ss
    else:
        ans += sj
print(ans)

Submission status: Accepted

Solution code:

a=list(map(int,input().split(" ")))
s=input()
for i,it in enumerate(s):
    if i+1==a[1]:
        print(chr(ord(it)-ord('A')+ord('a')),end="")
    else:
        print(it,end="")
print()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#入力取得
N, K = map(int, input().split())
S = input()

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

if K == len(S):
    result = S[0:K-1] + small
elif K == 1:
    result = small + S[1:]
elif K != 1:
    result = S[0:K-1] + small + S[K:]

print(result)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
S = list(input())
S[K-1] = S[K-1].lower()
ans = ""
for s in S:
  ans += s
print(ans)

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
s = input()
ans = ""
if s[k-1] == "A":tmp="a"
if s[k-1] == "B":tmp="b"
if s[k-1] == "C":tmp="c"
for i in range(len(s)):
    if i == k-1:
        ans += tmp
    else:
        ans += s[i]
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

S = input()

for i in range(N):
    if(i==(K-1)):
        print(S[i].lower(), end='')
    else:
        print(S[i], end='')
print('\n', end='')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
def ls(): return stdin.readline()

def li(): return map(int, stdin.readline().split())
N, K = tuple(li())
S = ls()
sl = []
for i, c in enumerate(S):
    if i == K -1:
        sl.append(c.lower())
    else:
        sl.append(c)

print(''.join(sl))

Submission status: Accepted

Solution code:
N, K = list(map(int, input().split(' ')))
#print(N, K)

S = list(input())
#print(S)

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

for chara in S:
    print(chara, end='')
print()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,k=map(int,input().split())
s=input()
a=s[k-1]
a=a.lower()
l=''
if k==1:
  l+=a
  l+=s[k:]
  print(l)
elif k<n:
  l+=s[:k-1]+a+s[k:]
  print(l)
else:
  l+=s[:k-1]+a
  print(l)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

s0 = s[:(k-1)]
s1 = s[k-1].lower()
s2 = s[k::]

print(s0+s1+s2)

Submission status: Accepted

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

for i in range(len(S)) :
    if i == K - 1 :
        print(S[i].lower(), end="")
    else :
        print(S[i], end="")
print()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

N, a = map(int,input().split())
moji = input()
new = moji[:a-1] + moji[a-1].lower() + moji[a:]
print(new)

Submission status: Accepted

Solution code:
n,k = input().split()
s = input()
S = ''
for i in range(int(n)) :
	if (i == int (k)-1) :
		S+= s[i].lower()
		continue
	S+=s[i]
	
print(S)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = {}
X["A"] = "a"
X["B"] = "b"
X["C"] = "c"

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

Submission status: Accepted

Solution code:
def main():
    N, K = map(int, input().split())
    S = input()
    print(replace(S, K))


def replace(S, K):
    if S[K-1] == 'A':
        return S[:K-1] + 'a' + S[K:]
    elif S[K-1] == 'B':
        return S[:K-1] + 'b' + S[K:]
    else:
        return S[:K-1] + 'c' + S[K:]


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N, K = [int(item) for item in input().split()]
S = list(input())
S[K-1] = S[K-1].lower()
print("".join(S))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    N, K = map(int, input().split())
    S = input()
    S_ = []
    for i in range(N):
        a = S[i]
        if i != K - 1:
            S_.append(a)
        else:
            S_.append(a.lower())

    S_ = ''.join(S_)
    print(S_)

resolve()

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

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

n,k = na()
s = input()
f = s[:k-1]
b = s[k-1:]
b = b.title().swapcase()
print(f + b)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

s = S.lower()

ans =""
for i in range(N):
    if i==K-1:
        ans += s[i]
    else:
        ans += S[i]


print(ans)

Submission status: Accepted

Solution code:
#!python3
import sys

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
s = input()
moji = ''
for N in range(n):
        if N == k - 1:
                if s[N] =='A':
                        moji += 'a'
                if s[N] =='B':
                        moji += 'b'
                if s[N] =='C':
                        moji += 'c'
        else:
                moji += s[N]

print(moji)

Submission status: Accepted

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

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

ans=S[0:K-1] + s + S[K:]


print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
S = input()
s = [ord(c) for c in S]
s[K-1] += 32
for c in s:
    print(chr(c), end="")
print()

Submission status: Accepted

Solution code:
n,k = list(map(int,input().split()))
s = input()
t = ''
for i in range(n):
  if i != k-1:
    t += s[i]
  else:
    if s[k-1] == 'A':
      t += 'a'
    elif s[k-1] == 'B':
      t += 'b'
    else:
      t += 'c'
print(t)

Submission status: Accepted

Solution code:
import sys
import re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits



def input(): return sys.stdin.readline().strip()


def INT(): return int(input())


def MAP(): return map(int, input().split())


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



sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

n, k = MAP()

s = list(input())



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

s=''.join(s)

print(s)

Submission status: Accepted

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

Submission status: Accepted

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

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'

s = S[0]

for i in range(N-1):
    s += S[i+1]

print(s)

Submission status: Accepted

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

print(''.join(S))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#coding:utf-8

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

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

for i in s:
    print(i,end='')
print()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

readline = sys.stdin.readline

N, K = map(int, readline().split())
S = readline().rstrip()

c = S[K - 1]
c_ = chr(ord('a') + (ord(c) - ord('A')))

s = [c for c in S]
s[K - 1] = c_
print(''.join(s))

Submission status: Accepted

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

print("".join(S))

Submission status: Accepted

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

cdict = {"A":"a","B":"b","C":"c"}
print(S[:K-1] + cdict[S[K-1]] + S[K:])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, K = map(int, raw_input().split())
S = list(raw_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: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, K = [int(s) for s in input().split(" ")]
S = input()
print(S[:max(0, K-1)] + S[K-1].lower() + S[K:])

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n, k = map(int, input().split())
s = input()

change = {'A': 'a', 'B': 'b', 'C': 'c'}

_s = s[:k-1] + change[s[k-1]] + s[k:]
print(_s)

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
''' 
------------------------
author : iiou16
------------------------
'''

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

    output = S

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math

mod = 10**9+7

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

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

print(S[:K-1]+replace+S[K:])

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
S = input()
sum = ""
for i, s in enumerate(S):
  if i+1 ==b:
    s = s.lower()
  sum += s
print("{}".format(sum))

Submission status: Accepted

Solution code:
import math
import functools
import itertools
import numpy as np
import sys
MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

N,K = IL()
s = S()
dic = {"A":"a","B":"b","C":"c"}


if s[K-1] == "A":
    ans = s[:K-1] + "a" + s[K:]
if 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)

Submission status: Accepted

Solution code:
N,K = map(int,input().split())
S = list(str(input()))
for i in range(N):
    if i == (K-1):
        S[i] = S[i].lower()
print("".join(S))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N,K = [int(x) for x in input().split()]
S = list(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

Solution code:
N, K = list(map(int, input().split(' ')))
S = input()
out = ''
for i, s in enumerate(S):
    if i == K-1:
        s = s.lower()
    out += s
print(out)

Submission status: Accepted

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'
elif S[K-1] == 'C':
    S[K-1] = 'c'

print(''.join(S))

Submission status: Accepted

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

    S_list = list(S)

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

    answer = "".join(S_list)

    print(answer)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

s_temp = s.swapcase()

ans = s[:k-1]+s_temp[k-1]+s[k:]

print(ans)

Submission status: Accepted

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"

elif s[k-1] == "C":
    s[k-1] = "c"


for i in range(len(s)):
    print(s[i], end="")

print()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def solve():
    N, K = [int(_) for _ in raw_input().split()]
    S = [_ for _ in raw_input()]
    S[K-1] = S[K-1].lower()
    print ''.join(S)

if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(n):
  if i==k-1:
    s[i] = s[i].lower()
    
print(''.join(s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

def solve(n, k, s):
    ans = ''
    for i, char in enumerate(s):
        newChar = char.lower() if i + 1 == k else char
        ans = ans + newChar
    return ans


def main():
    lines = stdin.readlines()
    n, k = [int(n) for n in lines[0].split(' ')]
    s = lines[1]
    ans = solve(n, k, s)
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
s = input()
ans = ""
for i in range(a):
    if(i == b-1):
        ans += s[i].lower()
    else:
        ans += s[i]
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc126/tasks/abc126_a
import itertools
from collections import Counter
from collections import defaultdict
import bisect

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split(" "))
s=input()
l=""
for j,i in enumerate(s):
  if j!=b-1:
    l=l+i
  else:
    l=l+i.lower()
print(l)

Submission status: Accepted

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

for i in range(N):
    if i == K-1:
        print(S[i].lower(), end="")
    else:
        print(S[i], end="")
print()

Submission status: Accepted

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

s = s.lower()

t[k-1] = s[k-1]

print("".join(t))

Submission status: Accepted

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

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

print(''.join(Ss))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N, K = map(int, input().split())
S = input()
for i, x in enumerate(S):
    if i+1 == K:
        print(x.lower(), end="")
    else:
        print(x, end="")
print()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n,k = [int(u) for u in input().split(" ")]
s = list(input())
s[k-1] = s[k-1].lower()
print("".join(s))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(low)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#
# abc126 a
#


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

string = ''
for i in range(len(s)):
    if i+1 == k:
        string += s[i].lower()
    else:
        string += s[i]
print(string)

Submission status: Accepted

Solution code:
n, k = [int(item) for item in input().split()] 
k -= 1
s = input().rstrip()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3


def solv(n, k, s):
    s = [c for c in s]
    s[k-1] = s[k-1].lower()
    return "".join(s)


if __name__ == '__main__':

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

    ans = solv(n, k, s)

    print(ans)

Submission status: Accepted

Solution code:
line = input()
elem = line.split()
n = int(elem[0])
k = int(elem[1])

line = input()

ans = ""
ans += line[:k - 1]
if line[k - 1] == 'A':
    ans += 'a'
elif line[k - 1] == 'B':
    ans += 'b'
else:
    ans += 'c'
ans += line[k:]

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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: Accepted

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

Submission status: Accepted

Solution code:
def getlist():
	return list(map(int, input().split()))

N, K = getlist()
K -= 1
S = input()
if S[K] == "A":
	print(S[:K] + "a" + S[K + 1:])
elif S[K] == "B":
	print(S[:K] + "b" + S[K + 1:])
else:
	print(S[:K] + "c" + S[K + 1:])

Submission status: Accepted

Solution code:
def task_a():
    n, k = map(int, input().split())
    ss = list(input().strip())
    ss[k-1] = ss[k-1].lower()
    print(''.join(ss))
  
task_a()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(20000000)
#input = sys.stdin.readline
n,k = map(int,input().split())
s = input()
s = s[:k-1] + s[k-1].lower() + s[k:]
print(s)

Submission status: Accepted

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

Submission status: Accepted

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