Harryxun/stf_run huggingface dataset:
import numpy as np
n, q = map(int, input().split())

e = np.eye(n+1, dtype=int)
for i in range(n-1):
    a, b = map(int, input().split())
    e[a][b] = 1
print(reversed(range(2, n+1)))
for i in reversed(range(2, n+1)):
    for j in range(1, i-1):
        if e[i-j][i] == 1:
            e[i-j][i+1:] += e[i][i+1:]
        else:
            continue


point = np.zeros(n, dtype=int)
for i in range(q):
    p, x = map(int, input().split())
    point[p-1] += x

ans = np.dot(point, e[1:, 1:])
print(*ans)

### FIXED CODE ###

from collections import deque
n, q = map(int, input().split())
tree = [[] for _ in range(n+1)]
cnt = [0] * (n+1)

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

for _ in range(q):
    p, x = map(int, input().split())
    cnt[p] += x

queue = deque([1])
visited = {1}
while queue:
    now = queue.popleft()
    visited.add(now)
    for t in tree[now]:
        if t in visited:
            pass
        else:
            queue.append(t)
            cnt[t] += cnt[now]

print(*cnt[1:])
a*+a**2+a***3

### FIXED CODE ###

a=int(input())
print(a+a**2+a**3)
N= int(input())

bit = bin(N)[2:]
k = len(bit)
dp = [[0] * 2 for i in range(len(bit) + 1)]
for i in range(k):
	j = int(bit[k-i+1])
	a,b,c = [(1,0,0),(1,1,0)][j]
	d,e,f = [(2, 1, 1),(1, 2, 2)][j]
	dp[i+1][0] = a * dp[i][0] + b * dp[i][1] + c * 3**i
	dp[i+1][1] = d * dp[i][0] + e * dp[i][1] + f * 3**i

print(dp[k][0])
    
        


### FIXED CODE ###

N= int(input())
bit = bin(N)[2:]
k = len(bit)
dp = [[0] * 2 for i in range(len(bit) + 1)]
dp[0][0] = 1
dp[0][1] = 1
for i in range(k):
	j = int(bit[k-i-1])
	a,b,c = [(1,0,0),(1,1,0)][j]
	d,e,f = [(1, 1, 1),(0, 1, 2)][j]
	dp[i+1][0] = (a * dp[i][0] + b * dp[i][1] + c * 3**i) % 1000000007
	dp[i+1][1] = d * dp[i][0] + e * dp[i][1] + f * 3**i % 1000000007

print(dp[k][0])
nums=list(map(int,input().split()))

if nums[3] > nums[2] and nums[2] > nums[1]:
	print("Yes")
else:
	print("No")

### FIXED CODE ###

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

if nums[2] > nums[1] and nums[1] > nums[0]:
	print("Yes")
else:
	print("No")
n, x = input().split()
bg = "P"
for i in range(0, int(n)):
  bg = "B" + bg + "P" + bg + "B"
print(bg[-(int(x)):].count("P"))

### FIXED CODE ###

def md_burger(n, x):
  if x == 1:
    if n == 0:
      return 1
    else:
      return 0
  elif 1 < x < a[n-1]+2:
    return md_burger(n-1, x-1)
  elif x == a[n-1]+2:
    return p[n-1]+1
  elif a[n-1]+2 < x < 2*a[n-1]+3:
    return p[n-1]+1+md_burger(n-1, x-2-a[n-1])
  else:
    return 2*p[n-1]+1

if __name__=="__main__":
  n, x = input().split()
  a = [1]
  p = [1]
  for i in range(0, int(n)):
    a.append(a[i] * 2 + 3)
    p.append(p[i] * 2 + 1)
  print(md_burger(int(n), int(x)))
import numpy as np

# N = 3
# M = 7
# x_list = sorted([-10, -3, 0, 9, -100, 2, 17])

(N, M) = list(map(int, input().split()))
x_list = sorted(list(map(int, input().split())))


def rl_dist(x_point):

    p_num = len(x_point)
    d_list = []
    d_dict = {}
    for num, (a, b) in enumerate(zip(x_point, x_point[1:])):
        d = (b-a)
        if x_point[num] not in d_dict.keys():
            d_dict[x_point[num]] = [d]
            if num==0:
                d_dict[x_point[num]] = np.mean(d_dict[x_point[num]])
        else:
            d_dict[x_point[num]].append(d)
            
            if len(d_dict[x_point[num]])==2:
                d_dict[x_point[num]] = np.mean(d_dict[x_point[num]])
                
            
        if x_point[num+1] not in d_dict.keys():
            d_dict[x_point[num+1]] = [d]
            
            if num+1==p_num-1:
                d_dict[x_point[num+1]] = np.mean(d_dict[x_point[num+1]])
                
    return d_dict
            
    
rl_dict = rl_dist(x_list)
        
first_set = list(set([p[0] for p in sorted(rl_dict.items(), key=lambda x: x[1])[-1*N:] ]))
print("First Set", first_set)

rem = list(set(x_list) - set(first_set))
print("First Remain", rem)

cost = 0

current_point = first_set

while len(rem)>0:
    d_list = []
    best = 10**5
    best_list = []
    
    for fp in current_point:
        for r in rem:
            if fp==r:
                continue
                
            d = abs(fp-r)
            if d<best:
                best = d
                best_list = [fp, r]
    
    print("Next", best, best_list)
    cost += best
    
    bef_point = best_list[0]
    new_point = best_list[1]
    rem = set(rem) - set([new_point])
    
    idx = current_point.index(bef_point)
    current_point[idx] = new_point
    
print(cost)

### FIXED CODE ###

N, M = map(int, input().split())
X = sorted(list(map(int, input().split())))

if N>=M:
    print(0)
else: 
    dist = [b-a for a, b  in zip(X, X[1:])]
    dist.sort()
    print(sum(dist[:M-N]))
n,m = map(int,input().split())
xx = [int(input()) for _ in range(m)]
mod = 10**9+7
dp = [1]*(n+1)
for i in range(m):
    dp[int(input())] =0

for i in range(2,n+1):
    if dp[i]!=0:
        dp[i]=dp[i-1]+dp[i-2]

print(dp[n]%mod)


### FIXED CODE ###

n,m = map(int,input().split())
mod = 10**9+7
dp = [1]*(n+1)
for i in range(m):
    dp[int(input())] =0

for i in range(2,n+1):
    if dp[i]!=0:
        dp[i]=dp[i-1]+dp[i-2]

print(dp[n]%mod)
import math
A,B,C,D = map(int, input().split())


def lcm(x, y):
    return (x * y) // math.gcd(x, y)

t = lcm(C, D)


# C = 2
# D = 2

m = B - (math.floor(B / C) + math.floor(B / D) - math.floor(B / (t)))
 
n = A-1 - (math.floor((A-1) / C) + math.floor((A-1) / D ) - math.floor((A-1) / (t)))

print(m-n)

### FIXED CODE ###

from fractions import gcd
 
A, B, C, D = map(int, input().split())
t = C * D // gcd(C, D)
print((B - (A - 1)) - (B//C + B//D - B//t) + ((A-1)//C + (A-1)//D - (A-1)//t))
n, tm = map(int, input().split())
ctl = []
for i in range(n):
    c, t = map(int, input().split())
    ctl.append([c, t])

filctl = []
for elm in ctl:
    if elm[1] <= tm:
        filctl.append(elm)

filctl = sorted(filctl)
print(filctl[0])

### FIXED CODE ###

n, tm = map(int, input().split())
ctl = []
for i in range(n):
    c, t = map(int, input().split())
    ctl.append([c, t])

filctl = []
for elm in ctl:
    if elm[1] <= tm:
        filctl.append(elm)
if len(filctl) != 0:
    filctl = sorted(filctl)
    print((filctl[0])[0])
else:
    print("TLE")
n = input()
words_org = []
for i in range(int(n)):
  words_org.append(input())

countDic = { k: words_org.count(k) for k in set(words_org) }
ranking = sorted([item for item in countDic.items()], key = lambda x:x[1], reverse=True)
order = 0
top = ranking[0][1]
candidates = []
while ranking[order][1] == top:
  candidates.append(ranking[order][0])
  order += 1
for word in sorted(candidates):
  print(word)

### FIXED CODE ###

N = input()
dic = {}
max = 0
for i in range(int(N)):
  word = input()
  if word not in dic.keys():
    
    if max == 0:
      max += 1
    dic[word] = 1
    
  else:
    
    if max == dic[word]:
      max += 1
    dic[word] += 1

candidates = sorted([word for word in dic.keys() if dic[word] == max])
for word in candidates:
  print(word)
N = int(input())
X = list(map(int,input().split()))

ans=10**10
for i in range(N):
  for x in X:
    tmp += (i - x)**2
  
  if ans>=tmp:
    ans=tmp

print(ans)

### FIXED CODE ###

N = int(input())
X = list(map(int,input().split()))
 
ans=10**10
for i in range(0,101):
  tmp=0
  for x in X:
    tmp += (i - x)**2
  
  if ans>=tmp:
    ans=tmp
 
print(ans)
n = int(input())
nums = input().split()

print(min(nums), max(nums), sum(sums))


### FIXED CODE ###

n = int(input())
nums = input().split()
su = 0
ma = -1000000
mi = 1000000

for v in range(n):
    num = int(nums[v])
    if num > ma:
        ma = num
    if num < mi:
        mi = num
    su += num

print(mi, ma, su)
a, b = map(int, input.split())
if a + b == 15:
    print('+')
elif a*b == 15:
    print('*')
else:
    print('x')

### FIXED CODE ###

a, b = map(int, input().split())
if a + b == 15:
    print('+')
elif a*b == 15:
    print('*')
else:
    print('x')
x = int(input())
a = int(input())
if x < a:
    print(0)
else:
    print(10)

### FIXED CODE ###

x,a = map(int, input().split())
if x < a :
    print(0)
else:
    print(10)
N, K = map(int, input().split())
A = [-1] + list(map(int, input().split()))

visited = set([1])
loop = [1]
now = 1

for _ in range(N):
    now = A[now]
    if now in visited:
        break
    else:
        loop.append(now)
        visited.add(now)

x = loop.index(now)

if K < x:
    print(loop[x+1])
else:
    K -= x
    loop = loop[x:]
    K %= len(loop)
    print(loop[K])

### FIXED CODE ###

N, K = map(int, input().split())
A = [-1] + list(map(int, input().split()))

visited = set([1])
loop = [1]
now = 1

for _ in range(N):
    now = A[now]
    if now in visited:
        break
    else:
        loop.append(now)
        visited.add(now)

x = loop.index(now)

if K < x:
    print(loop[K])
else:
    K -= x
    loop = loop[x:]
    K %= len(loop)
    print(loop[K])
N = int(input())
a = list(map(int,input().rstrip().split(" ")))
counter = [0,0,0]
for i in a:
    if i % 4 == 0:
        counter[2] += 1
    elif i % 2 == 0:
        counter[1] += 1
    else:
        counter[0] += 1
counter[0] += min(1,counter[1] += 1)

if counter[2] += 1 >= counter[0]:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

N = int(input())
a = list(map(int,input().rstrip().split(" ")))
counter = [0,0,0]
for i in a:
    if i % 4 == 0:
        counter[2] += 1
    elif i % 2 == 0:
        counter[1] += 1
    else:
        counter[0] += 1
counter[0] += min(1,counter[1])

if counter[2] + 1 >= counter[0]:
    print("Yes")
else:
    print("No")
l = [int(input()) for _ in range(5)]
ans = 0
p = 0
for i in l:
    if i % 10 != 0:
        p = 10 - i % 10
    else:
        p = 0
    ans += i + p
    m = max(m, p)
print(ans - m)

### FIXED CODE ###

l = [int(input()) for _ in range(5)]
ans = 0
m = 0
for i in l:
    if i % 10 != 0:
        p = 10 - i % 10
    else:
        p = 0
    ans += i + p
    m = max(m, p)
print(ans - m)
n = int(input())
a = list(map(int, input().split())

print(min(a),max(a),sum(a))


### FIXED CODE ###

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

print(min(a),max(a),sum(a))
n = int(input())

def get_val(a, b):
    for i in range(10):
        x = (a >> i) % 2
        y = (b >> i) % 2
        if x != y:
            return (i + 1)

for i in range(1, N):
    print(*[get_val(i,j) for j in range(i + 1, n + 1)])


### FIXED CODE ###

n = int(input())

def get_val(a, b):
    for i in range(10):
        x = (a >> i) % 2
        y = (b >> i) % 2
        if x != y:
            return (i + 1)

for i in range(1, n):
    print(*[get_val(i,j) for j in range(i + 1, n + 1)])
m, k = [int(x) for x in input().split()]
if m == 1:
    if k == 0:
        print(0, 0, 1, 1)
    else:
        print(-1)
else:
    if k < 1 << m:
        print(*(i for i in range(1 << m) if i != k), k, *reversed([i for i in range(1 << m) if i != k]), k)
    else:
        print(-1)


### FIXED CODE ###

m, k = [int(x) for x in input().split()]
if m == 1:
    if k == 0:
        print(0, 0, 1, 1)
    else:
        print(-1)
else:
    if k < 1 << m:
        a = [str(i) for i in range(1 << m) if i != k]
        print(' '.join(a), k, ' '.join(reversed(a)), k)
    else:
        print(-1)
a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
s = [a, b, c, d, e]
u = []
v = []
ans = 0

for i in range(len(s)):
    if s[i] % 10 == 0:
        ans += s[i]
    else:
        u.append(s[i])
        v.append(s[i] % 10)

k = min(v)
for j in range(len(u)):
    ans += u[j] + 10 - v[j]
    
ans = ans - 10 + k
print(ans)



### FIXED CODE ###

a = int(input())
b = int(input())
c = int(input())
d = int(input())
e = int(input())
s = [a, b, c, d, e]
u = []
v = []
ans = 0

for i in range(len(s)):
    if s[i] % 10 == 0:
        ans += s[i]
    else:
        u.append(s[i])
        v.append(s[i] % 10)

if len(v) != 0:
    k = min(v)
    for j in range(len(u)):
        ans += u[j] + 10 - v[j]
        
    ans = ans - 10 + k
print(ans)
N = int(input())
S = lisr(input())
cnt = 0
for i in range(1, N):
     if S[i-1] == "#":
         if S[i] == ".":
             S[i] = "#"
             cnt += 1
print(cnt)

### FIXED CODE ###

A, B, C = map(int, input().split())
if A > B:
    tmp = A
    A =  B
    B = tmp 

if C >= A and C <= B:
    print("Yes")
else:
    print("No")
import sys
N = input()
h = map(int,input().split())
h = list(h)

dp = [sys.maxsize for i in range(100)]
dp[0]=0

for i in range(int(N)):
    for j in range(i+1,i+2+1):
        if j<int(N) :
            dp[j]=min(dp[j],dp[i]+abs(h[i]-h[j]))

print(dp[int(N)-1])

### FIXED CODE ###

import sys
n =int(input())
h = map(int,input().split())
h = list(h)

dp = [sys.maxsize]*n
dp[0]=0

for i in range(n):
    for j in range(i+1,i+2+1):
        if j<n :
            dp[j]=min(dp[j],dp[i]+abs(h[i]-h[j]))

print(dp[n-1])
import sys
n = int(input())
s = input()
if n % 2 == 1:
  print("No")
  sys.exit()

if s[0://2] == s[n//2:]:
  print("Yes")
else:
  print("No")


### FIXED CODE ###

r = int(input() )
print(r*r)
n,a,b=map(int, input().split())

def cmb(n, r, mod):
    if (r<0 or r>n):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 
N = 10**4
g1 = [1, 1] 
g2 = [1, 1] 
inverse = [0, 1] 

for i in range( 2, N + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

def pos(x, n, m):
    if n == 0:
        return 1
    res = pos(x*x%m, n//2, m)
    if n%2 == 1:
        res = res*x%m
    return res
    
if n==2:
    print(0)
else:
    ans=pos(2,n,mod)-1-cmb(n,a,mod)-cmb(n,b,mod)
    print(ans%mod)

### FIXED CODE ###

n,a,b=map(int, input().split())
 
def comb(n, r,MOD):
    p, q = 1, 1
    for i in range(r):
        p = p * (n-i) % MOD
        q = q * (i+1) % MOD
    return p * pow(q, MOD-2, MOD) % MOD

mod=10**9+7
    
A=comb(n,a,mod)
B=comb(n,b,mod)  
C=pow(2,n,mod)

if n==2:
    print(0)
else:
    print((C-1-A-B)%mod)
n, k = map(int, input().split())
a = list(map(int, input().split()))

d = [-1] * (n+1)
ls = 0
le = 0

def dfs(i, t):
  global d, ls, le
  if d[i] != -1:
    ls = i
    return False
  d[i] = t
  ret = dfs(a[i-1], t+1)
  if ret == False:
    le = i

dfs(1, 0)

#print(d)
#print(ls, le)

ans = 0
if k <= d[le] or ls == 0:
  ans = d.index(k)
else:
  ld = d[ls]
  t = (k-ld) % (d[le] - d[ls] + 1)
  t += d[ls]
  ans = d.index(t)

print(ans)


### FIXED CODE ###

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

v = 1
s = [-1] * (n+1)
d = []
l = 0
c = 0

while s[v] == -1:
  s[v] = len(d)
  d.append(v)
  v = a[v-1]
l = s[v]
c = len(d) - s[v]

if k < l:
  print(d[k])
else:
  k -= l
  k %= c
  print(d[l+k])
n,a,b=map(int,input().split())
if n*a>b:
  print(b)
else print(a)

### FIXED CODE ###

n,a,b=map(int,input().split())
if n*a>b:
  print(b)
else:
    print(n*a)
import java.util.Scanner;
class Main
{
 public static void main(String args[])
 {
  int a,b;
  Scanner sc = new Scanner(System.in);
  while(True){
  a=sc.nextInt();
  b=sc.nestInt();
  if(a==0 && b==0)
    break;
  else if(a<b)
    System.out.println(a +b);
  else
    System.out.println(b +a);}
 }
}


### FIXED CODE ###

while True:
   a,b=map(int,input().split())
   if a==0 and b==0:
     break
   elif a<b:
     print(a,b)
   else:
     print(b,a)
import numpy as np
from math import cos, pi
a,b,h,m = map(int, input().split()) 

mangle = 2*pi * (m/60)
hangle = 2*pi * (h/12)
dist = np.sqrt(a**2+b**2 - 2*a*b*cos(magnle- hangle))
print(dist)

### FIXED CODE ###

import numpy as np
from math import cos, pi
a,b,h,m = map(int, input().split()) 

mangle = 2*pi * (m/60)
hangle = 2*pi * (h/12) + (1/6)*pi*(m/60)
dist = np.sqrt(a**2+b**2 - 2*a*b*cos(mangle- hangle))
print(dist)
a = int(input())
b = int(input())

if max(a, b) > 8:
    print(':(')
else:
    print('Yay!')

### FIXED CODE ###

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

if max(a, b) > 8:
    print(':(')
else:
    print('Yay!')
A, B = input().split()
a = int(A)
fb = float(B)
ib = int(b)
print(a*ib + int(a*fb))

### FIXED CODE ###

from decimal import *
import math

A, B = input().split()
a = Decimal(A)
b = Decimal(B)
ib = Decimal(100*b)

print(math.floor((a*ib)/Decimal(100)))
n = int(input())
s = input()

ans = 0
for j in range(n):
    for i in range(j + ans):
        if (s[i:i+ans+1] == s[j:j+ans+1]):
            while (i + ans < n) & (i + ans < j):
                if s[i+ans] == s[j+ans]:
                    ans += 1
            else:
                break
print(ans)

### FIXED CODE ###

n = int(input())
s = input()
i = 0
j = 0
r = 0
while i < n:
    if s[i:j] in s[j:]:
        r = max(r, j - i)
        j += 1
    else:
        i += 1
print(r)
def main():
    *CMDs, = map(len, input().split('T'))
    CMDs += [0, 0]  # 番兵,sliceでREを出さないため
    X, Y = map(int, input().split())
    X -= CMDs[0]  # この操作だけは対称性がない

    def is_reachable(cmds, goal):
        SFT = 8000
        # [-SFT,SFT] -> [0,SFT*2]
        dp = 1 << SFT
        for d in cmds:
            dp = (dp >> d) | (dp << d)
        return (dp >> (SFT + goal)) & 1

    cond = is_reachable(CMDs[2::2], X) and is_reachable(CMDs[1::2], Y)
    print('Yes' if cond else 'No')


if __name__ == '__main__':
    main()


### FIXED CODE ###

# https://ikatakos.com/pot/programming_algorithm/contest_history/atcoder/2017/1216_arc087
# https://pitsbuffersolution.com/compro/atcoder/arc087d.php

# 最初の移動以外は、どんな操作手順後であっても、正負いずれの方向にも動けるのがミソ

def solve(s, x, y):
    X = 0
    Y = 1

    def update(move):
        st = set()
        for p in reachable[st_ind]:
            st.add(p + move)
            st.add(abs(p - move))
        reachable[st_ind] = st
        # 絶対値の等しい正負の値を取りうるので、正だけ扱う

    n = len(s)
    spl = map(len, s.split('T'))
    x -= next(spl)
    # ここでxを減らすと、
    # 個々のmove後のx,yは、原点対象になるので、正の座標の到達点だけ扱えばよくなる

    reachable = [{0}, {0}]
    st_ind = 1
    for move in spl:
        update(move)
        st_ind ^= 1

    return (abs(x) in reachable[X]) and (abs(y) in reachable[Y])
    # x,yが負であっても、それに対応した正の値が集合に含まれていれば、到達可能


if __name__ == '__main__':
    s = input()
    x, y = map(int, input().split())
    print('Yes' if solve(s, x, y) else 'No')
pow(int(x),3)

### FIXED CODE ###

x = int(input())
print(x**3)
k = int(input())
a = list(map(int, input().split()))

def solve():

    if k == 1:
        if a[0] == 2:
            print(2, 3)
            return
        else:
            print(-1)
            return

    can = []

    for i in range(k):

        if i==0:
            can = [2]
        elif i > 1 and i != k-1:
            if a[k-i-1] == a[k-(i-1)-1]:
                continue

        oldcan = can[:]
        can = []

        if i == k-1:
            can = list(range(min(oldcan), max(oldcan) + a[k-i-1]))
        else:
            j = i+1
            mi = min(oldcan)
            mx = max(oldcan) + a[k-i-1] -1
            if mx < a[k-j-1]:
                print(-1)
                return
            #print(mi, mx)
            if mi%a[k-j-1] != 0:
                mi = mi + (a[k-j-1] - mi%a[k-j-1])
            if mx%a[k-j-1] != 0:
                mx = mx - mx % a[k-j-1]
            can = [mi, mx]

        # if len(can) == 0:
        #     print(-1)
        #     return
            #print(i, can, oldcan)
        # for c in oldcan:
        #     for a__ in range(c,c+a[k-i-1]):
        #         if i == k-1:
        #             if a__ not in can:
        #                 can.append(a__)
        #         else:
        #             if a__ not in can and a__ % a[k-(i+1)-1] == 0:
        #                 can.append(a__)

    print(min(can), max(can))
solve()


### FIXED CODE ###

k = int(input())
a = list(map(int, input().split()))
def solve():

    if a[k-1] != 2:
        print(-1)
        return

    mi = 2
    mx = 2

    for i in range(k):
        j = k-i-1

        mx = mx + a[j] - 1

        if j == 0:
            pass
        else:
            na = a[j-1]
            
            if mx % na != 0 and mi % na != 0 and ((mx % na) - (mi % na)) == (mx - mi):
                print(-1)
                return

            if mi%na != 0:
                mi = mi + (na - mi%na)

            if mx%na != 0:
                mx = mx - (mx % na)

    print(mi, mx)
solve()
n = int(input())
# nums = list(map(int, input().split()))
nums = [int(i) for i in input().split()]

kaisu = 0

while True:
  
"""
  for i in range(n):
    if nums[i] %2 == 0:
      nums[i] = nums[i]/2
      kaisu += 1
    else:
      break
"""
  if [i for i in nums if i % 2 == 1]:
    break
  nums = [i//2 for i in nums]
  kaisu += 1
print(kaisu)


### FIXED CODE ###

n = int(input())
nums = [int(i) for i in input().split()]

kaisu = 0

while True:
  if [i for i in nums if i % 2 == 1]:
    break
  nums = [i//2 for i in nums]
  kaisu += 1
print(kaisu)
print(eval('min('+input()[::-1].replace(' ',',',1).replace(' ','//')+')'))

### FIXED CODE ###

a, b, c = map(int, input().split())
print(min(b//a, c))
s = input()
t = input()

anses = []
for i in range(len(s) - len(t)):
  cnt = 0
  for c, d in zip(s[i:i + len(t)], t):
    if c != d:
      cnt += 1
  anses.append(cnt)

print(min(anses))


### FIXED CODE ###

s = input()
t = input()

anses = []
for i in range(len(s) - len(t)+1):
  cnt = 0
  for c, d in zip(s[i:i + len(t)], t):
    if c != d:
      cnt += 1
  anses.append(cnt)

print(min(anses))
while True:
    a, op, b = (str, input().split())

    a = int(a)
    b = int(b)
    if op == "+":
        print(a +b)
    elif op == "-":
        print(a - b)
    elif op == "*":
        print(a * b)
    elif op == "/":
        print(a / b)
    elif op == "?":
        break
    

### FIXED CODE ###

while True:
    a, op, b = (input().split())
    x = int(a)
    y = int(b)
    if op == "?":
        break
    elif op == "-":
        print(x - y)
    elif op == "+":
        print(x + y)
    elif op =="*":
        print (x * y)
    elif op == "/":
        print (x // y)
while True:
    a,b = map(int,input().split())
    if a ==0 and b ==0:
        break
    else:
        if a<=b:
        print(a,b)
        else:
            a,b =b,a
            print(a,b)


### FIXED CODE ###

while True:
    a,b = map(int,input().split())
    if a ==0 and b ==0:
        break
    else:
        if a<=b:
            print(a,b)
        else:
            a,b =b,a
            print(a,b)
import math
a,b,x = map(int,input().split())
if x / a >= (a*b/2):
    print(math.degrees(math.atan((2*b/a)-2*x/(a**3))))
else:
    if a < b:
        print(math.degrees(math.atan(a*b*b/(2*x))))
    else:
        print(math.degrees(math.atan(2*x/(a*b*b))))


### FIXED CODE ###

a,b = map(int, input().split())
if a <= 9 and b <= 9:
    print(a*b)
else:
    print('-1')
A, op, C = map(str, input().split())
if op == "+":
  print(int(A) + int(B))
else:
  print(int(A) - int(B))

### FIXED CODE ###

A, op, B = map(str, input().split())
if op == "+":
  print(int(A) + int(B))
else:
  print(int(A) - int(B))
n, k = map(int, input().split())
l = list(map(int, input().split()))
lo, hi = 0, 9999999999999999
while lo < hi:
    mid = (lo + hi) // 2
    cnt = 0
    for i in range(n):
        if l[i] % mid == 0: cnt += (l[i] // mid) - 1
        else: cnt += (l[i] // mid)
    if cnt <= k: hi = mid
    else: lo = mid + 1
print(lo)

### FIXED CODE ###

n, k = map(int, input().split())
l = list(map(int, input().split()))
lo, hi = 1, 9999999999999999
while lo < hi:
    mid = (lo + hi) // 2
    cnt = 0
    for i in range(n):
        if l[i] % mid == 0: cnt += (l[i] // mid) - 1
        else: cnt += (l[i] // mid)
    if cnt <= k: hi = mid
    else: lo = mid + 1
print(lo)