Harryxun/stf_run huggingface dataset:
import math
rom scipy.special import comb
t = comb(n, a, exact=True)
k = comb(n, b, exact=True)
n, a, b = map(int,input().split())
if n == 2:
  print(0)
else:
  total = 2 ** n -1
  total  = total - t - k
  print(total % (10 ** 9 + 7))


### FIXED CODE ###

N, a, b = map(int,input().split())
p = pow(10,9) + 7
def comb(n,r):
  bunshi = 1
  for i in range(n-r+1, n+1):
    bunshi =bunshi * i % p
  bunbo = 1
  for i in range(1, r+1):
    bunbo = bunbo * i % p
  return bunshi * pow(bunbo, p-2, p)
print((pow(2,N, p) - 1 - comb(N,a) - comb(N,b)) % p)
#include <stdio.h>
#include <string.h>
#include <ctype.h>
int main(){
    int a, b, c, num, eq=0;
    scanf("%d %d %d", &a, &b, &c);
    scanf("%d", &num);
    for(int i=0; i<num; ++i){
    if(a>=b && c>=a)
        b=b*2;

    else
        c=c*2;
    }
    if(b>a && c >b)
        printf("YES");
    else    
        printf("NO");
    
    ///printf("%d %d %d\n", a, b, c);
    printf("\n");
    
    return 0;
}

### FIXED CODE ###

n,k= map(int, input().split())
num= [int (x) for x in input().split()]
for i in range(n-k):
    if num[i] < num[k+i]:
        print("Yes")
    else:
        print("No")
MOD = 1000000007

n = int(input())

# la = []
# lb = []
# for _ in range(n):
#     a, b = map(int, input().split())
#     la.append(a)
#     lb.append(b)


def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a


def normalize(a, b):
    g = gcd(abs(a), abs(b))
    a //= g
    b //= g

    if a < 0:
        a *= -1
        b *= -1

    if a != 0 and b == 0:
        a, b = 1, 0
    if a == 0 and b != 0:
        a, b = 0, 1

    return a, b


dv = {}
for _ in range(n):
    a, b = map(int, input().split())
    a, b = normalize(a, b)
    dv[(a, b)] = dv.get((a, b), 0) + 1


counted = {k: False for k in dv.keys()}
nc = 1
for k, v in dv.items():
    if not counted[k]:
        a0, b0 = k
        a1, b1 = normalize(b0, -a0)
        w = dv.get((a1, b1), 0)

        nc *= 1 + (2 ** v - 1) + (2 ** w - 1)
        nc %= MOD

        counted[(a0, b0)] = True
        counted[(a1, b1)] = True

nc -= 1
print(nc)


### FIXED CODE ###

MOD = 1000000007


def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a


def normalize(a, b):
    if a == 0 and b == 0:
        return 0, 0
    elif a != 0 and b == 0:
        return 1, 0
    elif a == 0 and b != 0:
        return 0, 1
    else:
        g = gcd(abs(a), abs(b))
        a //= g
        b //= g
        if a < 0:
            a *= -1
            b *= -1
        return a, b


def rotate(a, b):
    if b > 0:
        return b, -a
    else:
        return -b, a


n = int(input())
dv = {}
for _ in range(n):
    a, b = map(int, input().split())
    a, b = normalize(a, b)
    dv[(a, b)] = dv.get((a, b), 0) + 1


counted = {k: False for k in dv.keys()}
nc = 1
for k, v in dv.items():
    if not counted[k]:
        if k != (0, 0):
            a0, b0 = k
            a1, b1 = rotate(a0, b0)
            w = dv.get((a1, b1), 0)

            nc *= 1 + (pow(2, v, MOD) - 1) + (pow(2, w, MOD)- 1)
            nc %= MOD

            # counted[(a0, b0)] = True
            counted[(a1, b1)] = True


nc += dv.get((0, 0), 0)

nc -= 1
nc %= MOD
print(nc)
print(3*int(input)**2)

### FIXED CODE ###

print(3*int(input())**2)
lst=[0 for i in range(50)]
for a in range(10):
    for b in range(10):
        for c in range(10):
            for d in range(10):
                lst[a+b+c+d] += 1
while i:
    try:
        print(lst[int(input())])
    except:
        break


### FIXED CODE ###

lst=[0 for i in range(51)]
for a in range(10):
    for b in range(10):
        for c in range(10):
            for d in range(10):
                lst[a+b+c+d] += 1
while 1:
    try:
        print(lst[int(input())])
    except:
        break
S = input()
T = input()

for _ in range(len(S)):
    if S == T:
        return True
    else:
        S = S[-1] + S[:-1]

return False

### FIXED CODE ###

p=input()
q=input()
q=2*q
s=len(p)
u=0
l=len(q)
for i in range(l):
    if p==q[i:s+i]:
        print("Yes")
        u=1
        break
if u==0:
    print("No")
num = input()
flag = False
for i in range(num):
  if num[i] == '7':
    flag = True
    break
if flag:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

num = input()
flag = False
for i in range(len(num)):
    if num[i] == '7':
        flag = True
        break
if flag:
    print("Yes")
else:
    print("No")
N = int(input())
cnt_AB = 0
end_A = 0
start_B = 0
start_B_and_end_A= 0
for i in range(N):
    s = input()
    cnt_AB += s.count('AB')
    if s[-1] == 'A' and s[0] == 'B':
        start_B_and_end_A += 1
    else:
        if s[-1] == 'A':
            end_A += 1
        if s[0] == 'B':
            start_B += 1
if end_A == 0 and start_B == 0:
    print(cnt_AB + start_B_and_end_A - 1)
else:
    print(cnt_AB + start_B_and_end_A + min(end_A, start_B))

### FIXED CODE ###

N, K = map(int, input().split())
print(N-K+1)
import numpy as np
n,m=map(int,input().split())
L=list(map(int,input().split()))
L.sort()

d=np.array([L[i+1]-L[i] for i in range(m-1)])

ans=L[m-1]-L[0]

for i in range(n-1):
  a=np.argmax(d)
  d[a]=0
  ans-=(L[a+1]-L[a])
  




print(ans)

### FIXED CODE ###

n,m=map(int,input().split())
L=list(map(int,input().split()))
L.sort()
if n>=m:
  print(0)
elif m!=1:

  d=[L[i+1]-L[i] for i in range(m-1)]
  d.sort()
  d.reverse()
  ans=L[-1]-L[0]


  ans-=sum(d[:n-1])
  print(ans)
  

else:
  print(0)
import math
n, k = map(int, input().split())
mod = 10**9+7

def cmb_count(n,r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))

for i in range(1, k + 1):
    print((cmb_count((n - k + 1), i) * cmb_count(k - 1, i - 1)) % mod)


### FIXED CODE ###

import math

n, k = map(int, input().split())
mod = 10 ** 9 + 7

def cmb_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))


for i in range(1, k + 1):
    # print("{0}C{1} * {2}C{3}".format(n - k + 1, i, k-1,i-1))
    if n -k +1 >=i:
        print(((cmb_count((n - k + 1), i) % mod) * (cmb_count(k - 1, i - 1)) % mod))
    else:
        print(0)
N = int(input())
C = [0 for i in range(N)]
alpha = {}
for i in range(N):
    C[i] = int(input())
    if C[i] in alpha.keys():
        alpha[C[i]].append(i)
    else:
        alpha[C[i]] = [i]
sosu = 10 ** 9 + 7

dp = [1 for i in range(N)]
mae = C[1]
for i in range(2,N):
    dp[i] = dp[i-1]
    if C[i] != mae:
        numlist = alpha[C[i]]
        for j in numlist:
            if j < i and j>=1:
                dp[i] += dp[j-1]
            elif j == 0:
                dp[i] += 1
            else:
                break
    mae = C[i]
    dp[i] = dp[i] % sosu
print(dp[N-1])


### FIXED CODE ###

N = int(input())
C = [0 for i in range(N)]

for i in range(N):
    C[i] = int(input())

sosu = 10 ** 9 + 7

dp = [1 for i in range(N)]
alpha = {}
alpha[C[0]] = [0]
mae = C[0]
for i in range(1,N):
    dp[i] = dp[i-1]
    if C[i] != mae:
        if C[i] in alpha.keys():
            length = len(alpha[C[i]])
            lastnum = alpha[C[i]][length - 1]
            dp[i] += dp[lastnum]
            alpha[C[i]].append(i)
        else:
            alpha[C[i]] = [i]
    mae = C[i]
    dp[i] = dp[i] % sosu
print(dp[N-1])
import math

a,b=map(int,input().split())

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

    if temp!=1:
        arr.append(temp)


    return arr
  
d = math.gcd(a,b)  
print(len(factorization(d)) + 1)

### FIXED CODE ###

from fractions import gcd

a,b=map(int,input().split())

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

    if temp!=1:
        arr.append(temp)

    return arr
  
d = gcd(a,b)
print(len(factorization(d)) + 1)
# -*- coding: utf-8 -*-
x,t = map(int, input().split())
print({}.format(float(x)/t))

### FIXED CODE ###

x,t = map(int, input().split())
print("{}".format(float(x)/t))
a,b = map(int, input().split())
flag = 0
for i in range(10*b, 11*b):
	if int(i * 0.08) == a:
		if flag==0:
			ans　=　i
			flag = 1
if flag == 1:
	print(ans)
else:
	print(-1)

### FIXED CODE ###

a,b = map(int, input().split())
flag = 0
for i in range(10*b, 10*b+10):
	if int(i * 0.08) == a:
		if flag == 0:
			ans=i
			flag = 1
if flag == 1:
	print(ans)
else:
	print(-1)
a,b=input().split()
a=int(a)
b=float(b)
a=a**-1
print(int(b//a))

### FIXED CODE ###

import decimal
A,B=input().split()
A=int(A)
B=decimal.Decimal(B)
print(int(A*B))
import heapq
N, K = map(int, input().split())
V = list(map(int, input().split()))
ans = 0
for k in range(K+1):
    for i in range(k+1):
        tmp = 0
        tmp2 = []
        heapq.heapify(tmp2)

        for j in range(k-i):
            tmp += V[j]
            if V[j] < 0:
                heapq.heappush(tmp2, V[j])
        for j in range(i):
            tmp += V[j]
            if V[N-1-j] < 0:

                heapq.heappush(tmp2, V[j])

        for j in range(min(k, K-k)):
            tmp -= heapq.heappop(tmp2)
        ans = max(tmp, ans)


print(ans)


### FIXED CODE ###

import heapq
N, K = map(int, input().split())
V = list(map(int, input().split()))
ans = 0
for k in range(min(K+1, N+1)):
    for i in range(k+1):
        tmp = 0
        tmp2 = []
        heapq.heapify(tmp2)

        for j in range(k-i):
            tmp += V[j]
            if V[j] < 0:
                heapq.heappush(tmp2, V[j])
        for j in range(i):
            tmp += V[N-1-j]
            if V[N-1-j] < 0:

                heapq.heappush(tmp2, V[N-1-j])

        for j in range(min(k, K-k)):
            if len(tmp2) == 0:
                break
            tmp -= heapq.heappop(tmp2)
        ans = max(tmp, ans)


print(ans)
N= int(input())
MP=[list(map(int,input().split())) for i in range(N)]
MP2=[]
for li in MP:
    MP2.append(li.copy())

MP3=[[-1]*N for _ in range(N)]

### FIXED CODE ###

N=int(input())
MP=[list(map(int,input().split())) for i in range(N)]
MP2=[]
for li in MP:
    MP2.append([i for i in li])

MP3=[[-1]*N for _ in range(N)]

# ワーシャルフロイド
for k in range(N):
    for i in range(N):
        for j in range(N):
            cand = MP2[i][k] + MP2[k][j]
            if cand <= MP2[i][j]:
                MP2[i][j] = cand
                if (i != k and j != k):
                    MP3[i][j] = k

for i in range(N):
    for j in range(N):
        if MP[i][j] != MP2[i][j]:
            print(-1)
            exit()

checked=set()

res = set()
def dfs(i,j):
    k = MP3[i][j]
    if k == -1:
        k = i
    if (i,j) in checked:
        return
    checked.add((i,j))
    if (i == k or j == k):
        if i < j:
            res.add((i,j))
    else:
        dfs(i,k)
        dfs(k,j)

for i in range(N):
    for j in range(N):
        dfs(i,j)

ressum = 0
for i,j in res:
    ressum += MP[i][j]

# for li in MP3:
#     print(li)
# print(res)
print(ressum)
from  functools import reduce
from  math import gcd
n,m=map(int,input().split())
a=list(map(int,input().split()))
a=[i//2 for i in a]
#print(a)
lc=reduce(lambda x,y: (x*y)//gcd(x,y) , a)
#print(lc)
flag=True
for i in a:
  if (lc//i)%2==0:
    flag=False
    break
if flag==False:
  print(0)
else:
  x=m//lc
  print(x//2) if (x%2)==0 else print((x//2)+1)


### FIXED CODE ###

from  functools import reduce
def gcd(v1,v2):
  v=v1%v2
  if v==0:
    return v2
  else :
    return gcd(v2,v)
n,m=map(int,input().split())
a=list(map(int,input().split()))
a=[i//2 for i in a]
#print(a)
lc=reduce(lambda x,y: (x*y)//gcd(x,y) , a)
#print(lc)
flag=True
for i in a:
  if (lc//i)%2==0:
    flag=False
    break
if flag==False:
  print(0)
else:
  x=m//lc
  print(x//2) if (x%2)==0 else print((x//2)+1)
import collections
N, K, L = map(int, input().split())
road = [{"Connected":[],"set":0,"seen":False} for _ in range(N+1)]
rail = [{"Connected":[],"set":0,"seen":False} for _ in range(N+1)]

def dfs(graph, v, num): #深さ優先探索
    graph[v]["seen"] = True
    graph[v]["set"] = num
    for next_v in graph[v]["Connected"]:
        if graph[next_v]["seen"]:
            continue
        dfs(graph, next_v, num)

for X in ((road, K), (rail, L)): #結合を入力
    for i in range(X[1]):
        p, q = map(int, input().split())
        X[0][p]["Connected"].append(q)
        X[0][q]["Connected"].append(p)

for X in [road, rail]: #探索して連結成分に分解
    set_index = 0
    for v in range(N):
        if X[v+1]["seen"]:
            continue
        set_index += 1
        dfs(X, v+1, set_index)
        

List = [(road[i+1]["set"],rail[i+1]["set"]) for i in range(N)]
counter = collections.Counter(List)
for A in List:
    print(counter[A],end=" ")
        


### FIXED CODE ###

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

def fp(x, parentList): #findParent
    if parentList[x] == x:
        return x
    else:
        parentList[x] = fp(parentList[x], parentList)
        return parentList[x]

#各ノードのparentをリストで表現(連結前は自身がparent)
road = [i for i in range(N)]
rail = [i for i in range(N)]

for _ in range(K):
    p, q = map(int, input().split())
    par_p, par_q = fp(p-1, road), fp(q-1, road) #p, qのparent 
    #連結する際、若い番号をparentとする
    if par_p < par_q:
        road[par_q] = par_p
    else:
        road[par_p] = par_q

#railについても同様
for _ in range(L):
    s, t = map(int, input().split())
    par_s, par_t = fp(s-1, rail), fp(t-1, rail)
    if par_s < par_t:
        rail[par_t] = par_s
    else:
        rail[par_s] = par_t

#連結成分の要素をカウント
cnt = {}
for i in range(N):
    key = (fp(i,road),fp(i,rail))
    if key in cnt:
        cnt[key] += 1
    else:
        cnt[key] = 1
#出力
for i in range(N):
    key = (fp(i,road),fp(i,rail))
    ans = cnt[key]
    print(ans, end=" ")
#入力
H, W = map(int, input().split())

lst = []
for i in range(H):
    lst += [list(input())]

#print (lst)
INF = 10 ** 9
#dp =[[INF] * W for _ in range(H)]

def bfs1(i, j): #右下向き
#    print ('i, j= ', i, j)
    if i < 0 or i == W or j < 0 or j == H:
        return 0
    elif lst[i][j] == '#':
        return 0
    else:
        return min(bfs1(i+1, j)+1, bfs1(i, j+1)+1)

def bfs2(i, j): #左上向き
#    print ('i, j= ', i, j)
    if i < 0 or i == W or j < 0 or j == H:
        return 0
    elif lst[i][j] == '#':
        return 0
    else:
        return min(bfs2(i-1, j)+1, bfs2(i, j-1)+1)


ans1 = 0
ans2 = 0
for x in range(W):
    for y in range(H):
        ans1 = max(ans1, bfs1(x,y))
#        print (ans1)
        ans2 = max(ans2, bfs2(W-1-x, H-1-y))

#print (ans1)
#print (ans2)

#print ('ans= ', min(ans1, ans2))
print (min(ans1, ans2))

### FIXED CODE ###

import numpy as np

H, W = map(int, input().split())
max_value = H + W #左上から右下までの最大手数
matrix = []

#黒の場合0, それ以外の場合、max_valueを代入したリストを作成-->arrayへ変換
for _ in range(H):
    matrix.append([0 if i == '#' else max_value for i in list(input())])
matrix = np.array(matrix)

for c in range(W-1):#y座標を増やしていく
    matrix[:,c+1] = np.minimum(matrix[:,c]+1, matrix[:,c+1]) #一個左+1　と　自分自身の値　の小さい方
#print (matrix)
for c in range(W-1,0,-1):
    matrix[:,c-1] = np.minimum(matrix[:,c]+1, matrix[:,c-1]) #一個右+1　と　自分自身の値　の小さい方
#print (matrix)
for c in range(H-1):
    matrix[c+1,:] = np.minimum(matrix[c,:]+1, matrix[c+1,:]) #一個下+1　と　自分自身の値　の小さい方　
#print (matrix)
for c in range(H-1,0,-1):
    matrix[c-1,:] = np.minimum(matrix[c,:]+1, matrix[c-1,:]) #一個上+1　と　自分自身の値　の小さい方
#print (matrix)
print (np.max(matrix))
n = int(input())
s = list(map(int, input().split()))
print('Three' if len(set(s)) == 3 else 'Four')

### FIXED CODE ###

n = int(input())
s = input().split()
print('Three' if len(set(s)) == 3 else 'Four')
a, b = map(int,input().split())

if a + b >= a - b and a + b >= a * b:
    print(a+b)
elif a-b >= a+b and a-b >= a*b:
    print(a-b)
else:
    print(a*b)

### FIXED CODE ###

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

if a > b:
   c = c - (a - b)

if c >= 0:
    print(c)
else:
    print('0')
a = int(input())
if a % 2 = 0:
  print(str(int(a//2)))
else:
  print(str(int(a//2)+1))

### FIXED CODE ###

a = int(input())
if a % 2 == 0:
  print(str(int(a//2)))
else:
  print(str(int(a//2)+1))
from itertools import accumulate
N,K=map(int,input().split())
A=list(map(int,input().split()))
imos=[0 for i in range(N+1)]
ANS=[str(N)]*N
if K>=50:
  ans=" ".join(ANS)
  print(ans)
else:
  for t in range(K):
    for i in range(N):
      l=max(0,i-A[i])
      r=min(N,i+A[i]+1)
      imos[l]+=1
      imos[r]-=1
    imos=accumulate(imos)
    for i in range(0,N):
      A[i]=imos[i]
    imos=[0 for i in range(N+1)]
  for i in range(N):
    A[i]=str(A[i])
  ans=" ".join(A)
  print(ans)  

### FIXED CODE ###

N,K=map(int,input().split())
A=list(map(int,input().split()))
imos=[0 for i in range(N+1)]
ANS=[str(N)]*N
if K>=50:
  ans=" ".join(ANS)
  print(ans)
else:
  for t in range(K):
    for i in range(N):
      l=max(0,i-A[i])
      r=min(N,i+A[i]+1)
      imos[l]+=1
      imos[r]-=1
    for i in range(0,N):
      imos[i+1]+=imos[i]
      A[i]=imos[i]
    imos=[0 for i in range(N+1)]
  for i in range(N):
    A[i]=str(A[i])
  ans=" ".join(A)
  print(ans)
r=map(int,input())
a=3(r*r)


### FIXED CODE ###

r=int(input())
a=3*(r*r)
print(a)
n,m = map(int,input().split())
ps = [0] * m
p = [0] * m
s = [0] * m
for i in range(m):
    ps[i] = list(map(str,input().split()))
if m = 0:
    print(0,0)
    exit()
cp=int(ps[0][0])
countA = [0] * n
countW = 0
cn = 0
for item in ps:
    if item[1] == 'AC':
        countA[int(item[0])-1] = 1
        countW += cn
        cp += 1
        cn = 0
    else:
        cn+=1
print(sum(countA),countW)

### FIXED CODE ###

n,m = map(int,input().split())
ps = [0] * m
for i in range(m):
    ps[i] = list(map(str,input().split()))
if m == 0:
    print(0,0)
    exit()
countA = [0] * n
countW = [0] * n
cn = 0
for item in ps:
    if item[1] == 'AC' and countA[int(item[0])-1] == 0:
        countA[int(item[0])-1] = 1
        cn += countW[int(item[0])-1]
    else:
        countW[int(item[0])-1] += 1
print(sum(countA),cn)
n = input()

count = 0

l = len(n)

if l % 2:
  num = n[1:l]
  count += int(num) + 1
  l -= 1

for i in range(l):
  tmp = 1
  if (i+1) % 2:
    for j in range(i+1):
      tmp *= 10
    tmp -= int(float(tmp) / float(10))
    count += tmp
    
print(count)

### FIXED CODE ###

n = input()

count = 0

l = len(n)

if l % 2:
  num = n[0:l]
  tmp = 1
  for i in range(l-1):
    tmp *= 10
  count += int(num) - tmp + 1
  l -= 1

for i in range(l):
  tmp = 1
  if (i+1) % 2:
    for j in range(i+1):
      tmp *= 10
    tmp -= int(float(tmp) / float(10))
    count += tmp
    
print(count)
N, K = map(int, input().split())
from operator import mul
from functools import reduce

def nCr(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

for j in range(K):
  if (2*j+1)>N:
    print(0)
  else:
    x = (nCr((K+j-2), j) * nCr(N-K+1, j+1)
    if x > 10**9+7:
         print(x%(10**9+7))
    else:
         print(x)
        

### FIXED CODE ###

N, K = map(int, input().split())
from operator import mul
from functools import reduce
 
def nCr(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under
 
for j in range(K):
  if (K+j)>N:
    print(0)
  else:
    x = (nCr((K-1), j) * nCr(N-K+1, j+1))
    if (x > (10**9+7)):
         print(x%(10**9+7))
    else:
         print(x)
n = list(input())
m = []

for i in n:
  if i == '0':
    m.append(0)
  elif i == '1':
    m.append(1)
  elif i == 'B':
    del m[-1]
    
ans = ''.join(map(str,m))
print(ans)    
    

### FIXED CODE ###

s = input()

res = ""
for x in s:
    if x =="B":
        res = res[:-1]
    else:
        res += x

print(res)
W,H,x,y,r = raw_input().split(" ")
if 0<(x+r)<W && 0<(y+r)<H:
    print "Yes"
else:
    print "No"

### FIXED CODE ###

a = raw_input().split(" ")
W = int(a[0])
H = int(a[1])
x = int(a[2])
y = int(a[3])
r = int(a[4])
if (x - r) >= 0 and (x + r) <= W and (y - r) >= 0 and (y + r) <= H:
    print "Yes"
else:
    print "No"
# 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    
    else:
        value=math.log(k)-math.log(i)
    po=(0.5)**value
    summ+=po
    
summ=summ/n
print('{0:.12f}'.format(summ))

### FIXED CODE ###

# cook your dish here
n,k=map(int,input().split())
s=input()
a=""
for i in range(n):
    if i==k-1:
        a+=(s[i].lower())
    else:
        a+=s[i]
print(a)
from scipy.sparse.csgraph import shortest_path
n = int(input())
mat=[[0]*n for i in range(n)]
for i in range(n-1):
    a, b, c = map(int, input().split())
    mat[a-1][b-1]=c
    mat[b-1][a-1]=c
q, k  = map(int, input().split())
distance = shortest_path(mat, directed = False, indices = [k-1], method = 'D')
for i in range(q):
    x, y = map(int, input().split())
    print(int(distance[0][x-1]+distance[0][y-1]))

### FIXED CODE ###

N = int(input())
List = [[] for _ in range(N)]
ans = [-1]*N
for i in range(N-1):
    a, b, c = map(int, input().split())
    List[a-1].append((b-1, c))
    List[b-1].append((a-1, c))
Q, K = map(int, input().split())
queue = [K-1]
ans[K-1] = 0
while queue:
    edge = queue.pop()
    for node in List[edge]:
        index, cost = node
        if ans[index]>0:
            continue
        ans[index] = ans[edge]+cost
        queue.append(index)
for i in range(Q):
    x, y = map(int, input().split())
    print(ans[x-1]+ans[y-1])
print(24+24-int(input())

### FIXED CODE ###

print(24+24-int(input()))
import numpy as np
N = input()
s = map(int, input().split())
count = 0
while True:
  if np.all( np.array(s)%2 == 0):
    count += 1
  else:
    break
print(count)


### FIXED CODE ###

import numpy as np
N = input()
s = np.array(list(map(int, input().split())))
count = 0
while True:
  _exp = 2**(count+1)
  if np.all( s%_exp == 0):
    count += 1
  else:
    break
print(count)
import math
import sys
sys.setrecursionlimit(10**7)
x,y = list(map(int, input().split()))
mod = 7 + (10**9)
ans = 0
def factorial(x):
    if x == 0 or x == 1:
        return 0
    k = (x * factorial(x)) % mod
    return k
if (x + y) % 3 != 0:
    print(0)
else:
    for i in range(x+1):
        if (x - i) % 2 != 0:
            continue
        else:
            l = (x - i) // 2
            if y == 2 * i + l:
                #print("k {},l {}".format(k,l))
                ans += factorial(i+l) / (factorial(i) * factorial(l))
                ans %= mod
print(ans)

### FIXED CODE ###

import math
x,y = list(map(int, input().split()))
mod = 7 + (10**9)
ans = 0
#互いに素なa,bについて、a*x+b*y=1の一つの解
def extgcd(a,b):
    r = [1,0,a]
    w = [0,1,b]
    while w[2]!=1:
        q = r[2]//w[2]
        r2 = w
        w2 = [r[0]-q*w[0],r[1]-q*w[1],r[2]-q*w[2]]
        r = r2
        w = w2
    #[x,y]
    return [w[0],w[1]]

# aの逆元(mod m)を求める。(aとmは互いに素であることが前提)
#a/b = a*(b`)となるb`を求める
def mod_inv(a,mod):
    x = extgcd(a,mod)[0]
    return (mod+x%mod)%mod
if (2 * x - y) % 3 != 0 or (2 * y - x) % 3 != 0:
    print(0)
    exit()
else:
    m = (2*x - y)//3
    n = (2*y - x)//3
    if n < 0 or m < 0:
        print(0)
        exit()
    #m+n C m を計算
    #(m+n)! / n! * m!を計算したいが、mod上で割り算できない。
    #逆元を使う
    factorial = [1]*(m+n+1)
    for i in range(1,m+n+1):
        factorial[i] = (factorial[i - 1] * i) % mod
    ans = factorial[m+n] * mod_inv(factorial[m], mod)
    ans %= mod
    ans *= mod_inv(factorial[n], mod)
    ans %= mod
    print(ans)
a,b,v,w,t = map(int,input().split())

d = abs(b-a)
p = abs(wt-vt)
i=0
for i in range(t):
  if p=d:
    print("YES")
  else:
    print("NO")


### FIXED CODE ###

a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
if v <= w:
    print('NO')
else:
    if 1 <= (abs(b - a) / (v - w)) <= t:
        print('YES')
    else:
        print('NO')
r,g,d=map(int, input().spilit)
if (100r+10g+d)%4==0:
  print("YES")
else: print("NO")

### FIXED CODE ###

a,b,c= map(int, input().split())
if (100*a+10*b+c) % 4 == 0:
    print('YES')
else:
    print('NO')