Harryxun/stf_run huggingface dataset:
def func(amat, bmat, nm):
    for i in range(nm[0]):
        ans = 0
        for j in range(nm[1]):
            ans += amat[i][j] * bmat[j][0]
        print(ans)


if __name__ == '__main__':
    nm = input().split(' ')
    nm = [int(i) for i in nm]
    amat = [[0 for i in range(nm[1])] for j in range(nm[0])]
    bmat = [[0] for i in range(nm[1])]

    for i in range(nm[0]):
        a = input().split(' ')
        for j in range(nm[1]):
            amat[i][j] = int(a[j])

    for i in range(nm[1]):
        b = int(input())
        bmat[i][0] = b

    func(amat, bmat, nm)

### FIXED CODE ###

def func(amat, bmat, nm):
    for i in range(nm[0]):
        ans = 0
        for j in range(nm[1]):
            ans += amat[i][j] * bmat[j][0]
        print(ans)


if __name__ == '__main__':
    nm = input().split(' ')
    nm = [int(i) for i in nm]
    amat = [[0 for i in range(nm[1])] for j in range(nm[0])]
    bmat = [[0] for i in range(nm[1])]

    for i in range(nm[0]):
        a = input().split(' ')
        for j in range(nm[1]):
            amat[i][j] = int(a[j])

    for i in range(nm[1]):
        b = int(input())
        bmat[i][0] = b

    func(amat, bmat, nm)
# /usr/bin/python
# -*- coding: utf-8 -*-
import math
from collections import defaultdict


N = int(input())
cn = [-1 for i in range(N)]
cn[0] = 0
route = defaultdict(list)
wn = [[0 for j in range(N+1)] for i in range(N+1)]

for _ in range(N-1):
  u,v,w = map(int, input().split())
  wn[u][v] = w
  wn[v][u] = w
  route[u].append(v)
  route[v].append(u)

nxt = set([1])
vnum = 0
while vnum<N and len(nxt)>0:
  p = nxt.pop()
  for q in route[p]:
    if cn[q-1] > 0:
      continue
    else:
      vnum += 1
      nxt.add(q)
      cn[q-1] = (cn[p]+wn[p][q]) % 2

for c in cn:
  print(c)

### FIXED CODE ###

# /usr/bin/python
# -*- coding: utf-8 -*-
from collections import deque,defaultdict


N = int(input())

colors = [-1 for _ in range(N)]
tree = [{} for _ in range(N)]
for _ in range(N-1):
  u,v,w = map(int, input().split())
  tree[u-1][v-1] = w % 2
  tree[v-1][u-1] = w % 2

visiting = deque([0])
colors[0] = 0
while len(visiting) > 0:
  p = visiting.popleft()
  for q in tree[p]:
    if colors[q] < 0:
      colors[q] = (tree[p][q]+colors[p]) % 2
      visiting.append(q)

for c in colors:
  print(c)
import math
import functools

n = int(input())
print(functools.reduce(math.gcd, list(map(int, input().split()))))

### FIXED CODE ###

from fractions import gcd

input()
a = list(map(int, input().split()))
l = a[0]
for i in a[1:]:
    l = gcd(l,i)
print(l)
X , N = map(int, input().split())
p = list(map(int,input().split()))
ans = []
if N == 0:
    print(X)
elif X not in  p:
    print(X)
else:
    p = sorted(p)
    p2 = [abs(i-X) for i in p]

    for i in range(p[p2.index(min(p2))],100):
        if i not in p:
            ans.append(i)
            break
    for i in range(p[p2.index(min(p2))], 0, -1):
        if i not in p:
            ans.append(i)
    ans = sorted(ans)
    ans2 = [abs(i-X) for i in ans]
    print(ans[ans2.index(min(ans2))])



### FIXED CODE ###

X , N = map(int, input().split())
p = list(map(int,input().split()))
ans = []
if N == 0:
    print(X)
elif X not in  p:
    print(X)
else:
    p = sorted(p)
    p2 = [abs(i-X) for i in p]

    for i in range(p[p2.index(min(p2))],102):
        if i not in p:
            ans.append(i)
            break
    for i in range(p[p2.index(min(p2))], -100, -1):
        if i not in p:
            ans.append(i)
            break
    
    ans = sorted(ans)
    ans2 = [abs(i-X) for i in ans]
    print(ans[ans2.index(min(ans2))])
A=map(int(input.split()))
if A+A+A>=22:
  print("bust")
else:
  print("win")

### FIXED CODE ###

A=list(map(int,input().split()))
if A[0]+A[1]+A[2]>=22:
  print("bust")
else:
  print("win")
def f(A): return A.count(a)>1
R=[0,3,6]
N=range(9)
Z=[0]*9

n=input()
while n:
  F=[[" " for _ in Z] for _ in Z]
  M=[map(int,raw_input().split()) for _ in Z]
  M1=[[M[y][x] for y in N] for x in N]
  M2=[M[y][x:x+3]+M[y+1][x:x+3]+M[y+2][x:x+3] for y in R for x in R]
  for y in N:
    p0=y/3*3
    for x in N:
      a=A[x]
      if any(map(f,[M[y],M1[x],M2[p0+x/3]])): F[y][x]="*"
    print "".join([a+b for a,b in zip(F[y],map(str,A))])
  if n>1: print
  n-=1

### FIXED CODE ###

def f(A): return A.count(a)>1
R=[0,3,6]
N=range(9)
Z=[0]*9

n=input()
while n:
  F=[[" " for _ in Z] for _ in Z]
  M=[map(int,raw_input().split()) for _ in Z]
  M1=[[M[y][x] for y in N] for x in N]
  M2=[M[y][x:x+3]+M[y+1][x:x+3]+M[y+2][x:x+3] for y in R for x in R]
  for y in N:
    p0=y/3*3
    for x in N:
      a=M[y][x]
      if any(map(f,[M[y],M1[x],M2[p0+x/3]])): F[y][x]="*"
    print "".join([a+b for a,b in zip(F[y],map(str,M[y]))])
  if n>1: print
  n-=1
n, a, b = list(map(int, input().split()))
ans = (n//(a+b)) * a)
ans += n % (a+b) if (n % (a+b)) <= a) else a
print(ans)

### FIXED CODE ###

l = input().split()

[n,a,b] = [int(x) for x in l]

if a==b and a==0:
    print(0)
else:
    x = a+b
    y = n//x

    if a == 0:
        print(0)
    else:
        if b == 0:
            print(n)
        else:
            t = n - y*x
            if t > a:
                print(y*a+a)
            else:
                print(y*a+t)
import sys
import bisect
input = sys.stdin.readline
num=0
n=int(input())
top=list(map(int,input().split()))
mid=list(map(int,input().split()))
und=list(map(int,input().split()))
top.sort()
mid.sort()
und.sort()
for i in mid:
    a=bisect.bisect_left(top,i)
    c=len(c)-bisect.bisect_right(und,i)
    num+=a*c
print(num)


### FIXED CODE ###

import sys
import bisect
input = sys.stdin.readline
num=0
n=int(input())
top=list(map(int,input().split()))
mid=list(map(int,input().split()))
und=list(map(int,input().split()))
top.sort()
mid.sort()
und.sort()
for i in mid:
    a=bisect.bisect_left(top,i)
    c=n-bisect.bisect_right(und,i)
    num+=a*c
print(num)
N = int(input())

x == N // 3

print(x)


### FIXED CODE ###

N = int(input())

x = N // 3

print(x)
#include <bits/stdc++.h>
using namespace std;

int main(){
  int N;
  int ans = 0;
  for (int i = 0; i < N; i++){
    int A;
    cin >> A;
    while (A%2 == 0){
      ans++;
      A = A/2
    }
  }
  cout << ans << endl;
}

### FIXED CODE ###

def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    ans = 0
    for i in A:
        while i%2 == 0:
            ans += 1
            i = i//2
    print(ans)
resolve()
string = int(input())

if string=="ABC":
    print("ARC")
elif string=="ARC":
    print("ABC")


### FIXED CODE ###

string = input()

if string=="ABC":
    print("ARC")
elif string=="ARC":
    print("ABC")
import math
def solution():
    a, b, h, m  = map(int, input().split())
    return (a**2 + b**2 -2*a*b*round(math.cos(2*math.pi*(h/12 - m/60)), 9)**0.5

print(solution())

### FIXED CODE ###

from math import *
def solution():
    a, b, h, m  = map(int, input().split())
    return (a*a+b*b-2*a*b*cos((m*11/360-h/6)*pi))**.5
print(solution())
def solve():
   x = raw_input()
   y = raw_input()
   lenx = len(x)
   leny = len(y)
   
   x1 = [0 for k in range(lenx)]
   for i in range(lenx):
      a = x[i]
      x2 = x1 + []
      for j in range(leny):
         if a == y[i]:
               x1[j+1] = x2[j] + 1
         elif x1[j+1] < x1[j]:
               x1[j+1] = x1[j]
               
   print max(x1)

n = input()
for i in range(n):
   solve()

### FIXED CODE ###

def solve():
    x = raw_input()
    y = raw_input()
    a, b = len(x), len(y)
    x1 = [0 for k in range(b+1)]
    for i in xrange(a):
        c = x[i]
        x2 = x1+[]
        for j in xrange(b):
            if c == y[j]:
                x1[j+1] = x2[j] + 1
            elif x1[j+1] < x1[j]:
                x1[j+1] = x1[j]
    print max(x1)
  
n = input()
for i in xrange(n):
    solve()
print(int(input())*int(input()))

### FIXED CODE ###

a,b= map(int, input().split())
print(a*b)
#!/usr/bin/env python3
import sys
import math

MOD = 10**9+7  # type: int

def combi_count(n, r):
    x = 1
    y = 1
    for i in range(1, r+1):
        x *= (n-i) % MOD
        y *= i % MOD

    # nCr = n!/((n-r)!*r!) = (n!/(n-r)!) / r! 
    #     :=                 (    x    ) / y
    
    # x / y            % MOD
    # x * y^(-1)       % MOD
    # x * y**(MOD - 2) % MOD (from フェルマー定理)

    return x * pow(y, MOD-2, MOD) % MOD

def solve(X: int, Y: int):
    a = (2*Y - X)/3
    b = (2*X - Y)/3
    if ((2*Y - X)%3 != 0) and ((2*X - Y)%3 != 0):
        ans = 0
    else:
        if (a<0) or (b<0):
            ans = 0
        else:
            ans = combi_count(a+b, min(a, b))
    print(int(ans%MOD))

# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  # type: int
    Y = int(next(tokens))  # type: int
    solve(X, Y)

if __name__ == '__main__':
    main()

### FIXED CODE ###

#!/usr/bin/env python3
import sys
import math

MOD = 10**9+7  # type: int

def combi_count(n, r):
    x = 1
    y = 1
    for i in range(1, r+1):
        x = x * (n-i) % MOD
        y = y * i % MOD

    # nCr = n!/((n-r)!*r!) = (n!/(n-r)!) / r! 
    #     :=                 (    x    ) / y

    # x / y            % MOD
    # x * y^(-1)       % MOD
    # x * y**(MOD - 2) % MOD (from フェルマー定理)

    return x * pow(y, MOD-2, MOD) % MOD

def solve(X: int, Y: int):
    a = int((2*Y - X)/3)
    b = int((2*X - Y)/3)
    if ( ((2*Y - X)%3 != 0) and ((2*X - Y)%3 != 0) )  or ((a<0) or (b<0)):
        ans = 0
    else:
        ans = combi_count(a+b+1, min(a, b))
    print(ans)

# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    X, Y = map(int, input().split())
    solve(X, Y)

if __name__ == '__main__':
    main()
import numpy as np
N = int(input())
h = list(map(int, input().split()))
default = 1000000
dp = [default] * N

def rec(i):
  if dp[i] != default:
    return dp[i]
  if i == 0:
    dp[i] = 0
    return 0
  dp[i] = min(dp[i], rec(i-1)+np.abs(h[i] - h[i-1]))
  if i > 1:
    dp[i] = min(dp[i], rec(i-2)+np.abs(h[i] - h[i-2]))
  return dp[i]
print(rec(N-1))

### FIXED CODE ###

import numpy as np
N = int(input())
h = list(map(int, input().split()))
dp = [9999] * N
dp[0] = 0
for i in range(1,N):
  if i<2:
    dp[i] = dp[i-1] + np.abs(h[i] - h[i-1])
  else:
    min1 = dp[i-2] + np.abs(h[i] - h[i-2])
    min2 = dp[i-1] + np.abs(h[i] - h[i-1])
    dp[i] = min(min1, min2)
print(dp[N-1])
x = input()
 ans = x*x*x
 print int(ans)

### FIXED CODE ###

x = input()
ans = x**3
print ans
import sys

if sys.platform =='ios':
	sys.stdin=open('input_file.txt')
	
#+++++
import math
a,b = map(int, input().split())
#n = int(input().strip())
#s,t=input().split(' ')
ans = a*b//math.gcd(a,b)
print(ans)


### FIXED CODE ###

import sys

if sys.platform =='ios':
	sys.stdin=open('input_file.txt')
	
#+++++
import fractions
a,b = map(int, input().split())
#n = int(input().strip())
#s,t=input().split(' ')
ans = a*b//fractions.gcd(a,b)
print(ans)
a.b=map(int,input().split())
if a > 9 or b > 9:
  print(-1)
else:
  print(a*b)

### FIXED CODE ###

a,b=map(int,input().split())
if a > 9 or b > 9:
  print(-1)
else:
  print(a*b)
n, m = map(int, input().split())
ans=0
if n==1 and m==1:
    ans=1
else:
    ans=(n-2)*(m-2)
print(ans)

### FIXED CODE ###

s1=input()
s2=input()
s3=input()
print(s1[0]+s2[1]+s3[2])
N, M = [int(x) for x in input().split()]

# Union Find
# N = 100
PARENT = list(range(N))

used = set()


def root(n):
    if PARENT[n] == n:
        return n
    else:
        ret = root(PARENT[n])
        PARENT[n] = ret
        return ret


def same(n1, n2):
    return root(n1) == root(n2)


def unite(n1, n2):
    n1 = root(n1)
    n2 = root(n2)
    if n1 == n2:
        return
    PARENT[n1] = n2


L = []
for i in range(M):
    x, y, z = [int(x) for x in input().split()]
    x -= 1
    y -= 1

    used.add(x)
    used.add(y)
    rootX = root(x)
    rootY = root(y)

    if z % 2 == 0:
        unite(x, y)

cnt = 0
uf = [root(n) for n in PARENT]

ansset = set(uf) - (set(range(N)) - used)

ans = (len(ansset) + 1) // 2 + (N - len(used))
print(ans)


### FIXED CODE ###

import sys
sys.setrecursionlimit(100000)

N, M = [int(x) for x in input().split()]

# Union Find
# N = 100
PARENT = list(range(N))

def root(n):
    if PARENT[n] == n:
        return n
    else:
        ret = root(PARENT[n])
        PARENT[n] = ret
        return ret

def same(n1, n2):
    return root(n1) == root(n2)

def unite(n1, n2):
    n1 = root(n1)
    n2 = root(n2)
    if n1 == n2:
        return
    PARENT[n1] = n2

used = set()

for i in range(M):
    x, y, z = [int(x) for x in input().split()]
    x -= 1
    y -= 1
    unite(x, y)

cnt = 0
for i,p in enumerate(PARENT):
    if root(p) == i:
        cnt += 1
print(cnt)
n=int(input())
    d=map(int,input().split(" "))
    wa=[]
    for i in range(0,n):
      for j in range(i,n):
        wa.append(d[i]*d[j])
    print(sum(wa))

### FIXED CODE ###

n=int(input())
d=list(map(int,input().split(" ")))
wa=[]
for i in range(0,n):
  for j in range(i+1,n):
    wa.append(d[i]*d[j])

print(sum(wa))
a=int(input())
b=int(input())

if b%a==0:
    print(a+b)
else:
    print(b-a)


### FIXED CODE ###

a,b=(int(x) for x in input().split())
if b%a==0:
    print(a+b)
else:
    print(b-a)
s = input()
A = set()
ans = inf
for i in range(len(s)):
    A.add(s[i])
for v in A:
    cur = 0
    vstep = 0
    for i in range(len(s)):
        if s[i] != v:
            cur += 1
        else:
            vstep = max(cur,vstep)
            cur = 0
    vstep = max(cur,vstep)
    ans = min(ans,vstep)
print(ans)

### FIXED CODE ###

s = input()
ans = len(s)
for i in set(s):
    t = s.split(i)
    c = 0
    for j in t:
        c = max(c,len(j))
    ans = min(ans,c)
print(ans)
from decimal import Decimal

import math
n = int(input())
li = [list(map(int, input().split())) for _ in range(n)]
p = li[0]
d = li[0][0]**2 + li[0][1]**2
for i in range(1,n):
  if (p[0]+li[i][0])**2 + (p[1]+li[i][1])**2 > d:
    p = [p[0]+li[i][0],p[1]+li[i][1]]
    d = p[0]**2 + p[1]**2
distance = p[0]**2 + p[1]**2

print(math.sqrt(distance))

### FIXED CODE ###

n = int(input())
print(((n-1)*n)//2)
N, K = map(int, input().split())
pn = list(map(int, input().split()))

l = pn[:K]
for i in range(N-K+1):
    l = max(l, l+pn[K+1]-pn[i])
ans = (l+K)/2
print(ans)

### FIXED CODE ###

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

pn_t = [0]
for i in range(N):
    pn_t.append(pn[i]+pn_t[i])

l = 0
for i in range(N-K+1):
    l = max(l, pn_t[K+i]-pn_t[i])
ans = (l+K)/2
print(ans)
N, A, B, C = list(map(int, input().split()))
s = [input() for _ in range(N)]

DP = [[0] * 3 for _ in range(N + 1)]
DP[0] = [A, B, C]

L = [""] * N
R = {}
R[0] = "A"
R[1] = "B"
R[2] = "C"
A = []
B = []
for i in range(N):
  t = s[i]
  if t == "AB":
    x = 0
    y = 1
  if t == "BC":
    x = 1
    y = 2
  if t == "AC":
    x = 0
    y = 2
  if DP[i][y] != 0:
    DP[i + 1] = DP[i]
    DP[i + 1][x] += 1
    DP[i + 1][y] -= 1
    L[i] = R[x]
    if x == 0:
      A.append([i, y])
    else:
      B.append([i, y])
  elif DP[i][x] != 0:
    DP[i + 1] = DP[i]
    DP[i + 1][x] -= 1
    DP[i + 1][y] += 1
    L[i] = R[y]
  else:
    if x == 0:
      if len(B) == 0:
        print("No")
        exit()
      z = 1
      k, n = B.pop()
    if x == 1:
      if len(A) == 0:
        print("No")
        exit()
      z = 0
      k, n = A.pop()
    DP[i + 1] = DP[i]
    DP[i + 1][z] -= 2
    DP[i + 1][n] += 2
    if n == x:
      x, y = y, x
    DP[i + 1][x] += 1
    DP[i + 1][y] -= 1
    if DP[i + 1][z] < 0:
      print("No")
      exit()
    L[i] = R[x]
    L[t] = R[y]

print("Yes")
for i in L:
  print(i)


### FIXED CODE ###

N, A, B, C = list(map(int, input().split()))
s = [input() for _ in range(N)]

DP = [[0] * 3 for _ in range(N + 1)]
DP[0] = [A, B, C]

L = [""] * N
R = {}
R[0] = "A"
R[1] = "B"
R[2] = "C"
A = []
B = []
for i in range(N):
  t = s[i]
  if t == "AB":
    x = 0
    y = 1
  if t == "BC":
    x = 1
    y = 2
  if t == "AC":
    x = 0
    y = 2
  if DP[i][y] != 0:
    DP[i + 1] = DP[i]
    DP[i + 1][x] += 1
    DP[i + 1][y] -= 1
    L[i] = R[x]
    if x == 0:
      A.append([i, y])
    else:
      B.append([i, y])
  elif DP[i][x] != 0:
    DP[i + 1] = DP[i]
    DP[i + 1][x] -= 1
    DP[i + 1][y] += 1
    L[i] = R[y]
  else:
    if x == 0:
      if len(B) == 0:
        print("No")
        exit()
      z = 1
      k, n = B.pop()
    if x == 1:
      if len(A) == 0:
        print("No")
        exit()
      z = 0
      k, n = A.pop()
    DP[i + 1] = DP[i]
    DP[i + 1][z] -= 2
    DP[i + 1][n] += 2
    if n == x:
      x, y = y, x
    DP[i + 1][x] += 1
    DP[i + 1][y] -= 1
    if DP[i + 1][z] < 0:
      print("No")
      exit()
    L[i] = R[x]
    L[k] = R[y]

print("Yes")
for i in L:
  print(i)
import math
A,B,N=map(int,input().split())
s=math.floor((A*(B-1))/B))
t=math.floor((A*N)/B))
print(max(s,t))

### FIXED CODE ###

import math
A,B,N=map(int,input().split())
s=math.floor((A*(B-1))/B)
t=math.floor((A*N)/B)
print(min(s,t))
n=input()
n = int(n)
x=input()
x = int(x)
t=input()
t=int(t)
if x == 1:
    count = n
else:
    count = n//x 
    if n%x == 0:
        pass
    else:
    　　count = count + 1

print(t*count)

### FIXED CODE ###

def solve(n, x, t):
    return (n + x - 1) // x * t

n, x, t = map(int, input().split())
print(solve(n, x, t))
n = int(input())
A = list(map(int,input().split()))
m = int(input())
B = list(map(int,input().split()))

def solve(x,y):
    if y<0:    return False
    elif y==0:  return True
    elif x==n:  return False
    else:
        return solve(x+1,y) or solve(x+1,y-A[x])
    
for i in range(m):
    if solve(0,B[i]): print("yes") 
    else: print("no")



### FIXED CODE ###

n = int(input())
A = list(map(int,input().split()))
m = int(input())
B = list(map(int,input().split()))

T = [[0]*2001 for i in range(n)]

T[0][0] = 1
T[0][A[0]] = 1
for i in range(1,n):
    for j in range(2001):
        T[i][j] = T[i-1][j]
        if (j - A[i] >=0) and (T[i-1][j-A[i]] == 1):
            T[i][j] = 1
    
for i in range(m):
    if T[n-1][B[i]] == 1: print("yes")
    else: print("no")
n,x,m=map(int,input().split())
l=[0]*m
s=[0]*m
t=p=0
while l[x]<1:
  l[x]=t
  s[x]=s[p]+x
  p=x
  x=pow(p,2,m)
  t+=1
T=t-l[x]
S=s[p]+x-s[x]
if n<t:
  print(s[l.index((n-1)%m)])
else:
  print(S*((n-l[x])//T)+s[l.index((l[x]+(n-l[x])%T-1)%m)])

### FIXED CODE ###

n,x,m=map(int,input().split())
l=[-1]*m
s=[0]*m
t=p=0
while l[x]<0:
  t+=1
  l[x]=t
  s[x]=s[p]+x
  p=x
  x=pow(p,2,m)
T=t+1-l[x]
S=s[p]+x-s[x]
if n<l[x]:
  print(s[l.index(n)])
else:
  print(S*((n-l[x])//T)+s[l.index(l[x]+(n-l[x])%T)])
N = int(input())
i = 0
a,b = divmod(N, 26)
A = list(range(a))

while(N!=0):
  c,d = divmod(N-1, 26)
  A[i] = chr(d+97)
  N = c
  i+=1

A.reverse()
print("".join(A))

### FIXED CODE ###

import math

N = int(input())
i = 0

#c = math.log(N-1, 26)
#A = list(range(int(c)+1))
A = []

while(N!=0):
  c,d = divmod(N-1, 26)
  A.append(chr(d+97))
  #A[i] = chr(d+97)
  N = c
  i+=1

A.reverse()
print("".join(A))
a,b,c,d = map(int,input().split())

n = b-a-1
n_c = n//c
n_d = n//d
n_gap = n//(c*d)

print(n-n_c-n_d+n_gap+1)

### FIXED CODE ###

s = input()
for i in range(1,4):
  if s[i]==s[i-1]:
    print('Bad')
    exit()
print('Good')
inp_1 = input()
inp_2 = input().split(" ")
r = ""

for i in range(inp_1):
  r += inp_2[0][i]
  r += inp_2[1][i]

print(o)

### FIXED CODE ###

l = [1,2,3]
a = int(input())
b = int(input())
c = [o for o in l if o not in [a,b]]
print(c[0])
N, A, B = [int(input()) for i in range(3)]
count = 0

for n in range(1,N+1):
  d = str(n)
  x = list(map(int, d))
  y = sum(x)
  
  if A <= y <= B:
    count += n

print(count)


### FIXED CODE ###

N, A, B = map(int, input().split())
count = 0

for n in range(1,N+1):
  d = str(n)
  x = list(map(int, d))
  y = sum(x)
  
  if A <= y <= B:
    count += n

print(count)
from sys import stdin
from math import factorial

n = int(stdin.readline().rstrip().split())

print(n**3)

### FIXED CODE ###

from sys import stdin
from math import factorial
n = int(stdin.readline().rstrip())
print(n**3)
a, p = map(int, input().split())
apple = a*3 + p
return int(apple/2)

### FIXED CODE ###

a, p = map(int, input().split())
print(int((a*3 + p)/2))
N, M = map(int, input().split())
ab = [[int(a) for a in input().split()] for _ in range(N)]
cd = [[int(a) for a in input().split()] for _ in range(M)]
for i in range(N):
    min_distance = 99999
    for j in range(M):
        manhattan_distance = abs(ab[i][0]-cd[j][0])+abs(ab[i][1]-cd[j][1])
        if min_distance > manhattan_distance:
            min_distance = manhattan_distance
            check_point = j
    print(check_point+1)

### FIXED CODE ###

if __name__ == '__main__':
    student_count, checkpoint_count = map(int, input().split())
    student_points = [list(map(int, input().split())) for i in range(1, student_count + 1)]
    check_points = [list(map(int, input().split())) for i in range(1, checkpoint_count + 1)]
 
    for student_point_x, student_point_y in student_points:
        point_number = 0
        shortest_distance = float('inf')
        manhattan_distance = 0
 
        for i in range(len(check_points)):
            diff_x = abs(student_point_x - check_points[i][0])
            diff_y = abs(student_point_y - check_points[i][1])
            manhattan_distance = diff_x + diff_y
 
            if manhattan_distance < shortest_distance:
                shortest_distance = manhattan_distance
                point_number = i + 1
 
        print(point_number)
import math

N = input().split()

lcm = int(N[0]) * int(N[1]) / math.gcd(int(N[0]), int(N[1]))

print(int(lcm))


### FIXED CODE ###

from fractions import gcd

N = input().split()

A = int(N[0])
B = int(N[1])

lcm = int(A * B / gcd(A, B))

print(lcm)
n,m,r=map(int,input().split())
a,b=sorted([n-1,r-m*n])
A=1
for i in range(a):A*=i+1
B=A
for i in range(a,b):B*=i+1
C=B
for i in range(b,a+b):C*=i+1
print(0 if a<1 else int(C/B/A))


### FIXED CODE ###

n,m,r=map(int,input().split())
r-=m*n
if r<0:print(0)
else:
 d=1
 for i in range(r):d*=i+1
 u=1
 for i in range(r):u*=i+n
 print(u//d)
stack = []
store_num = []
store_result = []

for i,c in enumerate(input_list.split()):

        
        
        def pop_and_stack(list_,num):
                     
            list_.pop()
            list_.pop()
            list_.append(num)
            
            return list_
            
    
        if c == '+' :
            a = stack[-2]
            b = stack[-1]
            num = a+b
            pop_and_stack(stack,num)

        elif c== "-":
            a = stack[-2]
            b = stack[-1]
            num = a-b
            pop_and_stack(stack,num)
        elif c =='*':
            a = stack[-2]
            b = stack[-1]
            num = a*b
            pop_and_stack(stack,num)  
        elif c == '/':
            a = stack[-2]
            b = stack[-1]
            num = a/b
            pop_and_stack(stack,num)
        else:
            stack.append(int(c))
            
print(stack[-1])           





### FIXED CODE ###

stack = []
store_num = []
store_result = []

for i,c in enumerate(input().split()): 
        
        def pop_and_stack(list_,num):
                     
            list_.pop()
            list_.pop()
            list_.append(num)
            
            return list_
            
    
        if c == '+' :
            a = stack[-2]
            b = stack[-1]
            num = a+b
            pop_and_stack(stack,num)

        elif c== "-":
            a = stack[-2]
            b = stack[-1]
            num = a-b
            pop_and_stack(stack,num)
        elif c =='*':
            a = stack[-2]
            b = stack[-1]
            num = a*b
            pop_and_stack(stack,num)  
        elif c == '/':
            a = stack[-2]
            b = stack[-1]
            num = a/b
            pop_and_stack(stack,num)
        else:
            stack.append(int(c))
            
print(stack[-1])