Harryxun/stf_run huggingface dataset:
import sys
sys.setrecursionlimit(100000000)
def popcount(x):
    '''xの立っているビット数をカウントする関数
    (xは64bit整数)'''

    # 2bitごとの組に分け、立っているビット数を2bitで表現する
    x = x - ((x >> 1) & 0x5555555555555555)

    # 4bit整数に 上位2bit + 下位2bit を計算した値を入れる
    x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)

    x = (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f # 8bitごと
    x = x + (x >> 8) # 16bitごと
    x = x + (x >> 16) # 32bitごと
    x = x + (x >> 32) # 64bitごと = 全部の合計
    return x & 0x0000007f
def main():
    N = int(input())
    X = input()
    d = {}
    dd = {}
    x1 = X.count('1')
    xn = int(X, 2)
    def hoge(i):
        if i in dd:
            return dd[i]
        if i not in d:
            j = popcount(i)
            d[i] = i % j
            if d[i] == 0:
                dd[i] = 1
            else:
                dd[i] = 1 + hoge(d[i])
        return dd[i]
    xn1 = xn % (x1-1)
    xn2 = xn % (x1 + 1)
    for i in range(N):
        if X[i] == '1':
            t = xn1
            t -= pow(2, N-1-i, x1-1)
            t %= (x1-1)
        else:
            t = xn2
            t += pow(2, N-1-i, x1+1)
            t %= (x1 + 1)
        if t == 0:
            print(1)
        else:
            print(1 + hoge(t))
main()


### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000000)
def popcount(x):
    '''xの立っているビット数をカウントする関数
    (xは64bit整数)'''

    # 2bitごとの組に分け、立っているビット数を2bitで表現する
    x = x - ((x >> 1) & 0x5555555555555555)

    # 4bit整数に 上位2bit + 下位2bit を計算した値を入れる
    x = (x & 0x3333333333333333) + ((x >> 2) & 0x3333333333333333)

    x = (x + (x >> 4)) & 0x0f0f0f0f0f0f0f0f # 8bitごと
    x = x + (x >> 8) # 16bitごと
    x = x + (x >> 16) # 32bitごと
    x = x + (x >> 32) # 64bitごと = 全部の合計
    return x & 0x0000007f
def main():
    N = int(input())
    X = input()
    d = {}
    dd = {}
    x1 = X.count('1')
    xn = int(X, 2)
    def hoge(i):
        if i in dd:
            return dd[i]
        if i not in d:
            j = popcount(i)
            d[i] = i % j
            if d[i] == 0:
                dd[i] = 1
            else:
                dd[i] = 1 + hoge(d[i])
        return dd[i]
    if N == 1:
        if X == '1':
            print(0)
            return 0
        else:
            print(1)
            return 1
    if x1 == 1:
        xn1 = 0
    else:
        xn1 = xn % (x1-1)
    xn2 = xn % (x1 + 1)
    for i in range(N):
        if X[i] == '1':
            t = xn1
            if x1-1 == 0:
                print(0)
                continue
            t -= pow(2, N-1-i, x1-1)
            t %= (x1-1)
        else:
            t = xn2
            t += pow(2, N-1-i, x1+1)
            t %= (x1 + 1)
        if t == 0:
            print(1)
        else:
            print(1 + hoge(t))
main()
import collections
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    a = list(map(int,input().split()))
    max_a = max(a)
    count = [0 for _ in range(max_a)]
    c = collections.Counter(a)
    c = list(c.items())

    if len(c) == 1:
        print(c[0][1])

    elif len(c) == 2:
        if abs(c[0][0]-c[1][0]) <= 2:
            print(c[0][1]+c[1][1])
        else:
            print(max(c[0][1],c[1][1]))

    else:
        for i in range(len(c)):
            count[c[i][0]-1] = c[i][1]

        sum_list = [0 for _ in range(len(c)-2)]
        for i in range(len(c)-2):
            sum_list[i] = count[i]+count[i+1]+count[i+2]
        print(sum_list)

if __name__ == "__main__":
    main()

### FIXED CODE ###

import collections
import sys
input = sys.stdin.readline

def main():
    N = int(input())
    a = list(map(int,input().split()))
    max_a = max(a)
    count = [0 for _ in range(max_a+1)]
    c = collections.Counter(a)
    c = list(c.items())

    if len(c) == 1:
        print(c[0][1])

    elif len(c) == 2:
        if abs(c[0][0]-c[1][0]) <= 2:
            print(c[0][1]+c[1][1])
        else:
            print(max(c[0][1],c[1][1]))

    else:
        for i in range(len(c)):
            count[c[i][0]] = c[i][1]

        sum_list = [0 for _ in range(len(count)-2)]
        for i in range(len(count)-2):
            sum_list[i] = count[i]+count[i+1]+count[i+2]
        print(max(sum_list))

if __name__ == "__main__":
    main()
from collections import defaultdict
class edge:
    def __init__(self, to, cost):
        self.to, self.cost = to, cost

def main():
    N = int(input())
    g = defaultdict(list)
    for _ in range(N-1):
        u, v, w = (int(_) for _ in input().split())
        g[u].append(edge(v, w))
        g[v].append(edge(u, w))

    color = [0] * (N+1)

    def dfs(ver):
        for e in g[ver]:
            if color[e.to] == 0 and e.cost%2 == 0:
                color[e.to] = color[ver]
                dfs(e.to)
            elif color[e.to] == 0 and e.cost%2 == 1:
                color[e.to] = (-1) * color[ver]
                dfs(e.to)
    color[1] = 1
    dfs(1)
    for i in range(1, N+1):
        if color[i] == -1: color[i] = 0
    print(*color[1:], sep='\n')
    return

if __name__ == '__main__':
    main()


### FIXED CODE ###

from collections import defaultdict
import sys
sys.setrecursionlimit(1000000)

class edge:
    def __init__(self, to, cost):
        self.to, self.cost = to, cost

def main():
    N = int(input())
    g = defaultdict(list)
    for i in range(N-1):
        u, v, w = (int(_) for _ in input().split())
        g[u].append(edge(v, w))
        g[v].append(edge(u, w))

    color = [0] * (N+1)

    def dfs(ver):
        for e in g[ver]:
            if color[e.to] == 0 and e.cost%2 == 0:
                color[e.to] = color[ver]
                dfs(e.to)
            elif color[e.to] == 0 and e.cost%2 == 1:
                color[e.to] = (-1) * color[ver]
                dfs(e.to)
    color[1] = 1
    dfs(1)
    for i in range(1, N+1):
        if color[i] == -1: color[i] = 0
    print(*color[1:], sep='\n')
    return

if __name__ == '__main__':
    main()
import pandas as pd
N, K = list(map(int, input().split()))
 
h = []
for i in range(N):
    h.append(int(input()))

h_sort = sorted(h)
df = pd.DataFrame(h_sort)
df2 = df.diff()
df3 = df2.rolling(K - 1).sum()
df4 = df3.dropna(how='all')

print(int(min(df4[0])))

### FIXED CODE ###

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

h = []
for _ in range(N):
    h.append(int(input()))

h.sort()
minimum = h[N - 1]- h[0]

for i in range(N - K + 1):
    minimum = min(minimum, h[i + K - 1] - h[i])
print(minimum)
d = {"S":[1,2,3,4,5,6,7,8,9,10,11,12,13],
     "H":[1,2,3,4,5,6,7,8,9,10,11,12,13],
     "D":[1,2,3,4,5,6,7,8,9,10,11,12,13],
     "C":[1,2,3,4,5,6,7,8,9,10,11,12,13]}
n = int(input())
for i in range(n):
    #N, M = map(str,input().split())
    N, M = map(str,data[i][0].split())
    d[N][int(M)-1] ="None"

for j in range(len(d)):
    if j==1:
        list_d = d["S"]
        c = "S"
    elif j == 2:
        list_d = d["H"]
        c = "H"
    elif j == 3:
        list_d = d["D"]
        c = "D"
    else:
        list_d = d["C"]
        c = "C"
    for i in range(len(list_d)):
        if(list_d[i] != "None"):
            print(c , list_d[i])


### FIXED CODE ###

d = {"S":[1,2,3,4,5,6,7,8,9,10,11,12,13],
     "H":[1,2,3,4,5,6,7,8,9,10,11,12,13],
     "C":[1,2,3,4,5,6,7,8,9,10,11,12,13],
     "D":[1,2,3,4,5,6,7,8,9,10,11,12,13]}
n = int(input())
for i in range(n):
    N, M = map(str,input().split())
    d[N][int(M)-1] ="None"

for j in range(len(d)):
    if j==0:
        list_d = d["S"]
        c = "S"
    elif j == 1:
        list_d = d["H"]
        c = "H"
    elif j == 2:
        list_d = d["C"]
        c = "C"
    else:
        list_d = d["D"]
        c = "D"
    for i in range(len(list_d)):
        if(list_d[i] != "None"):
            print(c , list_d[i])
m = int(input())

print(24-m+24

### FIXED CODE ###

m = int(input())
 
print(24-m+24)
n, m = map(int, input().split())
par = [i for i in range(n)]

def find(x, par):
    if par[x] == x:
        return x
    else:
        return find(par[x], par)

def unite(x, y):
    x = find(x, par)
    y = find(y, par)
    if x != y:
        par[x] = y

for _ in range(m):
    a, b = map(int, input().split())
    unite(a-1, b-1)

groups= 0
for i in range(n):
    if i == par[i]:
        groups +=1
print(groups-1)

### FIXED CODE ###

n, m = map(int, input().split())
par = [i for i in range(n)]
import sys
sys.setrecursionlimit(1000000)

def find(x, par):
    if par[x] == x:
        return x
    else:
        a = find(par[x], par)
        par[x] =a
        return a

def unite(x, y):
    x = find(x, par)
    y = find(y, par)
    if x != y:
        par[x] = y

for _ in range(m):
    a, b = map(int, input().split())
    unite(a-1, b-1)

groups= 0
for i in range(n):
    if i == par[i]:
        groups +=1
print(groups-1)
N = int(input())
a = list(map(int,input().split()))
check = N%2==0
for i,j in enumerate(a[1:]):
    if(check):
        if(i%2==0):
            ans.insert(0,j)
        else:
            ans.append(j)
    else:
        if(i%2==1):
            ans.insert(0,j)
        else:
            ans.append(j)
print(" ".join(map(str,ans)))

### FIXED CODE ###

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

ans = [a[0]]
check = N%2==0
for i,j in enumerate(a[1:]):
    if(check):
        if(i%2==0):
            ans.insert(0,j)
        else:
            ans.append(j)
    else:
        if(i%2==1):
            ans.insert(0,j)
        else:
            ans.append(j)
print(" ".join(map(str,ans)))
# C - One Quadrillion and One Dalmatians
import bisect

N = int(input())

keta = [26 ** i for i in range(1, 12)]
keta_sum = [0] * 12
for i in range(11):
    keta_sum[i+1] = keta_sum[i] + keta[i]
k = bisect.bisect_left(keta_sum, N)
ans = ''

for i in range(k):
    n = N - keta_sum[k-i-1]
    if n > 26:
        s = n // 26
        t = n % 26
    else:
        s = n
        t = n
    if t == 0:
        t = 26
    ans = ans + chr(t+96)
    N = (n//26) + (n%26) + 26

print(ans)


### FIXED CODE ###

# C - One Quadrillion and One Dalmatians

N = int(input())

ans = ''
while N > 0:
    N -= 1
    t = N % 26
    ans = chr(t+97) + ans
    N //= 26

print(ans)
a,b=map(int,raw_input()).split()
if a%2==0 or b%2==0:
  print("Even")
else:
  print("Odd")

### FIXED CODE ###

# vim: set fileencoding=utf-8 :
a, b = map(int, raw_input().split())

if a % 2 == 0 or b % 2 == 0:
    print("Even")
else:
    print("Odd")
a, b = list(map(int, input()))

print((a - 1) * (b - 1))

### FIXED CODE ###

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

print((a - 1) * (b - 1))
import sys
sys.setrecursionlimit(10**5)

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

def cost(k):
    if k==0:
        return 0
    elif k==1:
        return abs(H[1]-H[0])
    else:
        return min(cost(k-1)+abs(H[k]-H[k-1]),cost(k-2)+abs(H[k]-H[k-2]))

print(cost(N-1))



### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)

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

cost_list=[0 for _ in range(N)]

cost_list[1]=abs(H[1]-H[0])

if N==2:
    print(cost_list[1])

else:
    for k in range(2,N):
        cost_list[k]=min(cost_list[k-1]+abs(H[k]-H[k-1]),cost_list[k-2]+abs(H[k]-H[k-2]))

    print(cost_list[N-1])
N, W = map(int, input().split())
MAX_V = 10**5+1
dp = [float('inf')] * MAX_V
dp[0] = 0
for _ in range(N):
    w, v = map(int, input().split())
    for sum_v in range(MAX_V)[::-1]:
        if sum_v >= v:
            dp[sum_v] = min(dp[sum_v - v] + w, dp[sum_v])
        else:
            dp[sum_v] = min(dp[sum_v], w)
ans = 0
while dp[ans+1] <= W:
    ans +=1
print(ans)


### FIXED CODE ###

N, W = map(int, input().split())
MAX_V = 10**5+1
dp = [float('inf')] * MAX_V
dp[0] = 0
for _ in range(N):
    w, v = map(int, input().split())
    for sum_v in range(MAX_V)[::-1]:
        if sum_v >= v:
            dp[sum_v] = min(dp[sum_v - v] + w, dp[sum_v])
        else:
            dp[sum_v] = min(dp[sum_v], w)
ans = 0
for v in range(MAX_V)[:: -1]:
    if dp[v] <= W:
        ans = v
        break
print(ans)
from collections import deque

def bfs():
    Q = deque()
    Q.append(0)
    #今の時刻
    i = 1
    while len(Q) > 0:
        x = Q.popleft()
        print(x)
        if x-i >= 0:
            T[i][x-i] = 1
            if x-i == X: return i
            Q.append(x-i)
        if 0 <= x and x <= X:
            T[i][x] = 1
            if x == X: return i
            Q.append(x)
        if x+i <= X:
            T[i][x+i] = 1
            if x+i == X: return i
            Q.append(x+i)
        i += 1

X = int(input())
INF = 10**9 +1
#時刻iで座標jに到着できるかどうか
T = [[0 for _ in range(X+1)] for _ in range(X**2)]
T[0][0] = 1
print(bfs())

### FIXED CODE ###

W, a, b = map(int,input().split())
print(max(b-(a+W),(a-(b+W)),0))
N = int(input())
a = np.array(input().split()).astype(int)

sum = 0
for i in range(len(a)):
    sum += a[i]%2
print(sum)


### FIXED CODE ###

N = int(input())
a = input().split()

sum = 0
for a_int in a:
    a_int = int(a_int)
    count = 0
    flag = 0
    while flag == 0:
        if a_int % 2 == 0:
            a_int = a_int / 2
            count += 1
        else:
            flag = 1
            break
    sum += count
print(sum)
import fractions as math
from functools import reduce

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


N=int(input())
A=list(map(int,input().split()))
MOD=(10**9)+7
S=list(set(A))
LCM=lcm(A[0],A[1])
for i in range(2,N):
    LCM=lcm(LCM,A[i])
    

ans=0

for i in range(N):
    ans+=(LCM//A[i])
    ans=ans%MOD

print(ans)

### FIXED CODE ###

import fractions
from functools import reduce

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)


def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

N=int(input())
A=list(map(int,input().split()))
MOD=(10**9)+7
S=list(set(A))
LCM=lcm_list(S)
ans=0

for i in range(N):
    ans+=(LCM//A[i])


print(ans%MOD)
from collections import deque
n = int(input())
dl = deque()
for _ in range(n):
    cmd = input()
    if ' ' in cmd:
        op,v = cmd.split()
    else:
        op = cmd
    if   op == 'insert'     : dl.appendleft(v) 
    elif op == 'delete'     : dl.remove(v) 
    elif op == 'deleteFirst': dl.popleft() 
    elif op == 'deleteLast' : dl.pop() 
print(*dl)

### FIXED CODE ###

from collections import deque
n = int(input())
dl = deque()
for _ in range(n):
    op = input().split()
    if   op[0] == 'insert'     : dl.appendleft(op[1]) 
    elif op[0] == 'delete'     :
        if op[1] in dl: dl.remove(op[1])
    elif op[0] == 'deleteFirst': dl.popleft() 
    elif op[0] == 'deleteLast' : dl.pop() 
print(*dl)
a,b,t = map(int, input())
 
print(t//a*b)

### FIXED CODE ###

a,b,t = map(int, input().split())
 
print((t//a)*b)
lis = [1,1,2]
def num(n):
    if len(lis) >= n+1:
        return lis[n]
    else:
        res = num(n-2) + num(n-1)
        lis.append(res)
        return res

N,M = map(int,input().split())
count = 1
pre = 0
for i in range(M+1):
    if i == M:
        cur = N+1
    else:
        cur = int(input())
    number = cur-1-pre
    if number >= 0:
        count = count * num(number) % 1000000007
    else:
        count = 0
        break
    pre = cur + 1
print(count%1000000007)    

### FIXED CODE ###

import sys
sys.setrecursionlimit(200000)

lis = [1,1,2]
def num(n):
    if len(lis) >= n+1:
        return lis[n]
    else:
        res = num(n-2) + num(n-1)
        lis.append(res)
        return res

N,M = map(int,input().split())
count = 1
pre = 0
for i in range(M+1):
    if i == M:
        cur = N+1
    else:
        cur = int(input())
    number = cur-1-pre
    if number >= 0:
        count = count * num(number) % 1000000007
    else:
        count = 0
        break
    pre = cur + 1
print(count%1000000007)
H, W = list(map(input().split()))

print(H*W//2 + (H * W) % 2)



### FIXED CODE ###

H, W = list(map(int, input().split()))
if H == 1 or W == 1:
    print(1)
else:
    print(H*W//2 + (H*W)%2)
n = int(input())

a = list(map(int, input().split()))
d = 0
t = 0.5

for i in range(n+1):
    d += (1+i)*a[i]
    t += a[i]/(2.0**(i+1))
    
k = sum(a)-1
d = d - 1/2*k*(k+1)

if t > 1.0:
    print('-1')
else:
    print(int(d))

### FIXED CODE ###

h1, m1, h2, m2, k = map(int, input().split())
n = (h2-h1)*60 + m2 - m1 - k
print(n)
a,b,c=map(int,raw_input().split())
A=a[0]
B=b[0]
C=c[0]
print A.upper()+B.upper()+C.upper()

### FIXED CODE ###

a,b,c=raw_input().split()
ans= a[0]+b[0]+c[0]
print ans.upper()
# -*- coding: utf-8 -*-
"""
Created on Sat May  9 16:09:21 2020

@author: shinba
"""

import math

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

print(int(a*b/math.gcd(a,b)))



### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
Created on Sat May  9 16:09:21 2020

@author: shinba
"""

import fractions

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

print(int(a*b/fractions.gcd(a,b)))
n, m = map(int, input().split())

dp = [-1 for _ in range(n)]
V = [[] for _ in range(n)]

for _ in range(m):
    x, y = map(int, input().split())
    V[x-1].append(y-1)

def f(x):
    if dp[x] != -1:
        return dp[x]

    t = 0
    for v in V[x]:
        t = max(t, f(v)+1)

    dp[x] = t
    return t

t = 0
for i in range(n):
    t = max(t, f(i))

print(t)


### FIXED CODE ###

from sys import setrecursionlimit
setrecursionlimit(10 ** 7)

n, m = map(int, input().split())

dp = [-1 for _ in range(n)]
V = [[] for _ in range(n)]

for _ in range(m):
    x, y = map(int, input().split())
    V[x-1].append(y-1)

def f(x):
    if dp[x] != -1:
        return dp[x]

    t = 0
    for v in V[x]:
        t = max(t, f(v)+1)

    dp[x] = t
    return dp[x]

t = 0
for i in range(n):
    t = max(t, f(i))

print(t)
a,b = map(str,input().split(' '))
if a == 'H':
  print(b)
elif a == 'D' and b == 'H':
  print('D')
else
:print('H')


### FIXED CODE ###

a,b = map(str,input().split(' '))
if a == 'H':
  print(b)
elif a == 'D' and b == 'H':
  print('D')
else:
  print('H')
li = list(map(input().split()))

count = 0

for i in range(3):
    if li[i] == "1":
        count = count + 1

print(count)

### FIXED CODE ###

a = input()

count = 0

for i in range(3):
    temp = a[i]
    if temp == "1":
        count = count + 1

print(count)
a = input('x')
b = int('a')
c = b**3
print(c)

### FIXED CODE ###

int = int(input())

print(int**3)
h, w = map(int, input().split())

if h == 1 or w == 1:
    print(1)
    exit()

if h * w % 2 == 0:
    print(h * w // 2)
else:
    print((h * w)//2 + 1)


### FIXED CODE ###

k = int(input()) - 1
li = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

print(li[k])
lst = (input().split())

n = lst[0]
n = int(n)
s = lst[1]

if n % 2 == 1:
    print('NO')

t = s[0, n/2 + 1]

if t + t == s:
    print('YES')
else:
    print('NO')


### FIXED CODE ###

lst = [input() for i in range(2)]

n = int(lst[0])
s = lst[1]
t = ''

for i in range(n//2):
    t += s[i]

if n % 2 == 1:
    print('No')
elif t + t == s:
    print('Yes')
else:
    print('No')
def factorization(n):
    arr = []
    for i in range(2, int(-(-n**0.5//1))+1):
        if n%i==0:
            cnt=0
            while n%i==0:
                cnt+=1
                n //= i
            arr.append([i, cnt])

    if n != 1:
        arr.append([n, 1])

    return arr
N = int(input())
ans = 0
if N != 1:
    fact_list = factorization(N)
    for _, i in fact_list:
        j = 1
        while i >= j:
            ans += 1
            i = i - j
            j += 1
            
print(ans)


### FIXED CODE ###

A, B = map(int, input().split())
print(A*B)
n,m,k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

A = [0]
B = [0]
for i in range(n):
	A.append(A[i]+a[i])
for j in range(m):
	B.append(B[j]+b[j])

print(A,B)

maxij = 0
l = m
for i in range(n+1):
	for j in range(m):
#		print(i,l,A[i],B[l],k)
		if((A[i]+B[l]) <= k):
		 	maxij=max(maxij,i+l)
#		 	print("mm",maxij)
		 	break
		else:
		 	l-=1
print(maxij)

### FIXED CODE ###

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

A = [0]
B = [0]
for i in range(n):
	A.append(A[i]+a[i])
for j in range(m):
	B.append(B[j]+b[j])

#print(A,B)

maxij = 0
l = m
for i in range(n+1):
	for j in range(m):
#		print(i,l,A[i],B[l],k)
		if(l == -1):
			break
		elif((A[i]+B[l]) <= k):
		 	maxij=max(maxij,i+l)
#		 	print("mm",maxij)
		 	break
		else:
		 	l-=1
print(maxij)
N, T = map(int, input().split())
ct = [[] for _ in range(N)]
for i in range(N):
    ct[i] = list(map(int, input().split()))
cost =[]
for v in ct:
    if v[1] <= T:
        cost.append(v)
if len(cost) <1:
    print('TLE')
else:
    for i, v in enumerate(cost):
        if i == 0:
            least = v[0]
        else:
            if v[0] <= least:
                least = v[0]
print(least)

### FIXED CODE ###

N, T = map(int, input().split())
ct = [[] for _ in range(N)]
for i in range(N):
    ct[i] = list(map(int, input().split()))
cost =[]
for v in ct:
    if v[1] <= T:
        cost.append(v)
if len(cost) <1:
    print('TLE')
else:
    for i, v in enumerate(cost):
        if i == 0:
            least = v[0]
        else:
            if v[0] <= least:
                least = v[0]
    print(least)
input()
print(sum([bin(i)[::-1].index('1') for i in map(int,input().split())]))

### FIXED CODE ###

a = list(map(int,input().split()))
if a[0]<=8 and a[1]<=8:
  print("Yay!")
else:
  print(":(")
import math

n = int(input())
vote = [0, 0]
# 最初の得票は、最小値を目指すので
# 単純に入力比をそのまま使用
# 各入力に対し、vote[0]<=t*k, vote[1]<=a*kとなる
# 最小のt*k,a*kでvoteを更新
vote = [1, 1]
for i in range(n):
    t, a = [int(i) for i in input().split()]
    k = max(math.ceil(vote[0] / t), math.ceil(vote[1] / a))
    vote = [t * k, a * k]
    if sum(vote) > 10**10:
        t[1000000000] = 1
    # print("i:{} vote:{}".format(i, vote))
print(vote[0] + vote[1])


### FIXED CODE ###

import math

n = int(input())
vote = [0, 0]
# 最初の得票は、最小値を目指すので
# 単純に入力比をそのまま使用
# 各入力に対し、vote[0]<=t*k, vote[1]<=a*kとなる
# 最小のt*k,a*kでvoteを更新
vote = [1, 1]
for i in range(n):
    t, a = [int(i) for i in input().split()]
    if vote[0] % t == 0:
        k = vote[0] // t
    else:
        k = vote[0] // t + 1
    if vote[1] % a == 0:
        k = max(k, vote[1] // a)
    else:
        k = max(k, vote[1] // a + 1)
    # k = max(math.ceil(vote[0] / t), math.ceil(vote[1] / a))
    vote = [t * k, a * k]
    # a / b + (a % b == 0 ? 0: 1)
    # print("i:{} vote:{}".format(i, vote))
print(vote[0] + vote[1])
n = int(input())
 
if n == 3:
	print('bon')
elif(n[-1] == "0" or n[-1] == "1" or n[-1] == "6" or n[-1] == "8"):
     print("pon")
else:
     print("hon")

### FIXED CODE ###

s = int(input())
n = (s % 10)
 
if n == 3:
	print('bon')
    
if n in {0, 1, 6, 8}:
	print('pon') 
    
if n in {2, 4, 5, 7, 9}:
	print('hon')
a, b = map(int, input().split())
if (a*b) % 2:
    print("Odd")
else:
    print("Even")

### FIXED CODE ###

a, b = map(int, input().split())
if (a*b) % 2:
    print("Odd")
else:
    print("Even")
from bisect import bisect_left
from collections import deque
import copy
def lis(A: list):
    L = [A[0]]
    for a in A[1:]:
        if a > L[-1]:
            # Lの末尾よりaが大きければ増加部分列を延長できる
            L.append(a)
        else:
            # そうでなければ、「aより小さい最大要素の次」をaにする
            # 該当位置は、二分探索で特定できる
            L[bisect_left(L, a)] = a
    return len(L)
n = int(input())
a = tuple(map(int, input().split()))
G = [[] for _ in range(n+1)]
for i in range(n-1):
    u,v = map(int, input().split())
    G[u].append(v)
    G[v].append(u)

letu = [[] for _ in range(n+1)]
letu[1].append(1)
que = deque([1])

while que:
    q = que.popleft()

    for nq in G[q]:
        let = copy.deepcopy(letu[q])
        if letu[nq] != []: #seen配列としても使う。seenないと閉路でWA
            continue
        let = let + [nq]
        letu[nq] = let
        que.append(nq)
for j in range(1,n+1):
    tmp = [a[aa-1] for aa in letu[j]]
    print(lis(tmp))


### FIXED CODE ###

k = int(input())
a,b = map(int, input().split())
for i in range(a,b+1):
    if i%k == 0:
        print('OK')
        exit()
print('NG')
n=int(input())
a=0
for i in range(9):
  for j in range(9):
    if n==(i+1)*(j+1):
      print("Yes")
      a+=1
      break
  if a!=0:
    break
if a==0:
  print("No")

### FIXED CODE ###

a,b=map(int,input().split())
 
if a<10 and b<10:
  print(a*b)
else:
  print(-1)
A, B, C = input().split()

if B + C <= A:
  result == 0
else:
  result = B+C-A

print(result)

### FIXED CODE ###

A, B, C = input().split()

a = int(A)
b = int(B)
c = int(C)
if b + c <= a:
  result = 0
else:
  result = b+c-a
 
print(result)