Harryxun/stf_run huggingface dataset:
import sys

K = int(sys.stdin.readline())
S = sys.stdin.readline().rstrip('\n')

# ## COMBINATION (MOD) ###
N_MAX = 10**6  # 問題サイズに合わせて変えておく
MOD = 10**9 + 7

fac = [1, 1]  # 元テーブル
facinv = [1, 1]  # 逆元テーブル
inv = [0, 1]  # 逆元テーブル計算用テーブル

for i in range(2, N_MAX + 1):
    fac.append((fac[-1] * i) % MOD)
    inv.append((-inv[MOD % i] * (MOD // i)) % MOD)
    facinv.append((facinv[-1] * inv[-1]) % MOD)


def cmb(n, r):
    if (r < 0 or r > n):
        return 0
    # r = min(r, n-r)
    return fac[n] * facinv[r] * facinv[n - r] % MOD

# K 文字追加
ans = 0

ln = len(S)

for i in range(ln,ln+K+1):

    # pre
    p = i - 1
    p1 = cmb(p, ln - 1)
    p2 = pow(25, p - (ln - 1), MOD)

    # suf
    s = (ln + K) - i
    s2 = pow(26, s, MOD)

    ans += p1*p2*s2 % MOD
    ans %= MOD

    # print(p, p1,p2, s, s2)

print(ans)

### FIXED CODE ###

import sys

K = int(sys.stdin.readline())
S = sys.stdin.readline().rstrip('\n')

# ## COMBINATION (MOD) ###
N_MAX = 10**6  # 問題サイズに合わせて変えておく
MOD = 10**9 + 7

inv = [0, 1]  # 逆元テーブル計算用テーブル

for i in range(2, N_MAX + 2):
    inv.append((-inv[MOD % i] * (MOD // i)) % MOD)

# K 文字追加
ans = 0

ln = len(S)

p1 = 1
p2 = 1
s2 = pow(26, K, MOD)

for i in range(1, K + 2):

    ans += (p1 * p2 * s2) % MOD
    ans %= MOD

    # print(p1, p2, s2)

    # pre
    p1 = (p1 * (ln + i - 1) * inv[i]) % MOD
    p2 = (p2 * 25) % MOD

    # suf
    s2 = (s2 * inv[26]) % MOD

print(ans)
depth = int(input()) 
leaves = list(map(int, input().split(" ")))
limited = []
def find( i, depth) :
    if i == depth :
        limited.append(leaves[i])
        return ( leaves[i], (leaves[i]+1)//2 )
    _max, _min = find(i+1, depth)
    _max = min(pow(2,i), _max+leaves[i])
    _min += leaves[i]
    if _max < _min :
        return (-float('inf'), float('inf') )
    limited.append(_max)
    return ( _max, (_min+1)//2 )

find(0, depth) 
if len(limited) != depth+1 :
    print(-1)
else :
    ans = 0
    cur = 1
    leaves.append(0)
    for i in range(depth+1) :
        ans += min(cur, limited[-i-1])
        cur = (cur-leaves[i])*2  
    
    print(ans)

### FIXED CODE ###

depth = int(input()) 
leaves = list(map(int, input().split(" ")))
limited = []
limited_a = []

def solve (depth) :
    cur = 1
    i = 0 
    while i <= depth :
        limited_a.append( cur )
        if cur <= 0 and leaves[i] != 0 :
            return False
        cur=(cur-leaves[i])*2
        i+=1 
    
    _min = _max = 0
    i = depth
    while i >= 0 :
        if i==depth: 
            if leaves[i] > limited_a[i] :
                return False
            limited.append(leaves[i])
            _max = leaves[i]
            _min = (leaves[i]+1)//2
        else :
            _max = min(limited_a[i], _max+leaves[i])
            _min = (_min+leaves[i]+1)//2
            if _max < _min :
                return False 
            limited.append(_max)
        i -= 1
    return True

if solve(depth) :
    print(sum(limited))
else :
    print (-1)
a,b,c,d= map(int,input().split())
if a+b+c+d==7:
  print(str(a)+'+'+str(b)+'+'+str(c)+'+'+str(d)+'=7')
elif a+b+c-d==7:
  print(str(a)+'+'+str(b)+'+'+str(c)+'-'+str(d)+'=7')
elif a+b-c+d==7:
  print(str(a)+'+'+str(b)+'-'+str(c)+'+'+str(d)+'=7')
elif a-b+c+d==7:
  print(str(a)+'-'+str(b)+'+'+str(c)+'+'+str(d)+'=7')
elif a+b-c-d==7:
  print(str(a)+'+'+str(b)+'-'+str(c)+'-'+str(d)+'=7')
elif a-b+c-d==7:
  print(str(a)+'-'+str(b)+'+'+str(c)+'-'+str(d)+'=7')
elif a-b-c+d==7:
  print(str(a)+'-'+str(b)+'-'+str(c)+'+'+str(d)+'=7')
else:
  print(str(a)+'-'+str(b)+'-'+str(c)+'-'+str(d)+'=7')

### FIXED CODE ###

a,b,c,d= map(int,input())
if a+b+c+d==7:
  print(str(a)+'+'+str(b)+'+'+str(c)+'+'+str(d)+'=7')
elif a+b+c-d==7:
  print(str(a)+'+'+str(b)+'+'+str(c)+'-'+str(d)+'=7')
elif a+b-c+d==7:
  print(str(a)+'+'+str(b)+'-'+str(c)+'+'+str(d)+'=7')
elif a-b+c+d==7:
  print(str(a)+'-'+str(b)+'+'+str(c)+'+'+str(d)+'=7')
elif a+b-c-d==7:
  print(str(a)+'+'+str(b)+'-'+str(c)+'-'+str(d)+'=7')
elif a-b+c-d==7:
  print(str(a)+'-'+str(b)+'+'+str(c)+'-'+str(d)+'=7')
elif a-b-c+d==7:
  print(str(a)+'-'+str(b)+'-'+str(c)+'+'+str(d)+'=7')
else:
  print(str(a)+'-'+str(b)+'-'+str(c)+'-'+str(d)+'=7')
n = int(input())
l = []
l2 = []

for i in range(n):
    a, b = list(map(int, input().split()))
    l.append([a,b])
l.sort()

for i in range(len(l)-1):
    for j in range(i+1, len(l)):
        dif1 = l[i][0] - l[j][0]
        dif2 = l[i][1] - l[j][1]
        l2.append(str(dif1) + ' ' + str(dif2))
##print(l2)

try:
    cnt = max(l2, key=l2.count)
except:
    cnt = "1000000 1000000"
x, y = list(map(int, cnt.split()))

ans = 0

for i in range(len(l)):
    if [l[i][0] + x, l[i][1] + y] in l:
        ans += 1

print(n - ans)


### FIXED CODE ###

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

if k == 1:
    print(0)
else:
    print(n-k)
import math

N = int(input())
A = list(map(int,input().split()))

mini = min(A)
ans = min(A)
for a in A:
    amari = a%mini
    if amari != 0:
        if amari < ans:
            ans = amari            
if mini - ans == 0:
    print(ans)
else:
    print(math.gcd(mini, ans))

### FIXED CODE ###

from fractions import gcd

N = int(input())
A = list(map(int,input().split()))

a = sorted(A)
B = [a[0]]
C = []
for i in range(1,N):
    x = a[i]%a[0]
    if x != 0:
        B.append(x)
b =sorted(B)
for i in range(len(b)-1):
    y = gcd(b[i],b[-1])
    C.append(y)
    
if len(b) == 1:
    print(b[0])
else:
    print(min(C))
n,m=map(int,input().split())
a=0
ans=[]
for _ in range(n):
  ans.append('a')
for i in range(m):
  s,c=map(int,input().split())
  if ans[s-1]!='a' and ans[s-1]!=str(c):
    a=-1
  ans[s-1]=str(c)
if ans[0]=='a' and n!=1:
  ans[0]='1'

if ans[0]=='0' and n!=1:
  a=-1
if ans[0]=='a' and n==1:
  ans[0]='0'
for j in range(n):
  if ans[j]=='a':
    ans[j]='0'
if a==-1:
  print(a)
else:
  print(''.join(ans))

### FIXED CODE ###

n=int(input())
print(n//2+n%2)
CH = [0,1,1,2,1,2,1,2,1,2,1,2,1,2,2,3,1,2,1,2,1]
N = int(input())
X = input()
s = 0
a = 1
A = []
B = []
for x in X:
    if x == "1":
        s += 1
for i in range(N):
    A.append(a)
    a = a*2 %(s+1)
a = 1
for i in range(N):
    B.append(a)
    a = a*2 %(s-1)
num = int(X,2)
num1 = num%(s+1)
if s > 1:
    num2 = num%(s-1)
for i in range(N):
    if int(X[i])==1:
        p = s-1
        if p == 0:
            print(0)
            continue
        x = (num2-B[N-1-i])%p
        if x > 20:
            y = x%sum(map(int,list(bin(x))[2:]))
            print(2+CH[y])
        else:
            print(1+CH[x])
    else:
        p = s+1
        x = (num1+A[N-1-i])%p
        if x > 20:
            y = x%sum(map(int,list(bin(x))[2:]))
            print(2+CH[y])
        else:
            print(1+CH[x])

### FIXED CODE ###

CH = [0,1,1,2,1,2,1,2,1,2,1,2,1,2,2,3,1,2,1,2,1]
N = int(input())
X = input()
s = 0
a = 1
A = []
B = []
for x in X:
    if x == "1":
        s += 1
for i in range(N):
    A.append(a)
    a = a*2 %(s+1)
a = 1
num = int(X,2)
num1 = num%(s+1)
if s > 1:
    num2 = num%(s-1)
    for i in range(N):
        B.append(a)
        a = a*2 %(s-1)
for i in range(N):
    if int(X[i])==1:
        p = s-1
        if p == 0:
            print(0)
            continue
        x = (num2-B[N-1-i])%p
        if x > 20:
            y = x%sum(map(int,list(bin(x))[2:]))
            print(2+CH[y])
        else:
            print(1+CH[x])
    else:
        p = s+1
        x = (num1+A[N-1-i])%p
        if x > 20:
            y = x%sum(map(int,list(bin(x))[2:]))
            print(2+CH[y])
        else:
            print(1+CH[x])
from sys import stdin, setrecursionlimit
from math import gcd

setrecursionlimit(10 ** 9)
INF = 1 << 60


def input():
    return stdin.readline().strip()


MOD = 1000000007

N = int(input())
G = [[] for _ in range(N)]
for _ in range(N - 1):
    a, b = map(int, input().split())
    G[a - 1].append(b - 1)
    G[b - 1].append(a - 1)

childs = [0] * N
seen = [False] * N
prev = [-1] * N


def dfs1(v):
    seen[v] = True
    c = 0
    for nv in G[v]:
        if not seen[nv]:
            prev[nv] = v
            dfs1(nv)
            c += childs[nv] + 1
    childs[v] = c
    return


dfs1(0)

numer = 0
seen = [False] * N

pow2 = pow(2, N - 1, MOD)


def dfs2(v):
    global numer
    seen[v] = True
    nodes = []
    if prev[v] != -1:
        nodes.append(N - childs[v] - 1)
    for nv in G[v]:
        if not seen[nv]:
            nodes.append(childs[nv] + 1)
    if len(nodes) > 1:
        this_numer = pow2 - (sum(pow(2, n, MOD) - 1 for n in nodes) + 1)
        numer = (numer + this_numer) % MOD
    for nv in G[v]:
        if not seen[nv]:
            dfs2(nv)
    return


dfs2(0)
denom = pow(2, N, MOD)
ans = numer * pow(denom, MOD - 2, MOD) % MOD
print(ans)


### FIXED CODE ###

from sys import stdin, setrecursionlimit
from collections import deque

setrecursionlimit(10 ** 9)
INF = 1 << 60


def input():
    return stdin.readline().strip()


MOD = 1000000007
N = int(input())
G = [[] for _ in range(N)]
for _ in range(N - 1):
    a, b = map(int, input().split())
    G[a - 1].append(b - 1)
    G[b - 1].append(a - 1)

pow2 = [1] * (N + 1)
for i in range(N):
    pow2[i + 1] = pow2[i] * 2 % MOD

order = []
parent = [-1] * N

stack = deque([0])
while stack:
    v = stack.pop()
    order.append(v)
    for nv in G[v]:
        if parent[v] != nv:
            parent[nv] = v
            stack.append(nv)

numer = 0
nums = [0] * N

for v in reversed(order):
    tmp = 1
    for nv in G[v]:
        if parent[v] != nv:
            c = nums[nv] + 1
            nums[v] += c
            tmp += pow2[c] - 1
    tmp += pow2[N - nums[v] - 1] - 1
    numer = (numer + pow2[N - 1] - tmp) % MOD

denom = pow2[N]
ans = numer * pow(denom, MOD - 2, MOD) % MOD
print(ans)
a,b,x = list(map(int,input().split()))
if a*10**9+b*10 <= x:
  print(10**9)
elif a+b > x:
  print(0)
else:
  for i in range(9,0,-1):
    y = (x - i*b)//a
    if len(str(y))==i:
      if y<0:
        continue
      print(y)
      break
  else:
    print(0)

### FIXED CODE ###

s = input()
x = ['SUN', 'MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT']
print(7-x.index(s))
n=int(input())
  print(n*3.1415923535897932)

### FIXED CODE ###

n=int(input())
print(2*n*3.14159235359)
n = int(input())
r = []
for i in range(n):
    city, score = map(str, input().split())
    score = int(score)
    r.append((city, score, i+1))

r.sort(key=lambda x: x[1], reverse=True)
r.sort(key=lambda x: x[0])

for x in r:
    print(x[2])


### FIXED CODE ###

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

print((3*a + p) // 2)
A,B,C = map(int(),input().split())
print(C-A+B)

### FIXED CODE ###

A,B,C = map(int,input().split())
X = C - A + B
if X < 0:
    X = 0
print(X)
N = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(N):
    S = input()
    if S == AC:
        ac+=1
    elif S == "WA":
        wa += 1
    elif S== "TLE":
        tle += 1
    elif S == "RE":
        re += 1
print(f'AC x {ac}'' )
print(f'WA x {wa}'' )
print(f'TLE x {tle}'' )
print(f'RE x {re}'' )

### FIXED CODE ###

N = int(input())
ac = 0
wa = 0
tle = 0
re = 0
for i in range(N):
    S = input()
    if S == "AC":
        ac+=1
    elif S == "WA":
        wa += 1
    elif S== "TLE":
        tle += 1
    elif S == "RE":
        re += 1
print(f'AC x {ac}')
print(f'WA x {wa}')
print(f'TLE x {tle}' )
print(f'RE x {re}')
N =input()
if N >=30:
    print('Yes')
else :
    print('No')


### FIXED CODE ###

N = int(input())
if N >=30:
    print('Yes')
else :
    print('No')
monster, skill = map(int,input().split())

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

monster_hp.sort()

attack_count = 0

while(skill>0):
    skill -= 1
    monster_hp.pop(-1)

for hp in monster_hp:
    attack_count += hp

print(attack_count)

### FIXED CODE ###

monster, skill = map(int,input().split())

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

monster_hp.sort()

attack_count = 0

while(skill>0):
    skill -= 1
    if len(monster_hp) > 0:    
        monster_hp.pop(-1)
    

for hp in monster_hp:
    attack_count += hp

print(attack_count)
a,b,t = map(int,input().split())

for i in range(20):
    if i * a > t:
        ans = (a-1) * b
        break

print(ans)

### FIXED CODE ###

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

print(b*(t//a))
import numpy as np

n = int(input())
a = np.array(list(map(int, input().split())))

def xor_(x, y):
    p, q = tuple(sorted([x, y]))
    p = np.array(list(bin(p)))
    q = np.array(list(bin(q)))

    i = -1
    r = str()
    while p[i] != 'b':
        if p[i] == q[i]:
            r = '0' + r
        else:
            r = '1' + r
        i -= 1

    while q[i] != 'b':
        r = q[i] + r
        i -= 1
    
    r = '0b' + r

    return(int(r, 0))

sum = 0
for i in range(n-1):
    for j in range(i+1, n):
        sum += xor_(a[i], a[j])
        sum = sum % (10**9 + 7)

print(sum)


### FIXED CODE ###

#!/usr/bin/env python

def main():
    n = int(input())
    a = list(map(int, input().split()))
    mod = 10 ** 9 + 7

    ret = 0
    magni = 1
    for j in range(60):
        bin_cnt = [0, 0]
        for i in range(n):
            a[i], b = divmod(a[i], 2)
            bin_cnt[b] += 1
        x, y = bin_cnt
        ret += x * y * magni % mod
        magni = magni * 2 % mod

    ret %= mod

    print(ret)


if __name__ == '__main__':
    main()
while True
  a,op,b = raw_input().split
  a,b = map(int,[a,b])

  if op == "?":
     break

  if op == "+":
     print a+b
  if op == "-":
     print a-b
  if op == "*":
     print a*b
  if op == "/":
     print a/b

### FIXED CODE ###

while True:
  a,op,b = raw_input().split()
  a,b = map(int,[a,b])

  if op == "?":
     break

  if op == "+":
     print (a+b)
  elif op == "-":
     print (a-b)
  elif op == "*":
     print (a*b)
  elif op == "/":
     print (a/b)
a = int(input())
 p = list(map(int,input().split()))
 count = 0
 for i in range(a):
     for s in range(a):
         for t in range(a):
             if p[t]<p[s]<p[i] and p[t]+p[s]>p[i]:
                 count+=1
print(count)

### FIXED CODE ###

a = int(input())
p = list(map(int,input().split()))
count = 0

for i in range(a):
     for s in range(a):
         for t in range(a):
             if p[t]<p[s]<p[i] and p[t]+p[s]>p[i]:
                 count+=1
print(count)
a,b,c = map(int,raw_input().split())
for i in range(a,b):
	if c % i == 0:
		count += 1
print count

### FIXED CODE ###

a,b,c = map(int,raw_input().split())
count = 0
if a == b :
	if c % a == 0:
		count += 1
else:
	for i in range(a,b+1):
		if c % i == 0:
			count += 1
print count
x = int(input())
y = int(input())

print(x + y/2)


### FIXED CODE ###

x,y = tuple(map(int,input().split()))

answer = int(x) + int(y)/2

print(int(answer))
import collections

N =int(input())

As = [int(item) for item in input().split()]

cnt = 0

Bs = collections.deque()

min1 = 1000000000000

for i in As:

	if As < 0:
      cnt +=1

	Bs.append(abs(i))

	mim1=min(min1, abs(i))

	

if cnt % 2 =0:

	print(sum(list(Bs)))

else:

	print(sum(list(Bs))-min1*2)

### FIXED CODE ###

import collections
N =int(input())
As = [int(item) for item in input().split()]

cnt = 0
Bs = collections.deque()
min1 = 1000000000000

for i in As:
	if i < 0:
		cnt +=1
	Bs.append(abs(i))
	min1=min(min1, abs(i))
	
if cnt % 2 ==0:
	print(sum(list(Bs)))
else:
	print(sum(list(Bs))-min1*2)
S = list(input())
num_first = 0
num_last = 0
for i in range(len(S)):
    if S[i] == 'A':
        num_first = i
        break
for j in range(num_first, len(S)+1):
    if S[j] == 'Z':
        num_last = j
print(num_last - num_first + 1)


### FIXED CODE ###

S = list(input())
num_first = 0
num_last = 0
for i in range(len(S)):
    if S[i] == 'A':
        num_first = i
        break
S.reverse()
for j in range(len(S)):
    if S[j] == 'Z':
        num_last = len(S) - j
        break
print(num_last - num_first)
a,b = map(int,input().split())
if a%3==0 \or b%==0 \or (a+b)%3==0:
  print("Possible")
else:
  print("Impossible")

### FIXED CODE ###

a,b=map(int,input().split())
if a*b*(a+b)%3==0:
  print("Possible")
else:
  print("Impossible")
import fractions
N = input()
k = fraction.gcd(2, N)
print(2*N / k)

### FIXED CODE ###

import fractions
N = int(input())
def lcm(x, y):
    return (x * y) / fractions.gcd(x, y)

print(int(lcm(2, N)))
a,b=input().split()
x,d,y,z=b
nb=int(x)+(y+z)/100
print(int(a*nb))

### FIXED CODE ###

from decimal import Decimal
a,b=map(Decimal,input().split())
print(int(a*b))
def min_steps_v2(n, a, b):
    n = np.int64(n)
    a = np.int64(a)
    b = np.int64(b)

    if (b - a) % 2 == 0:
        return np.int64(int(b - a) // 2)
 
    # odd case
    a_diff = a - 1
    b_diff = n - b
 
    if a_diff > b_diff:
      steps_to_even = n - b + 1
      remain_steps = min_steps_v2(n, a + (n - b) + 1, n)
    else:
      steps_to_even = a
      remain_steps = min_steps_v2(n, 1, b - a)
 
    return steps_to_even + remain_steps

numbers = input().split(' ')
 
n = int(numbers[0])
a = int(numbers[1])
b = int(numbers[2])
 
print(min_steps_v2(n, a, b))


### FIXED CODE ###

import numpy as np

def min_steps_v2(n, a, b):
    n = np.int64(n)
    a = np.int64(a)
    b = np.int64(b)

    if (b - a) % 2 == 0:
        return np.int64(int(b - a) // 2)
 
    # odd case
    a_diff = a - 1
    b_diff = n - b
 
    if a_diff > b_diff:
      steps_to_even = n - b + 1
      remain_steps = min_steps_v2(n, a + (n - b) + 1, n)
    else:
      steps_to_even = a
      remain_steps = min_steps_v2(n, 1, b - a)
 
    return steps_to_even + remain_steps

numbers = input().split(' ')
 
n = int(numbers[0])
a = int(numbers[1])
b = int(numbers[2])
 
print(min_steps_v2(n, a, b))
import bisect
def main():
  X, N = map(int, input().split())
  if N == 0:
    print(X)
    return
  P = set(map(int, input().split()))

  NP = sorted(list(set(range(101)) - P))
  right = bisect.bisect(NP, X)
  left = right - 1
  if abs(X - NP[left]) <= abs(X - NP[right]):
    print(NP[left])
  else:
    print(NP[right])
    
main()

### FIXED CODE ###

import bisect
def main():
  X, N = map(int, input().split())
  if N == 0:
    print(X)
    return
  P = set(map(int, input().split()))

  NP = sorted(list(set(range(102)) - P))
  right = bisect.bisect(NP, X)
  left = right - 1
  if left == -1 or abs(X - NP[left]) > abs(X - NP[right]):
    print(NP[right])
  else:
    print(NP[left])

main()
n, b=list(map(int,input().split()))

import math

#x=int(min(n-b+1,b))

#for i in range(1,x+1):
for i in range(1,b+1):
	#if n-b+1<i or b-1<i-1:
		#break
	y=math.factorial(n-b+1)/math.factorial(n-b+1-i)/math.factorial(i)
	z=math.factorial(b-1)/math.factorial(b-i)/math.factorial(i-1)
	res=int(y*z%(1000000000+7))
	print(res)

### FIXED CODE ###

n, b=list(map(int,input().split()))

import math

#x=int(min(n-b+1,b))

#if n==b:
#  print('1')
#  for i in range(b-1):
#    print('0')
#else:
#for i in range(1,x+1):
for i in range(1,b+1):
	if i-1 > n-b:
	# 境界を i-1 個作らなければならないが、赤いボールの数 n-k よりもこれが多いと条件を満たす置き方は存在しない
		print(0)
 	#if n-b+1<i or b-1<i-1:
		#break
	else:
		y=math.factorial(n-b+1)//(math.factorial(n-b+1-i)*math.factorial(i))
		z=math.factorial(b-1)//(math.factorial(b-i)*math.factorial(i-1))
		res=int(y*z%(1000000000+7))
		print(res)


#from math import factorial
 
#N, K= map(int, input().split())
 
#def ncr(n, r):
#    return factorial(n) // (factorial(r) * factorial(n - r)) 
 
#for i in range(1, K+1):
#    if i <= N-K+1:
#        print(ncr(K-1, i-1) * ncr(N-K+1, i) % (10**9 + 7))
#    else:
#        print(0)
N,K = map(int, input().split())
A = list(map(int, input().split()))

l,r = 0,max(A)
while l<r:
	m = (l+r)//2
	s = sum([a//m+(not a%m==0)-1 for a in A])
	if s <= K:
		r = m
	else:
		l = m+1
print(r)

### FIXED CODE ###

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

l,r = 1,max(A)
while l<r:
	m = (l+r)//2
	s = sum([a//m+(not a%m==0)-1 for a in A])
	if s <= K:
		r = m
	else:
		l = m+1
print(r)
n = input()
c=0
for x in n:
    if x=="7":
        print("Yes")
        c+=1
        break
    else:
        pass
if c=3:
    print("No")

### FIXED CODE ###

n = input()
n_list = []
for i in n:
    n_list.append(i)

print("Yes") if n_list[0] == "7" or n_list[1] == "7" or n_list[2] == "7" else print("No")
n = int(input())
w = [input() for i in range(n)]
if n == len(set(w)) and w[i-1][-1] == w[i][0] for i in range(1,n):
    print('Yes')
else:
    print('No')

### FIXED CODE ###

n = int(input())
w = [input() for i in range(n)]
x = False
if n == len(set(w)):
    if all([w[i-1][-1] == w[i][0] for i in range(1,n)]):
        x = True
print('Yes' if x else 'No')
H, W = list(map(int, input().split()))
N = int(input())
A = []
a = list(map(int, input().split()))
for i in range(N):
    A += [a[i]] * (i + 1)

L = [[0 for i in range(W)] for j in range(H)]
for i in range(H * W):
    if int((i // W)) % 2 == 0:
        L[int((i // W))][i % W] = A[i]
    else:
        L[int((i // W))][-1 - i % W] = A[i]

for i in range(H):
    L[i] = list(map(str, L[i]))


for i in range(H):
    print(" ".join(L[i]))

### FIXED CODE ###

H, W = list(map(int, input().split()))
N = int(input())
A = []
a = list(map(int, input().split()))
for i in range(N):
    A += [i + 1] * a[i]

L = [[0 for i in range(W)] for j in range(H)]
for i in range(H * W):
    if int((i // W)) % 2 == 0:
        L[int((i // W))][i % W] = A[i]
    else:
        L[int((i // W))][-1 - i % W] = A[i]

for i in range(H):
    L[i] = list(map(str, L[i]))


for i in range(H):
    print(" ".join(L[i]))
N = input()
N = int(N)

if N ==1:
print N:
elif N%2 == 0:
    a = 0.5
    a = float(a)
elif N % 2 == 1:
    a = (N/2 + 1)/N

print a
    

### FIXED CODE ###

A = input()
N = int(A)


if N ==1:
    a = 1
elif N%2 == 0:
    a = 0.5
    a = float(a)
elif N%2 == 1:
    a = (N//2 + 1)/N

print(a)
N = input()
data = input().split()
bef = -1
count = 0
result = 0
for i in data:
	if bef != data[i]:
		if count > 1:
			result += int(count) / 2
		count = 1
		bef = data[i]
	else:
		count++
print(result)

### FIXED CODE ###

N = input()
data = input().split()
bef = -1
count = 0
result = 0

for i in range(len(data)):
	t = int(data[i])
	if bef != t:
		if count > 1:
			result += int(count / 2)
		count = 1
		bef = t
	else:
		count += 1

if count > 1:
	result += int(count / 2)
print(result)
from decimal import *
def main():
    A , B = input().split()
    A = float(A)
    B = float(B)
    C = Decimal(A) * Decimal(B)
    #print(C)
    D = str(C)
    D = D.split(".")[0]
    #print(D)
    E = int(D)
    print(E)



if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    import decimal
    A , B = map(decimal.Decimal, input().split())
    C = decimal.Decimal(A) * decimal.Decimal(B)
    #print(C)
    D = str(C)
    D = D.split(".")[0]
    #print(D)
    E = int(D)
    print(E)



if __name__ == '__main__':
    main()
n=int(input())
a=list(map(int,input()))
DIV=10**9+7
ans=0
if n%2==0:
  ans=a[0]
  for i in range(1,len(a)):
    ans+=ans^a[i]
    ans%=DIV
else:
  ans=a[0]^a[0]
  for i in range(1,len(a)):
    ans+=ans^(a[i]^a[i])
    ans%=DIV
print(ans)
              

### FIXED CODE ###

n=int(input())
A=list(map(int,input().split()))
binA=[None]*n
for i in range(n):
  binA[i]=bin(A[i])[2:]
  
keta=[0]*60
for i in range(n):
  tar=binA[i]
  for j in range(len(tar)-1,-1,-1):
    if tar[j]=="1":
      keta[len(tar)-1-j]+=1

pair=[0]*60
for i in range(len(keta)):
  pair[i]=keta[i]*(len(A)-keta[i])
  
ans=0
mul=1
DIV=10**9+7
for i in range(len(pair)):
  ans+=pair[i]*mul
  ans%=DIV
  mul*=2
print(ans)
import fractions
from functools import reduce

n, m = map(int, input().split())
a = list(map( (lambda x: int(x)/2), input().split()))

div_num = [0 for _ in range(n)]
same = True

for i in range(n):
    tmp = a[i]
    while tmp%2 == 0:
        tmp // = 2
        div_num[i] += 1
    if div_num[0] != div_num[i]:
        same = False
        break

if same
    lcm = reduce(lambda x, y: (x*y)//fractions.gcd(x, y), a)
    print(int((m/lcm + 1)//2))
else:
    print(0)

### FIXED CODE ###

import fractions
from functools import reduce

n, m = map(int, input().split())
a = list(map( (lambda x: int(x)//2), input().split()))

div_num = [0 for _ in range(n)]
same = True
for i in range(n):
    tmp = a[i]
    while tmp%2 == 0:
        tmp //= 2
        div_num[i] += 1
if len(set(div_num)) != 1:
    same = False

if same:
    lcm = reduce(lambda x, y: (x*y)//fractions.gcd(x, y), a)
    print(int((m/lcm + 1)//2))
else:
    print(0)
from math import pi

R = int(input)
h = 2*R*pi
print(h)

### FIXED CODE ###

R = int(input())
h = 2*R*3.14

print(h)