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=(int(x) for x in input().split())
S=input()
print(S.replace(S[K-1],S[K-1].lower()))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N, K = (int(i) for i in input().split())
S = list(input())
print(S)
K -= 1
x = S.pop(K)

if x == 'A':
  x = 'a'
elif x == 'B':
  x = 'b'
else:
  x = 'c'
S.insert(K, x)
ans = ''
for i in S:
  ans += i
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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


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

Submission status: Wrong Answer

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

res=''
for i in range(n):
	if i==k:
		res=res+s[i].lower()
	else:
		res=res+s[i]
print(res)

Submission status: Wrong Answer

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

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:
x,y = map(int,input().split())
z = input()
print(z.replace(z[y-1],z[y-1].lower()))

Submission status: Wrong Answer

Solution code:
s=input()
s1=int(s[0:2])
s2=int(s[2:4])

if 0<s1<13 and 0<s2<13:
    print("AMBIGUOUS")
elif 0<s1<13:
    print("MMYY")
elif 0<s2<13:
    print("YYMM")
else:
    print("NA")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
N, K = map(int, input().split())
S = input()
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()
ans = []
for i,char in enumerate(s):
    if i==k:
        char = char.lower()
    ans.append(char)

print("".join(ans))

Submission status: Wrong Answer

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

S = list(input())

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

S[K-1]=x_small
print(S)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

pi = 0
for i in range(1,n+1):
  need = math.ceil(math.log(k/i,2))  
  if need > 0:
    pi += (1/2) ** need
  else :
    pi +=1      
print(pi/n)

Submission status: Wrong Answer

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

s = list(input())

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

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

print()

Submission status: Wrong Answer

Solution code:
N,K = map(int,input().split())
S = list(input())
print(S[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(''.join(S))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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 (b ==00 or b>=13):
	print("MMYY")
elif (a == 00 or a>=13) and  1<=b<=12:
	print("YYMM")
else:
	print("NA")

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 (b ==0 or b>=13):
	print("MMYY")
elif (a == 0 or a>=13) and  1<=b<=12:
	print("YYMM")
else:
	print("NA")

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 (b ==0 or b>=13):
	print("MMYY")
elif (a == 0 and a>=13) and  1<=b<=12:
	print("YYMM")
else:
	print("NA")

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()
S=S.replace(S[K-1], chr(ord(S[K-1])+32))
print(S)

Submission status: Wrong Answer

Solution code:
A=input()
B=int(A[:2])
C=int(A[2:4])
if B<=12 and C<=12:
  print("AMBIGUOUS")
elif 12>=B>=1:
  print("YYMM")
elif 12>=C>=1:
  print("MMYY")
else:
  print("NA")

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

Submission status: Wrong Answer

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

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

print(A)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

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


abc()

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())
S = input()
S[b -1].lower()
print(S)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

S = list(input())

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

print(S)

Submission status: Wrong Answer

Solution code:
s = input()
a = int(s[:2]) > 13
b = int(s[2:]) > 13
if a and b:
  print("AMBIGUOUS")
if not a and not b:
  print("NA")
if not a and b:
  print("MMYY")
if a and not b:
  print("YYMM")

Submission status: Wrong Answer

Solution code:
# -*- Coding: utf-8 -*-
N,K = map(int,raw_input().split())
S = raw_input()

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

Submission status: Wrong Answer

Solution code:
# -*- Coding: utf-8 -*-
N,K = map(int,raw_input().split())
S = raw_input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

n, k = map(int, input().split())
s = input()
match = s[k-1]
if 'A' in match:
    char = 'a'
elif 'B' in match:
    char = 'b'
else:
    char = 'c'
ans = s.replace(match, char)
print(ans)

Submission status: Wrong Answer

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

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

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
N , K = map(int,input().split())
str_t = list(input())
ans =''
for i in range(len(str_t)):
    if i == K:
        ans += str_t[i].lower()
    else:
        ans += str_t[i].upper()
print(ans)

Submission status: Wrong Answer

Solution code:
import sys

def check_YYMMorMMYY(str_date):
    str1=str_date[:2]
    str2=str_date[2:]
    num1=int(str1)
    num2=int(str2)
    # if 1<=num1<=12 and 1<=num2<=12:                                                      
    #     print("AMBIGUOUS")                                                               
    # elif 13<=num1<=99 and 1<=num2<=12:                                                   
    #     print("YYMM")                                                                    
    # elif 1<=num1<=12 and 13<=num2<=99:                                                   
    #     print("MMYY")                                                                    
    # elif 13<=num1<=99 and 13<=num2<=99:                                                  
    #     print("NA")                                                                      
    # elif num1==0 or num2==0:                                                             
    #     print("NA")                                                                      
    if 1<=num1<=12:
        if 1<=num2<=12:
            print("AMBIGUOUS")
        else :
            print("MMYY")
    else:
        if 1<=num2<=12:
            print("YYMM")
        else:
            print("NA")

str_S=input()


if str_S.isdecimal()==0 or len(str_S)!=4 :
    print("Unexpected S")
    sys.exit()

check_YYMMorMMYY(str_S)

Submission status: Wrong Answer

Solution code:
li = input().split()
str = input()


for i in range(0,int(li[0])):
    if i==int(li[1]):
        print(str[i].lower(),end="")
    else:
        print(str[i],end="")

Submission status: Wrong Answer

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

s=list(input())

print(s[0:k-1],end='')
print(s[k-1].lower(),end='')
print(s[k:],end='')

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S=input()
if S[0:2]=="00" and int(S[2:4])>=13\
 or S[2:4]=="00" and int(S[0:2])>=13\
 or int(S[0:2])>=13 and int(S[2:4])>=13\
 or S[0:2]=="00" and S[2:4]=="00":
    print("NA")
elif int(S[0:2])>=13:
    print("YYMM")
elif int(S[2:4])>=13:
    print("MMYY")
else:
    print("AMBIGUOUS")

Submission status: Wrong Answer

Solution code:
N,K=map(int,input().split())
S=input()
S=[i for i in S]
for i,m in enumerate(S):
    if m=="A":
        S[i]="A"
    if m=="B":
        S[i]="B"
    if m=="C":
        S[i]="C"
#S="".join(S)
SS=""
for i in S:
    SS+=i
print(SS)

Submission status: Wrong Answer

Solution code:
a,b=input().split()
s=list(input())
li=[l.replace(s[int(b)-1],str.lower(s[int(b)-1])) for l in s]
for v in li:
  print(v, end="")

Submission status: Wrong Answer

Solution code:
a,b=input().split()
s=list(input())
print([l.replace(s[int(b)-1],str.lower(s[int(b)-1])) for l in s])

Submission status: Wrong Answer

Solution code:
a=input().split
s=input()
print(a)
print(s)

Submission status: Wrong Answer

Solution code:
k = int(input().split()[1])
s = input()
print(s[0:k]+s[k:k+1].lower()+s[k+1:len(s)+1])

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
A, B = (int(x) for x in input().split())
if A <= 5:
    print(0)
elif A <= 12:
    print(int(B / 2))
else:
    print(B)

Submission status: Wrong Answer

Solution code:
from math import log2

def calProb(dice, K):
    time = log2(K)
    prob = 0
    base = 1/dice
    count = 0
    for i in range(1,dice+1):
        temp = base
        now = i
        while now < K:
            now *= 2
            temp *= 0.5
        prob += temp
        count += 1
    return prob + ((count - i)/dice)


inputs = list(map(int,input().split(' ')))[:2]
dice = inputs[0]
K = inputs[1]
probabilty = calProb(dice, K)
print(probabilty)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
from math import log2

def prob(num, dice, K):
	times = int(log2(K/num) + 1)
	base  = 1.0/dice
	if times < 0:
		times = 0
	p = base * pow(0.5,times)
	return p

def sum_prob(dice, K):
	probabilty = 0
	for i in range(1,dice+1):
		probabilty += prob(i, dice, K)
	return probabilty


inputs = list(map(int,input().split(' ')))[:2]
dice = inputs[0]
K = inputs[1]
probabilty = sum_prob(dice, K)
print(probabilty)

Submission status: Wrong Answer

Solution code:
from math import log2

def prob(num, dice, K):
	times = int(log2(K/num) + 1)
	base  = 1/dice
	if times < 0:
		times = 0
	p = base * pow(0.5,times)
	return p

def sum_prob(dice, K):
	probabilty = 0
	for i in range(1,dice+1):
		probabilty += prob(i, dice, K)
	return probabilty


inputs = list(map(int,input().split(' ')))[:2]
dice = inputs[0]
K = inputs[1]
probabilty = sum_prob(dice, K)
print(probabilty)

Submission status: Wrong Answer

Solution code:
def checkMM(i):
    if i >= 1 and i <= 12:
        result = 1
    else:
        result = 0
    return result

def checkYY(i):
    if i >= 0 and i <= 99:
        result = 1
    else:
        result = 0
    return result


s = input()

s1 = int(s[:2])
s2 = int(s[2:])

result = 'NA'

if checkMM(s1) and checkYY(s2):
    result = 'MMYY'


if checkYY(s1) and checkMM(s2):
    if result == 'MMYY':
        result = 'AMBIGUOUS'
    else:
        result = 'YYMM'

print(result)

Submission status: Wrong Answer

Solution code:
S = input()
S1 = int(S[:2])
S2 = int(S[2:])

if (1 <= S1 <= 12) and (1 <= S2 <= 12):
	print('AMBIGUOUS')
elif (1 <= S1 <= 12):
	print('MMYY')
elif (1 <= S2 <= 12):
	print('YYMM')
else:
	print('NA')

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:
def get_s(w, e):
    s = w + 1
    if s == k:
        if e == "A":
            return "a"
        elif e == "B":
            return "b"
        else:
            return "c"
    else:
        return e


i = list(map(int, input().split()))

k = i[1]


a = list(input())


ab = 0

while ab < i[0]:

    a[ab] = get_s(ab, a[ab])
    ab += 1

print(i)
print(a)

Submission status: Wrong Answer

Solution code:
def get_s(w, e):
    s = w + 1
    if s == k:
        if e == "A":
            return "a"
        elif e == "B":
            return "b"
        else:
            return "c"
    else:
        return e


i = list(map(int, input().split()))

k = i[1]


a = list(input())


ab = 0

while ab < i[0]:

    a[ab] = get_s(ab, a[ab])
    ab += 1

print(i)
print(a)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

if 1 <= a <= 12 and 1 <= b <= 12:
    print("AMBIGUOUS")
elif (a == 0 or 12 < a < 100) and (b == 0 or 12 < b < 100):
    print("NA")
elif (a == 0 or 12 < a < 100) and 1 <= b <= 12:
    print("YYMM")
else:
    print("MMYY")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

print(a)

Submission status: Wrong Answer

Solution code:
N,K=map(int,input().split())
S=str(input())
def change(A):
  if S[A]=="A":
    sub="a"
  elif S[A]=="B":
    sub="b"
  else:
    sub="c"
  return sub

if K==1:
  print(change(0)+S[1:])
elif K==N:
  print(S[:N-2]+change(K-1))
else:
  print(S[:K-2]+change(K-1)+S[K:])

Submission status: Wrong Answer

Solution code:
inputS = input()
s = inputS

if int(s[-2:]) == 0 or int(s[:2]) == 0:
    print("NA")
elif int(s[-2:]) <= 12 and int(s[:2]) <= 12:
    print("AMBIGUOUS")
elif int(s[:2]) > 12 and int(s[-2:]) <= 12:
    print("YYMM")
elif int(s[:2]) <= 12 and int(s[-2:]) > 12:
    print("MMYY")
elif int(s[:2]) > 12 and int(s[-2:]) >12:
    print("NA")

Submission status: Wrong Answer

Solution code:
inputS = input()
s = inputS

if int(s[-2:]) == 0 or int(s[:2]) == 0:
    print("NA")
elif int(s[-2:]) <= 12 and int(s[:2]) <= 12:
    print("AMBIGUOUS")
elif int(s[:2]) > 12 and int(s[-2:]) <= 12:
    print("YYMM")
elif int(s[:2]) <= 12 and int(s[-2:]) > 12:
    print("MMYY")
else:
    print("NA")

Submission status: Wrong Answer

Solution code:
# coding: utf-8
# Your code here!
# coding: utf-8
# Your code here!
list=input().split(" ")
num1=int(list[0])
num2=int(list[1])

global count
global point
probability_i=[]

for i in range(1,num1+1):
    count=0
    point=i
    while i<num2:
        point+=point
        count+=1
        prob=i/3*(1/2)**count
        probability_i.append(prob)
global ans
ans=0
for j in probability_i:
    ans+=j
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,k=map(int,input().split())
s=input()
ans=""
for i in range(n):
  if k+1==i:
    ans+=str.lower(s[i])
  else:
    ans+=s[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].swapcase())

print(s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
'''
すぬけ君は 1 〜 N の整数が等確率で出る N 面サイコロと表と裏が等確率で出るコインを持っています。
すぬけ君は、このサイコロとコインを使って今から次のようなゲームをします。
まず、サイコロを 1 回振り、出た目を現在の得点とする。
得点が 1 以上 K−1 以下である限り、すぬけ君はコインを振り続ける。
表が出たら得点は 2 倍になり、裏が出たら得点は 0 になる。
得点が 0 になった、もしくは K 以上になった時点でゲームが終了する。

このとき、得点が K 以上である場合すぬけ君の勝ち、 0 である場合すぬけ君の負けである。

N と K が与えられるので、このゲームですぬけ君が勝つ確率を求めてください。

'''
import math

def main():
	'''
	メイン関数
	'''
	# N面サイコロ, 判定K
	N, K = map(int, input().split())

	# while
	sum  = 0
	for i in range(1,N+1):
		
		x = 0
		if i < K-1:
			while(i*2**x < K-1) :
				x = x + 1

		sum = sum + (1/N ) * (1/2) ** x  

	print(sum)

if __name__ == '__main__':
	main()

Submission status: Wrong Answer

Solution code:
s = input()
s1 = int(s[0:2])
s2 = int(s[2:])


if s1 >= 1 and s1 <= 12:
	if s2 >= 1 and s2 <= 12:
		print('AMBIGUOUS')
	else:
		print('MMYY')

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

Submission status: Wrong Answer

Solution code:
s = input()
s1 = int(s[0:2])
s2 = int(s[2:])


if s1 >= 1 and s1 <= 12:
	if s2 >= 1 and s2 <= 12:
		print('AMBIGIOUS')
	else:
		print('MMYY')

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#YYMM or MMYY or AMBIGUOUS or NA

inputLine = input()

firstPart = int(inputLine[0:2])
secondPart = int(inputLine[2:4])

#initialization
naFlag = False
firstPartYear = False
firstPartAmb = False
secondPartYear = False
secondPartAmb = False

# firstPartの属性判定
if firstPart < 0:
    naFlag = True

elif firstPart == 0:
    firstPartYear = True
    
elif firstPart < 13:
    firstPartAmb = True
    
else: 
    firstPartYear = True
    
# secondPartの属性判定
if secondPart < 0:
    naFlag = True

elif secondPart == 0:
    secondPartYear = True
    
elif secondPart < 13:
    secondPartAmb = True
    
else: 
    secondPartYear = True
    
if naFlag:
    print('NA')

elif secondPartYear:
    if firstPartYear:
        print('NA')
    elif firstPartAmb:
        print('MMYY')

elif secondPartAmb:
    if firstPartYear:
        print('YYMM')
    elif firstPartAmb:
        print('AMBIGUOUS')

Submission status: Wrong Answer

Solution code:
import sys

s = input()

former = int(s[:2])
latter = int(s[2:])

##YYMM
if ((former > 12) and (latter <= 12 and latter > 0)):
    print('YYMM')
    sys.exit()

##MMYY
if ((former <= 12 and former > 0) and (latter > 12)):
    print('MMYY')
    sys.exit()

##AMBIGUOUS
if ((former <= 12 and former > 0) and (latter <= 12 and latter > 0)):
    print('AMBIGUOUS')
    sys.exit()

##NA
print('NA')

Submission status: Wrong Answer

Solution code:
import sys

s = input()

former = int(s[:2])
latter = int(s[2:])

##YYMM
if ((former > 12) and (latter <= 12 and latter > 0)):
    print('YYMM')
    sys.exit()

##MMYY
if ((former <= 12 and former > 0) and (latter > 12)):
    print('MMYY')
    sys.exit()

##AMBIGUOUS
if ((former <= 12) and (latter <= 12)):
    print('AMBIGUOUS')
    sys.exit()

##NA
print('NA')

Submission status: Wrong Answer

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

s = list(map)


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

s.pop(k-1)
s.insert(k-1,x)

print(" ".join(s))

Submission status: Wrong Answer

Solution code:
inputstr1 = input().split()
n = inputstr1[0]
k = inputstr1[1]
s = str(input())

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

Submission status: Wrong Answer

Solution code:
inputstr1 = input().split()
n = inputstr1[0]
k = inputstr1[1]
s = str(input())

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

Submission status: Wrong Answer

Solution code:
inputstr1 = input().split()
n = inputstr1[0]
k = inputstr1[1]
s = input()
 
N = int(n)
K = int(k)

ret = ""

for i in range(N):
  if i != K:
    ret += s[i]
  else:
    ret += s[i].lower()
print(ret)

Submission status: Wrong Answer

Solution code:
inputstr1 = input().split()
n = inputstr1[0]
k = inputstr1[1]
s = input()
 
N = int(n)
K = int(k)

ret = ""

for i in range(N):
  if i != K-1:
    ret += s[i]
  else:
    ret += s[i].lower()

Submission status: Wrong Answer

Solution code:
inputstr1 = input().split()
n = inputstr1[0]
k = inputstr1[1]
s = input()
 
N = int(n)
K = int(k)

ret = ""

for i in range(N):
  if i != K:
    ret += s[i]
  else:
    ret += s[i].lower()

Submission status: Wrong Answer

Solution code:
inputstr1 = input().split()
n = inputstr1[0]
k = inputstr1[1]
s = input()

intn = int(n)
intk = int(k)

small = str.swapcase(s[intk -1])

answer = s.replace(s[intk -1], small)

print(answer)

Submission status: Wrong Answer

Solution code:

inputstr1 = input().split()
n = inputstr1[0]
k = inputstr1[1]
s = input()

k = int(k)
moji = s[(k-1):k]              #mojiという変数に変換したい文字を入れる
moji = str.lower(moji)         #小文字にする
s = s[:(k-1)] + moji + s[k:]   #連結する
k = str(k)

print("N:" + n)
print("K:" + k)
print("S:" + s)

Submission status: Wrong Answer

Solution code:
inputstr1 = input().split()
n = inputstr1[0]
k = inputstr1[1]
s = input()
s_list = list(s)
s_list[int(k) - 1] = s_list[int(k)-1].lower()
s = "".join(s_list)
print("S:"+s)

Submission status: Wrong Answer

Solution code:
inputstr1 = input().split()
n = inputstr1[0]
k = inputstr1[1]
s = input()
print("N:"+n)
print("K:"+k)
print("S:"+s)
s_list = list(s)
s_list[int(k) - 1] = s_list[int(k)-1].lower()
s = "".join(s_list)
print("S:"+s)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n,k = map(int,input().split())
ans = 0
for i in range(1,n+1):
    if i < k:
      c = i
      d=0
      while c<k:
        c = c*2
        d+=1
      ans -=float((2**d-1)/(n*(2**d)))
print(ans)

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=str(input())
a=int(s[:2])
b=int(s[2:])

if (a==0 or a>=13 ) and ( b==0 or b>=13):
    print('NA')
elif (a>=1 and a<=12 ) and (b>=1 and b<=12):
    print('AMBIGUOS')
elif (a>=1 and a<=12) and b>=13:
    print('MMYY')
elif a>=13 and (b>=1 and b<=12):
    print('YYMM')

Submission status: Wrong Answer

Solution code:
s=str(input())
a=int(s[:2])
b=int(s[2:])

if a==0 or b==0:
    print('NA')
elif a>=1 and a<=12 and b>=1 and b<=12:
    print('AMBIGUOS')
elif a>=1 and a<=12 and b>=13:
    print('MMYY')
elif a>=13 and b>=1 and b<=12:
    print('YYMM')

Submission status: Wrong Answer

Solution code:
import math

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

for i in range(1, N+1):
    if i >= K:
        P += (1/N)
    if i < K:    
        n = (math.log(K, 10) + math.log(2, 10) - math.log(i, 10)) // math.log(2, 10)
        n = math.ceil(n)
        p = (1/N) * (1/2) ** n
        P += p

print(P)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
s = input()
if s[0] == 0:
    mae = int(s[1])
else:
    mae = int(s[:2])
if s[2] == 0:
    usiro =  int(s[3])
else:
    usiro = int(s[2:])
if 12 >= mae:
    if 12 >= usiro:
        print("AMBIGUOUS")
    else:
        print("MMYY")
elif 12 >= usiro:
    print("YYMM")
else:
    print("NA")

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
def canMonth(value):
    return 1 <= value and value <= 12


S = input()

F = int(S[:2])
B = int(S[2:])
fm = canMonth(F)
bm = canMonth(B)

if fm and bm:
    print('AMBIGUOUS')
elif not fm and not bm:
    print('NA')
elif fm:
    print('MMYY')
else:
    print('YYMM')

Submission status: Wrong Answer

Solution code:
x,y = map(int,input().split())
a = list(input())
if a[y-1]=="A":
  a[y-1]="a"
if a[y-1]=="B":
  a[y-1]="b"
if a[y-1]=="C":
  a[y-1]="c"
print(str(a))

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if k == 1:
  sTR = str[0] + STR[1:]
elif k == n:
  sTR = STR[0:n-2] + str[n-1]
else:
  sTR = STR[0:k-2] + str[k-1] + STR[k:]

print(sTR)

Submission status: Wrong Answer

Solution code:
import numpy as np
 
N, K = map(int, input().split())
 
def get_x(n, K):
    if n >= K:
        return 0
    else:
        x_raw = np.log2(K) - np.log2(n)
        return np.ceil(x_raw)

def get_prob(n, K):
    x = get_x(n, K)
    if x == 0:
        return 1
    else:
        return (1/2)**x
    
ans = np.mean([get_prob(n, K) for n in range(1, N+1)])
 
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if k == 1:
  sTR = str[0] + STR[1:]
elif k == n:
  sTR = STR[:n-2] + str[n-1]
else:
  sTR = STR[:k-2] + str[k-1] + STR[k:]

print(sTR)

Submission status: Wrong Answer

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

if k == 1:
  sTR = str[0] + STR[1:]
else:
  sTR = STR[:k-2] + str[k-1] + STR[:k]

print(sTR)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
nums = list(map(int, input().split()))
chrs = list(input())

chrs[nums[1]-1] = chrs[nums[1]-1].lower()
print(chrs)