Problem:


Score : 100 points

Problem Statement

You are given a string S of length N consisting of A, B and C, and an integer K which is between 1 and N (inclusive).
Print the string S after lowercasing the K-th character in it.

Constraints

1 ≤ N ≤ 50

1 ≤ K ≤ N

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

Input

Input is given from Standard Input in the following format:

N K
S

Output

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

Sample Input 1

3 1
ABC

Sample Output 1

aBC

Sample Input 2

4 3
CABA

Sample Output 2

CAbA



Sample input:
3 1
ABC


Sample output:
aBC

Submission status: Wrong Answer

Solution code:
n,k=map(int, 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:]
else:
  s=s[:k-1]+'c'+s[k:]
print(s)

Submission status: Wrong Answer

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

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

print(s)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
len_str, target_index = map(int, input().split())
word = input()

new = word.replace(word[target_index - 1], word[target_index - 1].lower(), 1)
print(new)

Submission status: Wrong Answer

Solution code:
def str_replace_to_lower() -> str:
    len_str, target_index = map(int, input().split())
    word = input()

    new = word.replace(word[target_index - 1], word[target_index - 1].lower(), 1)
    return new


print(str_replace_to_lower())

Submission status: Wrong Answer

Solution code:
def str_replace_to_lower() -> str:
    len_str, target_index = map(int, input().split())
    word = input()

    new = word.replace(word[target_index - 1], word[target_index - 1].lower())
    return new


print(str_replace_to_lower())

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:

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

Submission status: Wrong Answer

Solution code:
s = input()
if s == '0000' or (int(s[:2]) >= 13 and int(s[-2:]) >= 13):
    print('NA')
elif 1 <= int(s[:2]) <= 12 and 1 <= int(s[-2:]) <= 12:
    print('AMBIGUOUS')
elif 1 <= int(s[:2]) <= 12:
    print('MMYY')
elif 1 <= int(s[-2:]) <= 12:
    print('YYMM')

Submission status: Wrong Answer

Solution code:
N, K = map(int, input().split())
S = input()
ans = ''
for i in range(N):
    if i == K:
        if S[i] == 'A':
            ans += 'a'
        elif S[i] == 'B':
            ans += 'b'
        else:
            ans += 'c'
    else:
        ans += S[i]
print(ans)

Submission status: Wrong Answer

Solution code:
a,b=input().split()
a=int(a)
b=int(b)
c=input()
h,i,j=c[:(a-2)],c[a-2],c[a-1:]
if i=="A":
  i="a"
if i=="B":
  i="b"
if i=="C":
  i="c"
print(h+i+j)

Submission status: Wrong Answer

Solution code:
a,b=input().split()
a=int(a)
b=int(b)
c=input()
h,i,j=c[:(a-2)],c[a-2],c[a-1:]
if i=="A":
  i="a"
if i=="B":
  i=="b"
if i=="C":
  i=="c"
print(h+i+j)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print("".join(S))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
t = input()
print(t.replace(t[b-1], t[b-1].upper()))

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
t = input()
print(t.replace(t[a-1], t[a-1].upper()))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
s=input()
a=int(s[0:2])
b=int(s[2:4])
if 0<a<13:
  if 0<b<13:
    print('AMBIGUOUS')
  else:
    print('MMYY')
else:
  if 0<b<13:
    print('YYMM')
  else:
    print('NA')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

n,k=(int(x) for x in input().split())
s=list(input())
for i in range(n):
    if i==k:
        s[i]=s[i].lower()
str_s="".join(s)
print(str_s)

Submission status: Wrong Answer

Solution code:
S = input()
l, r = int(S[:2]), int(S[2:])
if 0<l<13 and 0<r<13:
    print("AMBIGUOUS")
elif 0<l<13:
    print("MMYY")
elif 0<r<13:
    print("YYMM")
else:
    print("NA")

Submission status: Wrong Answer

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

print(S)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
z=(input().split())
a=int(z[0])
b=int(z[1])
c=input()
if len(c)>=1 and len(c)<=50 and b>=1 and b<=len(c):
	c=c.replace(c[b-1],c[b-1].lower())
	print(c)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N = 7
K = 4
S = 'ABACBAC'

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

Submission status: Wrong Answer

Solution code:
nk = input().split()
index = int(nk[1]) -1
print(index)
s = input()
c = 0
for i in s:
  if c == index: print(i.lower(),end="")
  else: print(i,end="")
  c+= 1

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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-1]=s[k-1].lower()
print(str.join(s))
#print(str)
#print(s)

Submission status: Wrong Answer

Solution code:
X = input()
L = []
for i in X:
    if i != ' ':
        L.append(i)

def change(K,L,S):
    if L[K-1] == 'A':
        L[K-1] = 'a'
    elif L[K-1] == 'B':
        L[K-1] = 'b'
    elif L[K-1] == 'C':
        L[K-1] ='c'
    for i in L:
        S += i
    print(S)
        
N = int(L[0])
K = int(L[1])
S = input()
L = list(S)
S = ''
change(K,L,S)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
a, b = map(int, input().split())
c = input()

print(c.replace(c[b-1],c[b-1].lower()))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

def count(k,i):
    cnt=0
    while k>i:
        i**=2
        cnt+=1
    return cnt

p=0
for i in range(1,n+1):
    p+=((1/2)**(count(k,i)))
print(p/n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

target = s[k - 1]

lower = chr(ord(target) + 32) # target.lower()

result = s.replace(target, lower)

print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,k = map(int,input().split())
s = input()
kb = ''
if k >= 2:
  kb = s[:k-2]
kk = s[k-1]
ka = ''
if k < len(s):
  ka = s[k:]

if kk == 'A':
  print(kb + 'a' + ka)
  exit()
if kk == 'B':
  print(kb + 'b' + ka)
  exit()
if kk == 'C':
  print(kb + 'c' + ka)
  exit()

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


if K == 1:
  s = S[0].lower() + S[1:]
elif K == N:
  s = S[:-1] + S[-1].lower()
else:
  s = S[:K-2] + S[K-1].lower() + S[K:]

print(s)

Submission status: Wrong Answer

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

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

print(s)

Submission status: Wrong Answer

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

T = [s for s in S]
print(T)
T[K - 1] = T[K - 1].lower()
print("".join(T))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
S = "" 
for i in range(17): 
    S += "ABC"

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

S = S[:N]

if (k-1)%3 == 0:
    S = S[:k-1] + 'a' + S[k:]
if (k-1)%3 == 1:
    S = S[:k-1] + 'b' + S[k:]
if (k-1)%3 == 2:
    S = S[:k-1] + 'c' + S[k:]

print(S)

Submission status: Wrong Answer

Solution code:
import re
a = input()
b = input()
c = re.search('(\d+)\s(\d+)', a)
d = int(c.group(1))
e = int(c.group(2))
result = ''
for n in range(d):
    if n == d - 1:
        r = str(b[n]).lower()
        result += r
    else:
        result += b[n]
print(result)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

t=str.lower(s[m-1])

print(s.replace(s[m-1],t))

Submission status: Wrong Answer

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

t=str.lower(s[-(m-1)])

print(s.replace(s[-(m-1)],t))

Submission status: Wrong Answer

Solution code:
N,K = map(int,input().split())
S = input()
result = ""
for char in S:
    result += char
    if len(result) == K:
        low = char.lower()
        result += low
print(result[1:])

Submission status: Wrong Answer

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

ans = ""

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

print(ans)

Submission status: Wrong Answer

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

S = list(input())

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

Submission status: Wrong Answer

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


print(sum([(1/N)*(0.5)**math.ceil(math.log2(math.ceil(K/i))) if i<K else 1/N for i in range(1,N+1)]))

Submission status: Wrong Answer

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

K -= 1

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = list('ABC')
n = 3
k = 1
if s[k-1] == 'A':
    s[k-1] = 'a'
elif s[k-1] == 'B':
    s[k-1] = 'b'
else:
    s[k-1] = 'c'
"".join(s)

Submission status: Wrong Answer

Solution code:
s = list('ABC')
n = 3
k = 1
if s[k-1] == 'A':
    s[k-1] = 'a'
elif s[k-1] == 'B':
    s[k-1] = 'b'
else:
    s[k-1] = 'c'
print (s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:

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

char_k = S[k-1]

S_ch = S.replace(S[k-1], str.lower(char_k))
print(S_ch)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

N = int(num_str[0])
K = int(num_str[1])
s = list(S)

if s[K-1] == "A":
  s[K-1] = "a"
elif s[K-1] == "B":
  s[K-1] = "b"
elif s[K-1] == "C":
  s[K-1] = "c"

"".join(s)
print(s)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
num = input()
S = input()

Submission status: Wrong Answer

Solution code:

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

Submission status: Wrong Answer

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

if 2<=k<n:
  print(s[:k-1] + chr(ord(s[k-1])+32) + s[:n])
elif k==1:
  print(chr(ord(s[0])+32) + s[1:n])
else:
  print(s[:n-1] + chr(ord(s[n-1])+32))

Submission status: Wrong Answer

Solution code:
n,k=map(int,input().split())
s=input()
t="D"
for i in range(0,n):
  if k==1 and i==0:
    if s[k-1]=="A":
      t="a"
    if s[k-1]=="B":
      t="b"
    if s[k-1]=="C":
      t="c"
    moji = t
    continue
  elif i==k-1:
    if s[k-1]=="A":
      t="a"
    if s[k-1]=="B":
      t="b"
    if s[k-1]=="C":
      t="c"
    moji += t
  elif i==0:
    moji=s[0]
    continue
  moji += s[i]
  
print(moji)

Submission status: Wrong Answer

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

s[k-1].lower()

print(s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

ANS = 0


for i in range(1,N+1):
    if i < K:
        ANS += (1/N) * (0.5**(int(math.log(int(K/i),2)+1)))
    else:
        ANS += (1/N)*(N-K+1)
        break
    print(int(math.log((K/i),2)+1)+1)

print(ANS)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N=list(input())
MM=["01","02","03","04","05","06","07","08","09","10","11","12"]
YY=["00","01","02","03","04","05","06","07","08","09"]

for i in range(10,100):

        YY.append(str(i))

if str(N[0])+str(N[1]) in YY and str(N[0])+str(N[1]) in MM and str(N[2])+str(N[3]) in YY and str(N[2])+str(N[3]) in MM:
    print("AMBIGUOUS")

elif str(N[0])+str(N[1]) in MM and str(N[2])+str(N[3]) in YY:
    print("MMYY")

elif str(N[0])+str(N[1]) in YY and str(N[2])+str(N[3]) in MM:
    print("YYMM")

else:
    print("NA")

Submission status: Wrong Answer

Solution code:
n,K = map(int,input().split())
p = min(n,K-1)
ans = 0
chk = [1]*(K-1)
k = K
for i in range(14):
  k /= 2
  for i in range(int(k*2-k-0.000000000000000001)):
    chk[i] += 1
  if k <= 1:
    break
    
#print(chk)
for i in range(p):
  ans += float(1/(2**chk[i]*n))
  #print(ans)
ans += max(0,(n-K+1)/n)
print(ans)

Submission status: Wrong Answer

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

def check_xor(m):
    c = 0
    for x in range(2**m):
        if x ^ x == k:
            c += 1
        else:
            break
            
    if c == 2**m:
        return True
    
    else:
        return False

if check_xor(m) and k<2**m:
    L = ''.join([str(i)*2 for i in range(2**m)])
    print(' '.join(L))
else:
    print('-1')

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(S)

Submission status: Wrong Answer

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

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

ans=s.replace(a,x)
print(ans)

Submission status: Wrong Answer

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-1]==Big[i]:
    S[K-1]=Small[i]

print("".join(S))

Submission status: Wrong Answer

Solution code:
N,K=map(int,input().split())
ans=0
a=[]
number=0

def maxcount(n,k):
    if n>=K:
        return k
    else:
        k+=1
        return maxcount(2*n,k)

for i in range(1,N+1):
    if N<K:
        ans+=(1/N)*((1/2)**maxcount(i,0))
    else:
        ans+=1/N
print(ans)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

Solution code:
S=input()
F=int(S[:2])
L=int(S[2:])

if 0<F<=12:
    if 0<L<=12:
        print('AMBIGUOUS')
    else:
        print('MMYY')
elif 0<L<=12:
    print('YYMM')
else:
    print('NA')

Submission status: Wrong Answer

Solution code:
s=input()
f=int(s[:2])
b=int(s[2:4])

if f>=1 and f<=12:
    if b>=1 and b<=12:
        print('AMBIGUOUS')
    else:
        print('MMYY')

else:
    if b>=1 and b<=12:
        print('YYMM')
    else:
        print('NA')

Submission status: Wrong Answer

Solution code:
s=input()
f=int(s[:2])
b=int(s[2:4])

if (f>=13 or f==00)and b>=13 :
    print('NA')
elif (f>=13 or f==00)and b<=12 :
    print('YYMM')
elif f<=12 and (b>=13 or b==00) :
    print('MMYY')
else:
    print('AMBIGUOUS')

Submission status: Wrong Answer

Solution code:
s=input()
f=int(s[:2])
b=int(s[2:4])

if (b>=13 or b==00)and f>=13 :
    print('NA')
elif (b>=13 or b==00)and f<=12 :
    print('MMYY')
elif b<=12 and (f>=13 or f==00) :
    print('YYMM')
else:
    print('AMBIGUOUS')

Submission status: Wrong Answer

Solution code:
s=input()
f=int(s[:2])
b=int(s[2:4])

if (b>=13 or b==0)and f>=13 :
    print('NA')
elif (b>=13 or b==0)and f<=12 :
    print('MMYY')
elif b<=12 and (f>=13 or f==0) :
    print('YYMM')
else:
    print('AMBIGUOUS')

Submission status: Wrong Answer

Solution code:
s=input()
f=int(s[:2])
b=int(s[2:4])

if (b>=13 or b==0)and f>=13 :
    print('NA')
elif (b>=13 or b==0)and f<=12 :
    print('MMYY')
elif b<=12 and (f>=13 or f==0) :
    print('YYMM')
else:
    print('AMBIGUOUS')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

else:
    print(s.replace(s[k -1] ,"c"))

Submission status: Wrong Answer

Solution code:
p,q = input().split()
q_ = int(q) -1 
n = input()
x = n.replace(n[q_], n[q_].lower(), 1)
print(x)

Submission status: Wrong Answer

Solution code:
p,q = input().split()
q_ = int(q) -1 
n = input()
print(n.replace(n[q_], n[q_].lower(), 1))

Submission status: Wrong Answer

Solution code:
p,q = input().split()
q_ = int(q) -1 
n = input()
n.replace(n[q_], n[q_].lower(), 1)

Submission status: Wrong Answer

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

ans = 0

if N >= K:
    ans += (N - K + 1) / N
    L = K-1
else:
    L = N


rate = 0
for i in range(1,L+1,1):
    score = i
    c = 0
    
    while score <= K:
        score = score * 2
        c += 1
    rate += ((1/2)** c)
    
    #print(ans)
ans += (1/N) * rate

print(ans)

Submission status: Wrong Answer

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

ans = 0

if N >= K:
    ans += (N - K + 1) / N
    L = K-1
else:
    L = N



for i in range(1,L+1,1):
    ans_i = 0
    score = i
    c = 0
    
    while score <= K:
        score = score * 2
        c += 1
    rate = (1 / N)*(1/2)** c
    ans += rate
    #print(ans)

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import itertools
import fractions
def main():
  n,k = map(int,input().split())
  s = input()
  s_ = s[k - 1]
  s_ = s_.lower()
  s = s.replace(s[k-1],s_)
  print(s)
if __name__ == '__main__':
  main()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N, K = map(int,input().split())
S = list(input())
X = list()
s = S[K-1].lower()
for item in S:
    item_mod = item.replace(S[K-1],s)
    X.append(item_mod)
print(''.join(X))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(S.replace(S_K,s_k,1))

Submission status: Wrong Answer

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

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

print(S.replace(S_K,s_k))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

main()

Submission status: Wrong Answer

Solution code:
m,k=map(int,input().split())
if k>=2**m:
    print(-1)
elif m==1:
    if k==0: print(0,0,1,1)
    else: print(-1)
else:
    tmp=k
    for i in range(1,2**m):
        tmp^=i
    ans=[i for i in range(2**m) if i!=k]+[k]+[i for i in range(2**m-1,-1,-1) if i!=k]+[k]
    print(*ans)

Submission status: Wrong Answer

Solution code:
num,loc = map(int,input().split())
dummy = ["" for i in range(num)]
moj = input()
count = 0
for j in moj:
  dummy[count] = j
  count = count + 1
S = dummy[loc-1]
W = S.swapcase()
dummy[loc-1] = W
print(dummy)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

L = [0]*N
num =1
for i in range(N):
    num = 1
    if i < K:
        while num*(i+1) < K:
            num *= 2
        L[i]= 1/N * 1/num
    else:
        L[i] = 1/N

ans = 0
for i in range(N):
        ans +=L[i]

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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