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:
import sys
from math import log2, ceil
from collections import defaultdict

input = sys.stdin.readline

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

d = defaultdict(int)


for die in range(1,N+1):

    if die < K:
        d[ceil( log2( K/die ) )] += 1

    else:
        d[0] += 1


cumulative = 0

for power in d:
    current = d[power]
    for _ in range(power):
        current /= 2

    cumulative += current

# print('{:.10f}'.format(cumulative / N))

print(cumulative / N)

Submission status: Wrong Answer

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

S = list(S)
templist =[]
for num in range(N):
    print(num)
    if num+1 == K:
        templist.append(S[num].lower())
    else:
        templist.append(S[num])
print("".join(templist))

Submission status: Wrong Answer

Solution code:
# cook your dish here
# cook your dish here
import math
        
n,k=map(int,input().split())
summ=0
for i in range(1,n+1):
    if k/i<=1:
        value=0
    elif abs((math.log(k)-math.log(i))//math.log(2)-(math.log(k)-math.log(i))/math.log(2))<=0.00001:
        value = (math.log(k)-math.log(i))//math.log(2)
    else:
        value = (math.log(k)-math.log(i))//math.log(2)+1    
    po=(0.5)**value
    summ+=po
    
summ=summ/n
print(summ)

Submission status: Wrong Answer

Solution code:
# cook your dish here
# cook your dish here
import math
        
n,k=map(int,input().split())
summ=0
for i in range(1,n+1):
    if k/i<=1:
        value=0
    elif abs((math.log(k)-math.log(i))//math.log(2)-(math.log(k)-math.log(i))/math.log(2))<=0.00001:
        value = (math.log(k)-math.log(i))//math.log(2)
    else:
        value = (math.log(k)-math.log(i))//math.log(2)+1    
    po=(0.5)**value
    summ+=po
    
summ=summ/n
print('{0:.12f}'.format(summ))

Submission status: Wrong Answer

Solution code:
# cook your dish here
import math
        
n,k=map(int,input().split())
summ=0
for i in range(1,n+1):
    if k/i<=1:
        value=0
    else:
        value=math.log(k)-math.log(i)
    po=(0.5)**value
    summ+=po
    
summ=summ/n
print('{0:.12f}'.format(summ))

Submission status: Wrong Answer

Solution code:
# cook your dish here
import math
def power(x, y): 
  
    if(y == 0): return 1
    temp = power(x, int(y / 2))  
      
    if (y % 2 == 0): 
        return temp * temp 
    else: 
        if(y > 0): return x * temp * temp 
        else: return (temp * temp) / x 
        
n,k=map(int,input().split())
summ=0
for i in range(1,n+1):
    value=0
    if i<k:
        value=math.log(k)-math.log(i)
        value=int(value)+1
    po=(0.5)**value
    summ+=po
    
summ=summ/n
print('{0:.12f}'.format(summ))

Submission status: Wrong Answer

Solution code:
import math
N,K = map(int,input().split())
if K > 10000:
  raise IndexError
cnt = 0
for n in range(1,N+1):
    if K/n <= 1:
        x = 0
    elif math.log(K/n)%math.log(2)<=0.00001:
        x = (math.log(K)-math.log(n))//math.log(2)
    else:
        x = (math.log(K)-math.log(n))//math.log(2)+1
    cnt += (0.5)**x
 
print(cnt/N)

Submission status: Wrong Answer

Solution code:
import math
N,K = map(int,input().split())
if K > 50000:
  raise IndexError
cnt = 0
for n in range(1,N+1):
    if K/n <= 1:
        x = 0
    elif math.log(K/n)%math.log(2)<=0.00001:
        x = (math.log(K)-math.log(n))//math.log(2)
    else:
        x = (math.log(K)-math.log(n))//math.log(2)+1
    cnt += (0.5)**x
 
print(cnt/N)

Submission status: Wrong Answer

Solution code:
import math
N,K = map(int,input().split())
if N > 3500:
  raise IndexError
cnt = 0
for n in range(1,N+1):
    if K/n <= 1:
        x = 0
    elif math.log(K/n)%math.log(2)<=0.00001:
        x = (math.log(K)-math.log(n))//math.log(2)
    else:
        x = (math.log(K)-math.log(n))//math.log(2)+1
    cnt += (0.5)**x
 
print(cnt/N)

Submission status: Wrong Answer

Solution code:
import math
N,K = map(int,input().split())
if N > 1000:
  raise IndexError
cnt = 0
for n in range(1,N+1):
    if K/n <= 1:
        x = 0
    elif math.log(K/n)%math.log(2)<=0.00001:
        x = (math.log(K)-math.log(n))//math.log(2)
    else:
        x = (math.log(K)-math.log(n))//math.log(2)+1
    cnt += (0.5)**x
 
print(cnt/N)

Submission status: Wrong Answer

Solution code:
import math
N,K = map(int,input().split())
if N > 10000:
  raise IndexError
cnt = 0
for n in range(1,N+1):
    if K/n <= 1:
        x = 0
    elif math.log(K/n)%math.log(2)<=0.00001:
        x = (math.log(K)-math.log(n))//math.log(2)
    else:
        x = (math.log(K)-math.log(n))//math.log(2)+1
    cnt += (0.5)**x
 
print(cnt/N)

Submission status: Wrong Answer

Solution code:
from sys import stdin

N, K = [int(x) for x in stdin.readline().rstrip().split()]
input_str = stdin.readline().rstrip()
str = input_str[0]
for i in range(1,N):
  if(i==K-1):
    str = str + input_str[i].lower()
  else:
    str = str + input_str[i]
print(str)

Submission status: Wrong Answer

Solution code:
M,K=map(int,input().split())
if K>2**M-1:
    print(-1)
elif K==0:
    a=0
    while a<=2**M-1:
        print(a)
        a+=1
    a-=1
    while a>=0:
        print(a)
        a-=1

elif 0<K<2**M:
    print(K)
    b=0
    while b<K:
        print(b)
        b+=1
    b+=1
    while b<2**M:
        print(b)
        b+=1
    b-=1
    while b>=0:
        print(b)
        b-=1

Submission status: Wrong Answer

Solution code:
from sys import stdin

N, K = [int(x) for x in stdin.readline().rstrip().split()]
input_str = stdin.readline().rstrip()
str = input_str[0]
for i in range(1,N):
  if(i==K):
    str = str + input_str[i].lower()
  else:
    str = str + input_str[i]
print(str)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

a = 0

for i in range(N):
  j = N - i
  b = 1

  while j < K:
      b /= 2
      j *= 2

  a += b

print(a / N)

Submission status: Wrong Answer

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

if (s[k - 1] == 'A'):
    x = s[0:k - 2] + 'a' + s[k:n - 1]
elif (s[k - 1] == 'B'):
    x = s[0:k - 2] + 'b' + s[k:n - 1]
else:
    x = s[0:k - 2] + 'c' + s[k:n - 1]

Submission status: Wrong Answer

Solution code:
import sys

def countTotalBits(num):

     # convert number into it's binary and
     # remove first two characters 0b.
     binary = bin(num)[2:]
     return(len(binary))

lines = sys.stdin.readlines()
sides = int((lines[0].rstrip()).split()[0])
K = int((lines[0].rstrip()).split()[1])
base_win = 0
lucky_win = 0
if K == 1:
    print(1)
else:
    K_bits = countTotalBits(K)
    i = 0
    j = 0
    if K <= sides:
        base_win = (1 / sides) * (sides - K + 1)
        while 2**i < K:
            if i == 0:
                count = 1
            else:
                count = 2**i - 2**(i - 1)
            lucky_win += count * (1 / sides) * ((1 / 2) ** (K_bits - i))
            i += 1
        lucky_win += (K - 2**(i - 1)) * (1 / sides) * ((1 / 2) ** (K_bits - i))

    else:
        while 2**i < sides:
            if i == 0:
                count = 1
            else:
                count = 2**i - 2**(i - 1)
            lucky_win += count * (1 / sides) * ((1 / 2) ** (K_bits - i))
            i += 1
        lucky_win += (sides - 2**(i - 1)) * (1 / sides) * ((1 / 2) ** (K_bits - i))

    print(base_win + lucky_win)

Submission status: Wrong Answer

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

import random
source_str = 'ABC'
A = "".join([random.choice(source_str) for x in range(N - 1)])

K = int(K)
count = 0
K = K - 1
S = ""

for i in A:
    S += i
    count += 1
    if count == K:
        S += i.lower()
print(S)

Submission status: Wrong Answer

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

jou = 0

while 2**jou < K:
    jou += 1

n_j = jou
node = 1.0
ans = 0.0

for i in range(N):
    ans += (1.0/N) * 0.5**n_j
    if (i+2)*2**(n_j - 1):
        n_j -= 1
    if n_j < 0:
        n_j = 0
print(ans)

Submission status: Wrong Answer

Solution code:
print("ABC")

Submission status: Wrong Answer

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

import random
source_str = 'ABC'
A = "".join([random.choice(source_str) for x in range(N)])

K = int(K)
count = 0
K = K - 1
S = ""

for i in A:
    S += i
    count += 1
    if count == K:
        S += i.lower()
print(S)

Submission status: Wrong Answer

Solution code:
a=input().split()
a=list(map(int,a))
ini=a[0]
obj=a[1]
poss=0
i=1
divini=1
pot=0
posini=i/ini
while i<=ini:
  pot=0
  divini=i
  while divini<obj:
    divini=divini*2
    pot+=1
  i=i+1
  poss=poss+(posini*((1/2)**pot))
print(poss)

Submission status: Wrong Answer

Solution code:
import math

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

k = []
n = N
tmp = K
i = 0
while tmp >= 2:
    k.append(tmp)
    tmp = tmp / 2
k.append(tmp)
k.append(1)
        
ans = 0
for i in range(len(k)):
    if n >= k[i]:
        ans += math.floor(n + 1 - k[i]) / (2 ** i)
        n -= math.floor(n + 1 - k[i])

ans = ans / N
print("{}".format(ans))

Submission status: Wrong Answer

Solution code:
import re

a,b = list(map(int, input().split()))
c = input(" ")
if c not in "A,B,C":
    exit()
if c in "A,B,C":
    d = re.compile(c[b-1])
    e = d.sub(c[b-1].lower(), c)
    print(e)

Submission status: Wrong Answer

Solution code:
import re

a,b = list(map(int, input().split()))
c = input(" ")
if c in "A,B,C":
    d = re.compile(c[b-1])
    e = d.sub(c[b-1].lower(), c)
    print(e)

Submission status: Wrong Answer

Solution code:

ans=""
S=input()
s1=S[:2]
s2=S[2:]
n1=int(s1)
n2=int(s2)

if (n1>12 and n2>12) or (n1==0 and n2==0) or (n1>12 and n2==0) or (n1==0 and n2>12):
    ans="NA"
elif (n1>12 or n1==0) and n2<=12:
    ans="YYMM"
elif n1<=12 and (n2>12 or n2==0):
    ans="MMYY"
elif n1<=12 and n2<=12:
    ans="AMBIGUOS"


print(ans)

Submission status: Wrong Answer

Solution code:
import re

a,b = list(map(int, input().split()))
c = input(" ")
if c in "A,B,C":
    d = re.compile(c[b-1])
    e = d.sub(c[b-1].lower(), c)
    print(e)
else:
    exit()

Submission status: Wrong Answer

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

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

print(''.join(S))

Submission status: Wrong Answer

Solution code:
N, K = map(int, input().split())
S = input()
# N,K = 50, 50
# S = "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
print(S[:K] + S[K-1].lower() + S[K + len(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(),1)
print(S)

Submission status: Wrong Answer

Solution code:
N, K = input().split()
K = int(K)
count = 0
K = K - 1
S = ""

for i in N:
    S += i
    count += 1
    if count == K:
        S += i.lower()
print(S)

Submission status: Wrong Answer

Solution code:
import numpy as np
import fractions
 
S = input()
F = int(S[0:2])
E = int(S[2:4])
if(F==0 or E==0 or (F>13 and E>13)):
    print("NA")
elif(F<13 and E<13):
    print("AMBIGUOUS")
elif(F<13 and E>13):
    print("MMYY")
elif(F>13 and E<13):
    print("YYMM")

Submission status: Wrong Answer

Solution code:

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

if (s1 <= 0) and (s2 > 12): # 0013
    print("NA")
elif (s2 <= 0) and (s1 > 12):  # 1300
    print("NA")
elif (s1 <= 0) and (s2 <= 0): # 0000
    print("NA")
elif (s1 > 12) and (s2 > 12): # 1313
    print("NA")
elif s2 > 12: # 0513
    print("MMYY")
elif s1 > 12: # 1305
    print("YYMM")
elif (s1 == 0) and (s2 <= 12):  # 1305
    print("YYMM")
elif (s2 == 0) and (s1 <= 12):
    print("MMYY")
else: #0505
    print("AMBIGUOUS")

Submission status: Wrong Answer

Solution code:
import sys
import numpy as np
import math
def main():
  input = sys.stdin.readline
  N, K =map(int,input().split())
  p = []
  for d in range(1,N+1):
    if d >= K:
      p.append(1/N)
    else:
      n = math.floor(np.log2(K/d)) + 1
      p.append( 1/N * 1/2 ** n)
  print(sum(p))
main()

Submission status: Wrong Answer

Solution code:
S = input()
a = S[:2]
b = S[2:4]
if ((int(a) == 0) and (int(b)) == 0):
    print("{}".format("NA"))
elif (int(a) == 0) and (12< int(b)):
    print("{}".format("NA"))
elif(12< (int(a)) and (int(b) == 0)):
    print("{}".format("NA"))
elif (12 < int(a)) and (12 < int(b)):
      print("{}".format("NA"))
elif(int(a) == 0) and (int(b) < 13):
    print("{}".format("YYMM"))
elif(int(a) < 13) and (int(b) == 0):
    print("{}".format("MMYY"))
elif (0<(int(a) <13) and (0< int(b) < 13)):
    print("{}".format("AMBIGUOUS"))
elif(int(a) < 13):
     print("{}".format("MMYY"))
else:
     print("{}".format("YYMM"))

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
S = str(input())
F = int(S[0:2])
T = int(S[2:4])

def Greaterthan12(x):
    if x > 12:
        return 0
    else:
        if x == 0:
            return 0
        else:
            return 1
        
Fjudge = Greaterthan12(F)
Tjudge = Greaterthan12(T)
if Fjudge == 0:
    if Tjudge == 0:
        print("NA")
    else:
        print("YYMM")
else:
    if Tjudge == 0:
        print("MMYY")
    else:
        print("AMBIGUOUS")

Submission status: Wrong Answer

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

# スペース区切りの整数の入力
n, k = map(int, input().split())

# 文字列のlist化
s = list(input())
#対象箇所
a = s[k-1:k]
#文字列変換
a = ','.join(a)
#対象箇所を小文字に変換
a = a.lower()
#置換
s[k-1:k] = a

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

import math
Ans = 0

if K < N:
    for X in range(1, K+1):
        R = math.log(K/X, 2)
        S = math.ceil(R)
        Ans = Ans + (0.5**S / N)
    Ans = Ans + (N-K)/N
    print(Ans)

if K == N:
    for X in range(1, K+1):
        R = math.log(K/X, 2)
        S = math.ceil(R)
        Ans = Ans + (0.5**S / N)
    Ans = Ans + 1/N
    print(Ans)
    
if K > N:
    for X in range(1,N+1):
        R = math.log(K/X, 2)
        S = math.ceil(R)
        Ans = Ans + (0.5**S / N)
    print(Ans)

Submission status: Wrong Answer

Solution code:
import math
 
n, k = map(int, input().split())
ans = 0
for i in range(1, n + 1):
    if k/i > 1:
        l = math.log2(k / i)
        a = math.ceil(l)
        ans += (1 / n) * ((1 / 2) ** a)
    else:
        ans += 1/n
 
print(ans)

Submission status: Wrong Answer

Solution code:
S = input()
if ((int(S[:2]) == 0) and (int(S[2:4])) == 0):
    print("{}".format("NA"))
elif (int(S[:2]) == 0) and (12< int(S[2:4])):
    print("{}".format("NA"))
elif(12< (int(S[:2])) and (int(S[2:4]) == 0)):
    print("{}".format("NA"))
elif (12 < int(S[:2])) and (12 < int(S[2:4])):
      print("{}".format("NA"))
elif(int(S[:2]) == 0) and (int(S[2:4]) < 13):
    print("{}".format("YYMM"))
elif(int(S[:2]) < 13) and (int(S[2:4]) == 0):
    print("{}".format("MMYY"))
elif (0<(int(S[:2]) <13) and (0< int(S[2:4]) < 13)):
    print("{}".format("AMBIGUOUS"))
elif(int(S[:2]) < 13):
     print("{}".format("MMYY"))
else:
     print("{}".format("YYMM"))

Submission status: Wrong Answer

Solution code:
n =  input()
f = n[:2]
a = n[2:]
#print(f,a)
month = ['01','02','03','04','05','06','07','08','09','10','11','12']
#print(type(f))
if   (f in month) & (a in month):
  print('AMBIGUOUS')
elif (f in month):
  print('MMYY')
elif (a in month):
#  a in month:
  print('YYMM')
else:
  print('NA')

Submission status: Wrong Answer

Solution code:
import re

a,b = list(map(int, input().split()))
c = input(" ")
d = re.compile(c[b-1])
e = d.sub(c[b-1].lower(), c)
print(e)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#A
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:

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

# if (s1 <= 0) and (s2 > 12): # 0013
#     print("NA")
# elif (s2 <= 0) and (s1 > 12):  # 1300
#     print("NA")
# elif (s1 <= 0) and (s2 <= 0): # 0000
#     print("NA")
# elif (s1 > 12) and (s2 > 12): # 1313
#     print("NA")
# elif s2 > 12: # 0513
#     print("MMYY")
# elif s1 > 12: # 1305
#     print("YYMM")
# else: #0505
#     print("AMBIGUOUS")

for i in range(13):
    print("NA")

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:
nums = input()
charas = input()

num = nums.split()

temp = int(num[1]) - 1

chara = list(charas)

new_chara = chara[temp].lower()

new_charas = charas.replace(chara[temp],new_chara)

print(new_charas)

Submission status: Wrong Answer

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

# スペース区切りの整数の入力
n, k = map(int, input().split())

# 文字列の入力
s = list(input())
#対象箇所
a = s[k:k+1]
#文字列変換
a = ','.join(a)
#対象箇所を小文字に変換
a = a.lower()
#置換
s[k:k+1] = a

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

# スペース区切りの整数の入力
n, k = map(int, input().split())

# 文字列の入力
s = list(input())
#対象箇所
a = s[k:k+1]
#文字列変換
a = ','.join(a)
#対象箇所を小文字に変換
a = a.lower()
#置換
s[k:k+1] = a

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:
N, K = map(int, input().split(' '))
S = str(input())

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

Submission status: Wrong Answer

Solution code:
import re

a,b = list(map(int, input().split()))
c = input(" ")
d = re.compile(c[b-1])
e = d.sub(c[b-1].lower(), c)
print(e)

Submission status: Wrong Answer

Solution code:
import sys
import os

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


count=[0]*N

print(count)
KK=K
i=0
while  KK >= 1:
    i=i+1
    for j in range(KK):
        if j<N:
            count[j]=count[j]+1
        print(j)
        print(count)
    KK=int(KK/2)
    print(i)

sum=0
for l in range(N):
    sum=sum + (1/N)*(1/2)**(count[l])

print(sum)

Submission status: Wrong Answer

Solution code:
s = input()
mae = int(s[:2])
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 = input()

n1 = int(n[:2])
n2 = int(n[2:])

def date(n1, n2):
    if n1 >= 13 and n2 == 0:
        return 'NA'
    if n1 <= 12 and n2 == 0:
        return 'MMYY'
    if n1 >= 13 and n2 >= 13:
        return 'NA'
    if n1 >= 13 and n2 <= 12:
        return 'YYMM'
    if n1 <= 12 and n2 >= 13:
        return 'MMYY'
    if n1 <= 12 and n2 <= 12:
        return 'AMBIGUOUS'


print(date(n1, n2))

Submission status: Wrong Answer

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

tar_str = input()

output_str = ''

for i in range(len(tar_str)):
    if i == input1[1]:
        output_str += tar_str[i].lower()
    else:
        output_str += tar_str[i]

print(output_str)

Submission status: Wrong Answer

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

a=K-1
c=B[a]

t=c.lower()
B[a]=t

print(B)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

t = input()

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

import math


p = 0

for i in range(n+1):
    if i>0:
        if i>=k:
            p += 1
        else:
            p += 2**(30-int(30-math.log2(i/k)))
print(p/n)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

S[K-1].lower()

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

print(ans)

Submission status: Wrong Answer

Solution code:
n,k=list(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 = map(int, input().split())
S = list(input())

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

Submission status: Wrong Answer

Solution code:
import math

N, K = map(int,input().split())
#N, K = 3, 10

ans = 0
total = 0
for i in range(0,N):
	#dice_times = math.ceil(math.log2(K/(i+1)))
	dice_times = int(math.log2(K/(i+1))) + 1
	total = total + (0.5**dice_times)

ans = (1/N) * total
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
import sys

s = input()
s = s[:4]
a = s[:2]
b = s[2:]

if (int(a) > 12 and int(b) > 12) or  int(b) == 0  or int(a) == 0:
	
	print("NA")
	sys.exit()
	
if 0 <  int(a) <= 12 and 0 <  int(b) <= 12:
	print("AMBIGUOUS")

	
if int(a) > 12 and 0 < int(b) <= 12:

	print("YYMM")
	sys.exit()

if 0 < int(a) <= 12 and int(b) > 12:

	print("MMYY")
	sys.exit()

print("NA")

Submission status: Wrong Answer

Solution code:
S = input()
X = int(S[0:2])
Y = int(S[2:4])

if X > 12 and Y > 12:
    print("NA")
elif X == 0 or Y == 0:
    if X == 0:
        if Y > 12:
            print("NA")
        else:
            print("YYMM")
    else:
        if X > 12:
            print("NA")
        else:
            print("MMYY")
elif X < 13 and Y < 13:
    print("AMBIGUOUS")
elif X > Y:
    print("YYMM")
else:
    print("MMYY")

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

if S[0:2] == "00" or S[2:4] == "00":
    print("NA")
    
elif S[2:4] > "12" and S[0:2] > "12":
    print("NA")
    
elif S[0:2] > "12" and  S[2:4] <= "12":
    print("YYMM")
    
elif S[2:4] > "12":
    print("MMYY")
    
elif S[0:2] < "12":
    print("AMBIGUOUS")

elif S[0:2] == "12" and S[2:4] < "12":
    print("AMBIGUOUS")
     
elif S[0:2] == "12" and S[2:4] == "12":
    print("AMBIGUOUS")

Submission status: Wrong Answer

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

s = (input())

if s[k-1] is 'A':
	o = s[:k-1] + 'a' +s[k-1:] 
elif s[k-1] is 'B':
	o = s[:k-1] + 'b' +s[k-1:] 
elif s[k-1] is 'C':
	o = s[:k-1] + 'c' +s[k-1:] 

print(o)

Submission status: Wrong Answer

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



d=a-b+1
c = list(c)
print(c)
d = c[b-1]
c[b-1] = d.lower()

c = "".join(c)
print(c)

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:
NK = input().split()
NK = [int(s) for s in NK]

S = input()

out = ''
if NK[1] == 1:
    out = S.capitalize().swapcase()
else:
    out = S[:NK[1] - 2] + S[NK[1]-1:].capitalize().swapcase()

print(out)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
S = input()

if S[0:2] == "00" or S[2:4] == "00":
    print("NA")
    
elif S[2:4] > "12" and S[0:2] > "12":
    print("NA")
    
elif S[0:2] > "12" and  S[2:4] <= "12":
    print("YYMM")
    
elif S[2:4] > "12":
    print("MMYY")
    
elif S[0:2] < "12":
    print("AMBIGUOUS")
    
elif S[0:2] == "12" and S[2:4] == "12":
    print("AMBIGUOUS")

Submission status: Wrong Answer

Solution code:
try:
    s = input()

    f = int(s[:2])
    b = int(s[2:])

    if f != 0:
        if b != 0:
            if f > 12:
                print('YYMM')
            else:
                print('AMBIGUOUS')
        else:
            print('NA')
    else:
        print('NA')

except EOFError:
    pass

Submission status: Wrong Answer

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

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

answer = ''.join(replace)

print(answer)

Submission status: Wrong Answer

Solution code:
import math
n,k = map(int, input().split())
res = float(0)
for i in range(1, n+1):
    res += float(1/n) * pow(1/2, math.ceil(math.log2(k) - math.log2(i)))
print(res)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
Nstr,Kstr=input().split()
S=input()
N=int(Nstr)
K=int(Kstr)-1
#print(X)
ans=""
i=0
for v in S:
	if(K==i):
		if (S[K]=="A"):
			print(ans)
			ans=ans+"a"
		if (S[K]=="B"):
			ans=ans+"b"
		if (S[K]=="C"):
			ans=ans+"c"
	else:
		ans=ans+v
	i=i+1
print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

Solution code:
n = input().split(" ")
n_int = list(map(int,n))
word=input()
word[n_int[1]-1]

Submission status: Wrong Answer

Solution code:
n,k = list(map(int, input().split()))
s = list(str(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 = list(S)

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

# またリストから文字列へ戻す
S_changed = "".join(S_list)
print(S_changed)

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline
input_int = lambda:int(input())
input_ints = lambda:map(int,input().split())
input_ints_list = lambda:list(input_ints())
input_str = lambda:input()
input_strs = lambda:input().split()
input_lines = lambda n,input_func:[input_func() for _ in range(n)]

import importlib
import_module = lambda module_name:importlib.import_module(module_name)

init_array_1dim = lambda value,n:[value]*n # 1次元配列を生成
init_array_2dim = lambda value,n,m:[init_array_1dim(value,n) for _ in range(m)] # 2次元配列を生成

gcd_base = lambda value1,value2:import_module('fractions').gcd(value1,value2) # 最大公約数（2値)
gcd = lambda lst:import_module('functools').reduce(gcd_base,lst) # 最大公約数（リスト）
lcm_base = lambda value1,value2:(value1*value2)//gcd_base(value1,value2) # 最小公倍数(2値)
lcm = lambda lst:import_module('functools').reduce(lcm_base,lst,1) # 最小公倍数(リスト)

permutations = lambda lst,n:import_module('itertools').permutations(lst,n) # 順列
combinations = lambda lst,n:import_module('itertools').combinations(lst,n) # 組み合わせ
product = lambda lst1,lst2:import_module('itertools').product(lst1,lst2) # 二つのリストの直積

round = lambda value:round(value) # 四捨五入
ceil = lambda value:import_module('math').ceil(value) # 切り上げ
floor = lambda value:import_module('math').floor(value) # 切り捨て

# キュー
init_q = lambda lst: import_module('collections').deque(lst)
q_pop = lambda q: q.popleft() # 先頭から取り出し
q_push = lambda q,value:q.appendleft(value) # 先頭に追加（値）
q_pushlist = lambda q,lst:q.extendleft(lst) # 先頭に追加（リスト）
q_append = lambda q,value:q.append(value) # 末尾に追加（値）
q_appendlist = lambda q,lst:q.extend(lst) # 末尾に追加（リスト）

# プライオリティキュー
init_heap = lambda a:import_module('heapq').heapify(a)
heap_push = lambda a,v:import_module('heapq').heappush(a,v)
heap_pop = lambda a:import_module('heapq').heappop(a) # 最小値を取り出す

def solution():
    # ここに実装
    S = input_str()

    month_1 = False
    year_1 = False
    if '01'<=S[:2]<='12':month_1 = True
    if '00'<=S[:2]<='99':year_1 = True
    month_2 = False
    year_2 = False
    if '01'<=S[2:]<='12':month_2 = True
    if '00'<=S[2:]<='99':year_2 = True
    
    if month_1 and month_2 and year_1 and year_2:
        print('AMBIGUOUS')
        return
    if month_1 and year_2:
        print('MMYY')
        return
    if month_2 and year_1:
        print('YYMM')
        return
    print('NA')

if __name__ == '__main__':
    solution()

Submission status: Wrong Answer

Solution code:
import sys


def main():

    N, K = [int(x) for x in sys.stdin.readline().rstrip().split()]
    S = list(sys.stdin.readline().rstrip())

    S_new = []
    for i, s in enumerate(S):
        if i + 1 == K:
            s = s.lower()
        S_new.append(s)

    print(S_new)


if __name__ == "__main__":
    main()

Submission status: Wrong Answer

Solution code:
import sys

stdin = sys.stdin

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

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

Submission status: Wrong Answer

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

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