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:
N,K=map(int,input().split())
S=input()
ans=""
for x in range(N):
  if x!=K-1:
    ans+=S[x]
  else:
    if S[x]=="A":
      ans+="a"
    elif S[x]=="B":
      ans+="b"
    elif S[x]=="C":
      ans+="c"
print(ans)

Submission status: Accepted

Solution code:
# abc126_a.py
# https://atcoder.jp/contests/abc126/tasks/abc126_a

# A - Changing a Character /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点 : 100点

# 問題文
# A, B, C からなる長さ Nの文字列 S と、1 以上 N 以下の整数 K が与えられます。 
# 文字列 S の K 文字目を小文字に書き換え、新しくできた Sを出力してください。

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

# 入力
# 入力は以下の形式で標準入力から与えられる。
# N K
# S


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

# 入力例 1
# 3 1
# ABC

# 出力例 1
# aBC

# 入力例 2
# 4 3
# CABA

# 出力例 2
# CAbA


global FLAG_LOG
FLAG_LOG = False


def log(value):
    # FLAG_LOG = True
    # FLAG_LOG = False
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    S = lines[1]
    # N = int(lines[0])
    N, K = list(map(int, lines[0].split()))
    # values = list(map(int, lines[1].split()))
    # values = list(map(int, lines[2].split()))
    # values = list()
    # for i in range(6):
    #     values.append(int(lines[i]))
    # valueses = list()
    # for i in range(Q):
    #     valueses.append(list(map(int, lines[i+1].split())))

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

    result = S[:K-1] + char + S[K:]

    return [result]


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['3 1', 'ABC']
        lines_export = ['aBC']
    if pattern == 2:
        lines_input = ['4 3', 'CABA']
        lines_export = ['CAbA']
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode


# 主処理
def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(2)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')
    # finished = time.time()
    # duration = finished - started
    # print(f'duration=[{duration}]')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Accepted

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

def main():

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

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

    ans = ''.join(ans)

    print(ans)


if __name__ == "__main__":
    main()

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

Sstr = list(S)
Sstr[K-1] = Sstr[K-1].lower()
S2 = ''.join(Sstr)

print(S2)

Submission status: Accepted

Solution code:
N, K = (int(x) for x in 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 = input()

ans = ""
for i, s in enumerate(S):
    if i == K-1:
        ans += s.lower()
    else:
        ans += s
print(ans)

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

arr =[]
for i in range(N):
    if i+1 == K:
        arr.append(str.lower(S[i]))
    else:
        arr.append((S[i]))

print(*arr, sep='')

Submission status: Accepted

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

Submission status: Accepted

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

s = list(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#include<bits/stdc++.h>
n,k=map(int,input().split())
s=input()
c=""
for i in range(n):
  if i==k-1:
    c+=s[i].lower()
  else:
    c+=s[i]
print(c);

Submission status: Accepted

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

print(S[:K-1], end='')

if K == N:
    print(S[K-1].lower())
else:
    print(S[K-1].lower(), end='')
    print(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 = 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()

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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:
def readinput():
    n,k=map(int,input().split())
    s=input()
    return n,k,s

def main(n,k,s):
    ans=s[:k-1]+s[k-1].lower()+s[k:]
    return ans

if __name__=='__main__':
    n,k,s=readinput()
    ans=main(n,k,s)
    print(ans)

Submission status: Accepted

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

lists = []
for i in range(0, n, 1):
  if i+1 == k:
    lists.append(s[i].lower())
  else:
    lists.append(s[i])

print(''.join(lists))

Submission status: Accepted

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

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 = list(map(int,input().split()))
S = input()
S_list = list(S)
K -= 1
answer = ""
S_list[K] = S_list[K].swapcase()

for x in S_list:
    answer += x
print(answer)

Submission status: Accepted

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

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

ans = S[:K-1] + after + S[K:]
print(ans)

Submission status: Accepted

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

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:
a,b=map(int,input().split())
s=input()
inter = s[b-1]
inter_new = inter.lower()
res = ""
if b ==1:
  res = inter_new+s[1:len(s)]
elif b == a:
  res = s[0:len(s)-1]+inter_new
else:
  res = s[0:b-1]+inter_new+s[b:len(s)]
print(res)

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()
print(f"{s[:k-1]}{s[k-1].lower()}{s[k:]}")

Submission status: Accepted

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

Submission status: Accepted

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

if not ( 1 <= N <= 50 and 1 <= K <= N ): sys.exit()
if len(re.findall(r'[^(A|B|C)]',S)) != 0 : print("NG");sys.exit()

res = []
for I in range(len(list(S))):
    res.append(S[I]) if I + 1 != K else res.append(S[I].lower())
print(''.join(res))

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=list(map(int,input().split()))
S=input()
sdic={"A":"a","B":"b","C":"c"}
print(S[:K-1]+sdic[S[K-1]]+S[K:])

Submission status: Accepted

Solution code:
(a,b)=list(map(int, input().split()))
s=input()
print(''.join([c if i!=b-1 else c.lower() for i,c in enumerate(s)]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n,k = map(int,input().split())
    s = list(input())
    s[k - 1] = chr(ord(s[k - 1]) + 32)
    t = ''
    for i in s:
        t = t + i
    print(t)
main()

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

Submission status: Accepted

Solution code:
import sys
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  #空白あり
def LS2(): return list(sys.stdin.readline().rstrip())  #空白なし

N,K = LI()
S = LS2()

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

print(''.join(S))

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

S[K - 1] = S[K - 1].lower()
print(''.join(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,input().split())
S=input()
s=list(S)
s[K-1]=s[K-1].lower()
a=''.join(s)
print(a)

Submission status: Accepted

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

first = s[:k-1]
mid = s[k-1].lower()
last = s[k:]

print( first + mid + last )

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N,K = map(int,input().split())
S = input()
s = list(S)
T = s[K-1]
T = T.lower()
s[K-1] = T
s = ''.join(s)
print(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:
data=input().split()
N=int(data[0])
K=int(data[1])
S=input()
s=list(S)
s[K-1]=S[K-1].lower()
print("".join(s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

def main():
    n, k = map(int, input().split())
    s = list(input())
    s[k-1] = s[k-1].lower()
    print(*s, sep='')
    
if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

kmj = chr(ord(S[K-1])+32)

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

print(T)

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="")

Submission status: Accepted

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

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

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

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

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

Submission status: Accepted

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

for i in range(len(S)):
    if i != K-1:
        print(S[i],end='')
    else:
        print(chr(ord(S[i])+32),end="")

Submission status: Accepted

Solution code:
N, K = [int(_) for _ in input().split()]
S = list(input())

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

Submission status: Accepted

Solution code:
N,K = (int(x) for x in 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())
s=input()
x=["a","b","c"]
y=[0]*n
for i in range(n):
  y[i]=s[i]
  if s[k-1]=="A":
    y[k-1]="a"
    
  elif s[k-1]=="B":
    y[k-1]="b"
    
  elif s[k-1]=="C":
    y[k-1]="c"
    

print("".join(y))

Submission status: Accepted

Solution code:
import sys
rr = lambda: sys.stdin.readline().rstrip()
rm = lambda: map(int, sys.stdin.buffer.readline().split())
a, b = rm()
s = rr()
print(s[:b-1] + s[b-1].lower() + s[b:])

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.buffer.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

a, b = rm()
s = rr()
print(s[:b-1] + s[b-1].lower() + s[b:])

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

main()

Submission status: Accepted

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

s = list(input())

s1 = s


s2= s1[K-1]

s3 = s2.lower()

s1[K-1] = s3

print('' .join(s1))

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
s=list(input())
wd=''
cnt=1
for i in s:
    if cnt==b:
        cnt+=1
        wd+=(i.lower())
    else:
        cnt+=1
        wd+=(i)
print(wd)

Submission status: Accepted

Solution code:
N=input("")
N=N.split(" ")
K=int(N[1])
N=N[0]
s=str(input(""))
print(s[0:K-1]+s[K-1].lower()+s[K:])

Submission status: Accepted

Solution code:
n, k = map(int, input().split())
s = input()
res = []
for i in s:
  res.append(i)
if res[k-1] == 'A':
  res[k-1] = 'a'
elif res[k-1] == 'B':
  res[k-1] = 'b'
else:
  res[k-1] = 'c'
print(*res, sep='')

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

if s[k-1].isupper():
    s[k-1] = s[k-1].lower()
else:
    s[k-1] = s[k-1].upper()

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

Submission status: Accepted

Solution code:
import sys
import heapq
import re
from itertools import permutations
from bisect import bisect_left, bisect_right
from collections import Counter, deque
from math import factorial, sqrt, ceil, gcd
from functools import lru_cache, reduce
from decimal import Decimal
from operator import mul

INF = 1 << 60
MOD = 1000000007
sys.setrecursionlimit(10 ** 7)


# UnionFind
class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

# ダイクストラ
def dijkstra_heap(s, edge, n):
    #始点sから各頂点への最短距離
    d = [10**20] * n
    used = [True] * n #True:未確定
    d[s] = 0
    used[s] = False
    edgelist = []
    for a,b in edge[s]:
        heapq.heappush(edgelist,a*(10**6)+b)
    while len(edgelist):
        minedge = heapq.heappop(edgelist)
        #まだ使われてない頂点の中から最小の距離のものを探す
        if not used[minedge%(10**6)]:
            continue
        v = minedge%(10**6)
        d[v] = minedge//(10**6)
        used[v] = False
        for e in edge[v]:
            if used[e[1]]:
                heapq.heappush(edgelist,(e[0]+d[v])*(10**6)+e[1])
    return d

# 素因数分解
def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])

    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])

    return arr

# 組合せnCr
def combinations_count(n, r):
    if n < r:
        return 0
    r = min(r, n - r)
    numer = reduce(mul, range(n, n - r, -1), 1)
    denom = reduce(mul, range(1, r + 1), 1)
    return numer // denom

# 2数の最小公倍数
def lcm(x, y):
    return (x * y) // gcd(x, y)

# リストの要素の最小公倍数
def lcm_list(numbers):
    return reduce(lcm, numbers, 1)

# リストの要素の最大公約数
def gcd_list(numbers):
    return reduce(gcd, numbers)

# 素数判定
def is_prime(n):
    if n <= 1:
        return False
    p = 2
    while True:
        if p ** 2 > n:
            break
        if n % p == 0:
            return False
        p += 1
    return True


# limit以下の素数を列挙
def eratosthenes(limit):
    A = [i for i in range(2, limit+1)]
    P = []

    while True:
        prime = min(A)
        
        if prime > sqrt(limit):
            break
            
        P.append(prime)
            
        i = 0
        while i < len(A):
            if A[i] % prime == 0:
                A.pop(i)
                continue
            i += 1
            
    for a in A:
        P.append(a)
            
    return P

# 同じものを含む順列
def permutation_with_duplicates(L):

    if L == []:
        return [[]]

    else:
        ret = []

        # set（集合）型で重複を削除、ソート
        S = sorted(set(L))

        for i in S:

            data = L[:]
            data.remove(i)

            for j in permutation_with_duplicates(data):
                ret.append([i] + j)

        return ret

def make_divisors(n):
    lower_divisors , upper_divisors = [], []
    i = 1
    while i*i <= n:
        if n % i == 0:
            lower_divisors.append(i)
            if i != n // i:
                upper_divisors.append(n//i)
        i += 1
    return lower_divisors + upper_divisors[::-1]

# ここから書き始める
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 = map(int, input().split())
s = input()
s_s = s[:k-1]
s_l = s[k-1].lower()
s_e = s[k:]
print(s_s+s_l+s_e)

Submission status: Accepted

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

before = s[0:k-1]
low = s[k-1]
low = low.lower()
after = s[k:]

print(before+low+after)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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=tuple(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 = 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 = map(int, input().split())
s = list(input())

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

print(''.join(s))

Submission status: Accepted

Solution code:
change_K = int(input().split(" ")[-1])
word_S = list(input())
S = list(word_S)
word1 = ""
for i in range(change_K - 1):
    word1 = word1 + S[i]
word2 = S[change_K - 1]
word3 = ""
count = 0
while True:
    try:
        word3 = word3 + S[change_K + count]
        count += 1
    except IndexError:
        break
word2 = word2.swapcase()
print(word1 + word2 + word3)

Submission status: Accepted

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

S = input()
ans = ""

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

print(ans)

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7) #再帰関数の上限,10**5以上の場合python
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right#2分探索
#bisect_left(l,x), bisect(l,x)#aはソート済みである必要あり。aの中からx未満の要素数を返す。rightだと以下
from collections import deque
#deque(l), pop(), append(x), popleft(), appendleft(x)
#q.rotate(n)で → にn回ローテート
from collections import Counter#文字列を個数カウント辞書に、
#S=Counter(l),S.most_common(x),S.keys(),S.values(),S.items()
from itertools import accumulate,combinations,permutations#累積和
#list(accumulate(l))
from heapq import heapify,heappop,heappush
#heapify(q),heappush(q,a),heappop(q) #q=heapify(q)としないこと、返り値はNone
#import fractions#古いatcoderコンテストの場合GCDなどはここからimportする
from functools import lru_cache#pypyでもうごく
#@lru_cache(maxsize = None)#maxsizeは保存するデータ数の最大値、2**nが最も高効率
from decimal import Decimal

def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def main():
    mod = 1000000007
    #w.sort(key=itemgetter(1),reversed=True)  #二個目の要素で降順並び替え

    #N = int(input())
    N, K = map(int, input().split())
    #A = tuple(map(int, input().split())) #1行ベクトル
    #L = tuple(int(input()) for i in range(N)) #改行ベクトル
    #S = tuple(tuple(map(int, input().split())) for i in range(N)) #改行行列

    s=list(input())
    s[K-1]=s[K-1].lower()
    print(*s,sep="")





if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
k,s=open(0)
k=int(k[2:])
print(s[:k-1]+s[k-1].lower()+s[k:])

Submission status: Accepted

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

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

Submission status: Accepted

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

if s[k-1]=="A":
    s[k-1]=s[k-1].lower()
elif s[k-1]=="B":
    s[k-1]=s[k-1].lower()
elif s[k-1]=="C":
    s[k-1]=s[k-1].lower()

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

Submission status: Accepted

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

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

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

print(*s, sep='')

Submission status: Accepted

Solution code:
n,k = map(int,input().split())
s = input()
k -= 1
ans = ''
for i in range(n):
    if i == k:
      if s[k] == 'A': ans += 'a'
      elif s[k] == 'B': ans += 'b'
      else: ans += 'c'
    else: ans += s[i]
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"
else:
  S[k-1]="c"
for i in range(n):
  print(S[i],end='')

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

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

print("".join(S), end='')

Submission status: Accepted

Solution code:
n, k = [int(v) for v in input().split()]
s = list(input())
print('{}{}{}'.format(''.join(s[:k-1]), s[k-1].lower(), ''.join(s[k:])))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)

#a = int(input())
#b = list(map(int, input().split()))
n, k = map(int, input().split())
s = input()
#s,t = input().split()
#a = [int(input()) for _ in range(n)]
#
#readline = sys.stdin.readline
#n,m = [int(i) for i in readline().split()]
#ab = [[int(i) for i in readline().split()] for _ in range(n)]

s = [ch for ch in s]
s[k-1] = s[k-1].lower()
s = ''.join(s)

print(s)

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

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())
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,sep="")

Submission status: Accepted

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

Submission status: Accepted

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

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

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

N, K = MI()
S = input()
T = S.lower()
S = list(S)
T = list(T)

S[K - 1] = T[K - 1]

print("".join(map(str, S)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, os, math, bisect, itertools, collections, heapq, queue
# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
from decimal import Decimal
from collections import defaultdict

# import fractions

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)
# lcm = lambda x, y: (x * y) // fractions.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N, K = il()
    S = iss()
    ret = ""
    for n in range(N):
        if n + 1 == K:
            ret += str(S[n]).lower()
        else:
            ret += S[n]
    print(ret)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

s = list(input())

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

print(a)

Submission status: Accepted

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

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