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: Runtime Error

Solution code:
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using P = pair<ll, ll>;
using Pld = pair<ld, ld>;
using Vec = vector<ll>;
using VecP = vector<P>;
using VecB = vector<bool>;
using VecC = vector<char>;
using VecD = vector<ld>;
using VecS = vector<string>;
using Graph = vector<VecP>;
#define REP(i, m, n) for(ll (i) = (m); (i) < (n); ++(i))
#define REPR(i, m, n) for(ll (i) = (m); (i) > (n); --(i))
#define rep(i, n) REP(i, 0, n)
#define R cin>>
#define i64 unsigned long long
#define repr(i, n) REPR(i, n, 0)
#define all(s) (s).begin(), (s).end()
#define pb push_back
#define mp make_pair
#define fs first
#define sc second
#define in(a) insert(a)
#define P(p) cout<<(p)<<endl;
#define ALL(x) (x).begin(),(x).end()
#define ALLR(x) (x).rbegin(),(x).rend()
#define SORT(a) sort((a).begin(), (a).end())
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<long long int> vll;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;
typedef pair<ll, ll> pll;
void sonic(){ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);}
void setp(const ll n){cout << fixed << setprecision(n);}
const ll INF = 1e9+1;
const ll LINF = 1e18+1;
const ll mod = 1e9+7;
//const ll MOD = 998244353;
const ld PI = acos(-1);
const ld EPS = 1e-11;
template<class T>bool chmax(T &a,const T &b){if(a<b){a=b;return true;}return false;}
template<class T>bool chmin(T &a,const T &b){if(a>b){a=b;return true;}return false;}
template<typename T> void co(T e){cout << e << "\n";}
template<typename T> void co(const vector<T>& v){for(const auto& e : v)
    { cout << e << " "; } cout << "\n";}
ll gcd(ll a, ll b) {
    if (a < b)swap(a, b);
    if (b == 0) return a;
    unsigned r;
    while ((r = a % b)) {
        a = b;
        b = r;
    }
    return b;
}
ll lcm(ll a, ll b) {
    ll g = gcd(a, b);
    return a * b / g;
}
bool prime(ll n) {
    for (ll i = 2; i <= sqrt(n); i++) {
        if (n%i == 0)return false;
    }
    return n != 1;
}


int pow(ll x, ll y, ll mod){
    ll ret=1;
    for(;y;y>>=1,x=1ll*x*x%mod){
        if(y&1) ret=1ll*ret*x%mod;
    }
    return ret;
}
void kill()
{
    cout << "No" << endl;
    exit(0);
}

int main() {
    sonic();
    int n, k;
    string s;
    R n >> k >> s;
    s[k-1]=char(s[k-1]+32);
    co(s);
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

S = list(input())

S[K] = chr(ord(S[K])+32)

print(''.join(S))

Submission status: Runtime Error

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

S = list(input())

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

print(''.join(S))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
input = sys.stdin.readline
N,K=list(map(int,input().split()))
S = list(input().rstrip())
S[K]=S[K].lower()
print("".join(S))

Submission status: Runtime Error

Solution code:
import sys

sys.setrecursionlimit(1000000)

num_node = int(input())
relation = [[[], []] for i in range(num_node + 1)]
for i in range(num_node - 1):
    u, v, w = map(int, input().split())
    if w % 2 == 0:
        relation[u][0].append(v)
        relation[v][0].append(u)
    else:
        relation[u][1].append(v)
        relation[v][1].append(u)
colors = [None] * (num_node + 1)


def dfs(n: int):
    if n == 1:
        colors[n] = 0
    print(colors)
    # 偶数
    for even_idx in relation[n][0]:
        if colors[even_idx] is not None:
            continue
        else:
            colors[even_idx] = colors[n]
            dfs(even_idx)
    # 奇数
    for odd_idx in relation[n][1]:
        if colors[odd_idx] is not None:
            continue
        else:
            colors[odd_idx] = not colors[n]
            dfs(odd_idx)


if __name__ == '__main__':
    dfs(1)
    for ans in list(map(int, colors[1:])):
        print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

s = list(input())

s1 = s


s2= s1[K]

s3 = s2.lower()

s1[K] = s3

print('' .join(s1))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
word_S = input().split(" ")[-1]
S = list(word_S)
change_K = int(input())
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: Runtime Error

Solution code:
n,k = input().sprit()
s = input()
print(s)

Submission status: Runtime Error

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: Runtime Error

Solution code:
b=int(input())
c=input()
c=c.replace(c[b-1],c[b-1].lower())
print(c)

Submission status: Runtime Error

Solution code:
c=c.replace(c[b-1],c[b-1].upper())

Submission status: Runtime Error

Solution code:
a=int(input())
b=int(input())
c=input()
c=c.replace(c[b-1],c[b-1].lower())
print(c)

Submission status: Runtime Error

Solution code:
S = int(input())
a = S % 100
b = (S- (S % 100))/100
if   b <= 12 and  a<=12 and a!=0 and b!= 0:
       print("AMBIGUOUS")
elif b <= 12 and a!=0 :
       print("MMYY")
elif a<=12 and a!=0  :
       print("YYMM")
else :
      print("NA")

Submission status: Runtime Error

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

Submission status: Runtime Error

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)
 
127
a,b = map(int, input().split(" "))
if a >= 13 :
  print(b)
elif a >= 6 :
  print(b//2)
else:
  print(0)

Submission status: Runtime Error

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: Runtime Error

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

Submission status: Runtime Error

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

s = list(input())

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

print(a)

Submission status: Runtime Error

Solution code:
1 3
DFH

Submission status: Runtime Error

Solution code:
int main(){
int a,b;scanf("%d%d",&a,&b);
scanf("%s",in);
in[b-1]+=32;
printf("%s\n",in);

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
4 3
CABA

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
try:
    s1=(input(''))
    if len(s1)==4:
        check=list((s1))
    assert bool(int(check[0]+check[1])<=12) != bool(int(check[2]+check[3])<=12)
    if int(check[0]+check[1])<=12:
        print("MMYY")
    elif int(check[2]+check[3])<=12:
        print("YYMM")
except AssertionError:
    if int(check[0]+check[1])<=12 and int(check[2]+check[3])<=12:
        print("AMBIGUOUS")
    else:
        print("NA")

Submission status: Runtime Error

Solution code:
try:
    s1=(input(''))
    if len(s1)==4:
        check=list((s1))
    assert bool(int(check[0]+check[1])<=12) != bool(int(check[2]+check[3])<=12)
    if int(check[0]+check[1])<=12:
        print("MMYY")
    elif int(check[2]+check[3])<=12:
        print("YYMM")
except AssertionError:
    if int(check[0]+check[1])<=12 and int(check[2]+check[3])<=12:
        print("AMBIGUOUS")
    else:
        print("NA")

Submission status: Runtime Error

Solution code:
n,k=map(int, input("").split(' '))
s=input('')
if len(s)=n:
  slist=lis((s))
  swapcase(slist[k-1])
 
for i in range(0,len(slist)-1):
  print(slist[i], end=' ')

Submission status: Runtime Error

Solution code:
dict={'A':'a','B':'b','C':'c'}
s=input('S: ')
k=input('K: ')
ans=''
for i in range(len(s)):
  if i+1==K:
    ans+=dict[i]
  else:
    ans+=s[i]
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input('Enter nth value : '))
K = int(input('Enter kth value : '))
S = input('Enter string value : ')

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

Submission status: Runtime Error

Solution code:
print("STRING S")
a=int(input("enter the nth value:"))
b=int(input("enter the kth value:"))
if a==1:
  print("A")
elif a==2:
  print("B")
else:
  print("C")
if b==1:
  print("a")
elif b==2:
  print("b")
else:
  print("c")

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <string>
using namespace std;

int main() {
	// your code goes here
	int N, K;
	string S;
	cin >> N >> K >> S;
	if(S[K-1]=='A'){
		S[K-1]='a';
		cout<<S;
	} else if(S[K-1]=='B'){
		S[K-1]='b';
		cout<<S;
	}
	else if(S[K-1]=='C'){
		S[K-1]='c';
		cout<<S;
	}
	return 0;
}

Submission status: Runtime Error

Solution code:
print("String S")
a=int(input("enter the nth value:"))
b=int(input("enter the kth value:"))
if b=1:
  print("a")
elif b=2:
  print("b")
else:
  print("c")
if a=1:
  print("A")
elif a=2:
  print("B")
else:
  print("C")

Submission status: Runtime Error

Solution code:
char in[55];
int main(){
int a,b;scanf("%d%d",&a,&b);
scanf("%s",in);
in[b-1]+=32;
printf("%s\n",in);

Submission status: Runtime Error

Solution code:
nk = input().split()
s = input().split()
s[int(nk[1])-1] = s[int(nk[1])-1].lower()

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=str(input('Enter the string: ')
k=int(input('Enter an integer: ')
dict={'A':'a','B':'b','C':'c'}
ans=''
for i in range(len(s)):
      if(i+1==k):
      		ans+=dict[s[i]]
      else:
      		ans+=s[i]
print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
k = int(input())
s = input()
result = ''
for i in range(n):
    if i == k-1:
        result += chr(ord(s[i]) + 32)
    else:
        result += s[i]
print(result)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
a=sys.stdin.readline()
res = [int(i) for i in a.split() if i.isdigit()] 
N,K = [res[i] for i in (0,1)]
S=sys.stdin.readline(3)
K-=1
if N<0 or N>50:
  print("Error")
else:
  x=S[:K]
  y=S[K].lower()
  z=S[K+1:]
  print(x+y+z)

Submission status: Runtime Error

Solution code:
S=input("Enter String: ")
N=len(S)
B=int(input("Enter K: "))
K=B-1
if N<0 or N>50:
  print("Error")
else:
  A=S[:K]+S[K].lower()+S[K+1:]
  print(A)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

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

Submission status: Runtime Error

Solution code:
str1 = input("Please Enter your Own String : ")
ch = input("Please Enter your Own Character : ")
newch = input("Please Enter the New Character : ")

str2 = ''
for i in range(len(str1)):
    if(str1[i] == ch):
        str2 = str2 + newch
    else:
        str2 = str2 + str1[i]

print("\nOriginal String :  ", str1)
print("Modified String :  ", str2)

Submission status: Runtime Error

Solution code:
a=list(input())
a.remove(" ")
n=int(a[0])
k=int(a[1])

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

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

Submission status: Runtime Error

Solution code:
# Python program to Replace Characters in a String
 
str1 = input("Please Enter your Own String : ")
ch = input("Please Enter your Own Character : ")
newch = input("Please Enter the New Character : ")

str2 = str1.replace(ch, newch)

print("\nOriginal String :  ", str1)
print("Modified String :  ", str2)

Submission status: Runtime Error

Solution code:
# Python program to Replace Characters in a String
 
str1 = input("Please Enter your Own String : ")
ch = input("Please Enter your Own Character : ")
newch = input("Please Enter the New Character : ")

str2 = str1.replace(ch, newch)

print("\nOriginal String :  ", str1)
print("Modified String :  ", str2)

Submission status: Runtime Error

Solution code:
total, index = map(int, input().split())
string = list(map(str, input().split()))
string[index-1] = string[index-1].lower()
print(string)

Submission status: Runtime Error

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

print(S1)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = input()
a = int(n[0:2])
b = int(n[2:])
if 1 <= a <= 12 and 1 <= b <= 12:
	print('AMBIGUOUS')
elif 1 <= a <= 12 and b > 12:
	print('MMYY')
elif 1 <= b <= 12 and a > 12:
	print('YYMM')
else:
print('NA')

Submission status: Runtime Error

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

print(s)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,k=input().split()
k=int(k)
x=n.replace(n[k-1],n[k-1].upper())
print(x)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

print(s_new)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,m=map(int,input().split())
S=input()
if S[m]=="A":S[m]="a"
elif S[m]=="B":S[m]="b"
else:S[m]="c"
print(S)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

print(S)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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

print("".join(S)

Submission status: Runtime Error

Solution code:
f

Submission status: Runtime Error

Solution code:
N = int(input())

u_list = []
v_list = []
w_list = []

for _ in range(N-1):
  u, v, w = map(int, input().split())
  u_list.append(u-1)
  v_list.append(v-1)
  w_list.append(w)
  
color_dict = dict()
uvw_list = list(zip(u_list, v_list, w_list))
color_dict[u_list[0]] = 1

def eval_single(u, v, w, color_dict):
  skip = True

  if u in color_dict:
    color_dict[v] = assign_color(color_dict[u], w)
    skip = False
    
  if v in color_dict:
    color_dict[u] = assign_color(color_dict[v], w)
    skip = False
    
  return skip, color_dict
  

def assign_color(color, w):
  if w%2==0:
    return color
  else:
    return color*(-1)+1
  
while True:
  ind_list = []
  for ind, (u, v, w) in enumerate(uvw_list):
    skip, color_dict = eval_single(u, v, w, color_dict)
    
    if skip:
      ind_list.append(ind)

  uvw_list = [uvw_list[ind] for ind in ind_list]
  
  if len(color_dict) == N:
    break

for i in range(N):
  print(color_dict[i])

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

def main():
    _, K = map(int, input().split(' '))
    S = input()

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

    print(S)


if __name__ == '__main__':
    main()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

S = ord(s[k+1])
C =  chr(int(S)+26)

print(C)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
num_str = input().split(" ")
S = input()

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

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

Submission status: Runtime Error

Solution code:
num_str = input()
num_str = num_str.split("")

Submission status: Runtime Error

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

S = input()

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

Submission status: Runtime Error

Solution code:
N = int(input())
K = int(input())
S = input()

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

Submission status: Runtime Error

Solution code:
s = input()
YYMM, MMYY, ova = False, False, False

if(1 <= int(s[:2]) <= 12):
    MMYY = True
if(1 <= int(s[3:]) <= 12):
    YYMM = True

if(MMYY and YYMM):
    ova = True

if(ova):
    print('AMBIGUOUS')
elif(MMYY):
    print("MMYY")
elif(YYMM):
    print('YYMM')
else:
    print('NA')

Submission status: Runtime Error

Solution code:
n,k=[int(i)for i in input().split()]
s=str(input())
S=list(s)
S[k-1]=S[k-1].lower
A=''.join(S)
print(A)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n,k=[int(i)for i in input().split()]
s=str(input())
print(s.replace(s[k],s[k].lower))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
s = input()
tmp = ord(s[k])
tmp1 = (chr(tmp+32))
ans = []

for i in range(len(s)):
    if i == k:
        ans.append(tmp1)
    else:
        ans.append(s[i])

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
Big=["A","B","c"]
Small=["a","b","c"]

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

for i in range(3):
  if S[K]==Big[i]:
    S[K]=Small[i]

print("".join(S))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

S[K-1] = S[K-1].lower()
print(S[0],S[1],S[2], sep="")

Submission status: Runtime Error

Solution code:
class Edge():
	def __init__(self, v, w):
		self._v = v
		self._w = w
	def v(self):
		return self._v
	def w(self):
		return self._w

def dfs(v, g, colors, color = 0):
	colors[v] = color
	if not len(g[v]):
		return
	for nv in g[v]:
		if colors[nv.v()] != -1:
			continue
		nc = color if nv.w() % 2 == 0 else 1 - color
		dfs(nv.v(), g, colors, nc)

def resolve():
	n = int(input())
	colors = [-1]*n
	g = [list() for _ in range(n)]
	for _ in range(n-1):
		u, v, w = map(int, input().split())
		g[v-1].append(Edge(u-1, w))
		g[u-1].append(Edge(v-1, w))
	for i in range(n):
		if colors[i] != -1:
			continue
		dfs(i, g, colors)
	for c in colors:
		print(c)
resolve()

Submission status: Runtime Error

Solution code:
class Edge():
	def __init__(self, v, w):
		self._v = v
		self._w = w
	def v(self):
		return self._v
	def w(self):
		return self._w

def dfs(v, g, colors, color = 0):
	colors[v] = color
	if not len(g[v]):
		return
	for nv in g[v]:
		if colors[nv.v()] != -1:
			continue
		nc = color if nv.w() % 2 == 0 else 1 - color
		dfs(nv.v(), g, colors, nc)

def resolve():
	n = int(input())
	colors = [-1]*n
	g = [list() for _ in range(n)]
	for _ in range(n-1):
		u, v, w = map(int, input().split())
		g[v-1].append(Edge(u-1, w))
		g[u-1].append(Edge(v-1, w))
	dfs(0, g, colors)
	for c in colors:
		print(c)
resolve()

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,K = list(map(int, input().split()))
S = str(input())
s = [S[i] for i in range(len(S))]
s[K-1] = chr(ord(s[k-1])+32)
print(join(s))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x,y=map(int,input().split())
S=list(map(str,input()))
if S[y]=="A":
    for i in range(x):
        S[y]="a"
        print(S[i],end="")
elif S[y]=="B":
    for i in range(x):
        S[y]="b"
        print(S[i],end="")
elif S[y]=="C":
    for i in range(x):
        S[y]="c"
        print(S[i],end="")

Submission status: Runtime Error

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

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

print(S)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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