Harryxun/stf_run huggingface dataset:
n = int(input())
  print(n/2(n+1))

### FIXED CODE ###

n = int(input())
print(int(n/2*(n+1)))
def gcd(a, b):
    if a == b:
        return a
    elif a > b:
        return gcd(a - b, b)
    elif a < b:
        return gcd(a, b - a)

def gcd_arr(arr, N, remove = 0):
    if remove == 0:
        _gcd = arr[1]
    else:
        _gcd = arr[0]
    for i in range(N):
        if i != remove:
            _gcd = gcd(_gcd, arr[i])
    return _gcd

def solve():
    N = int(raw_input())
    arr = [int(_) for _ in raw_input().split()]
    max_gcd = 1
    for i in range(N):
        tmp = gcd_arr(arr, N, remove = i)
        if tmp > max_gcd:
            max_gcd = tmp
    print str(max_gcd)

if __name__ == '__main__':
    solve()


### FIXED CODE ###

def gcd(a, b):
    if b == 0:
        return a
    else:
        return gcd(b, a%b)

def solve():
    N = int(raw_input())
    arr = [int(_) for _ in raw_input().split()]
    left = [0] * (N + 1)
    right = [0] * (N + 1)
    left[0] = 0
    right[N] = 0
    for i in range(1, N+1):
        left[i] = gcd(left[i - 1], arr[i - 1])
    for i in range(N - 1, 0, -1):
        right[i] = gcd(right[i + 1], arr[i])
    max_gcd = 0
    for i in range(N):
        max_gcd = max(max_gcd, gcd(left[i], right[i+1]))
    print str(max_gcd)

if __name__ == '__main__':
    solve()
N = int(input())
SP = []
for i in range(N):
  S,P = input().split()
  P = int(P)
  SP.append(S,-P,i+1)
SP.sort()
for a,b,c in SP:
  print(c)

### FIXED CODE ###

N = int(input())
SP = []
for i in range(N):
  S,P = input().split()
  P = int(P)
  SP.append((S,-P,i+1))
SP.sort()
for a,b,c in SP:
  print(c)
H, W = [int(i) for i in input().split()]
A = [[int(i) for i in input().split()] for _ in range(H)]
A.append([0] * W)

ans = []
for h in range(H):
    for w in range(W - 1):
        if A[h][w] % 2 == 1:
            A[h][w] -= 1
            A[h][w + 1] += 1
            ans.append((h, w, h, w + 1))
    if A[h][W - 1] % 2 == 1:
        A[h + 1][W - 1] += 1
        ans.append((h, w, h + 1, W - 1))

if A[H][W - 1] % 2 == 1:
    ans.pop()

print(len(ans))
for h, w, nh, nw in ans:
    print(h + 1, w + 1, nh + 1, nw + 1)


### FIXED CODE ###

H, W = [int(i) for i in input().split()]
A = [[int(i) for i in input().split()] for _ in range(H)]

ans = []
for h in range(H):
    for w in range(W - 1):
        if A[h][w] % 2 == 1:
            A[h][w + 1] += 1
            ans.append([h + 1, w + 1, h + 1, w + 2])
    if h < H - 1 and A[h][W - 1] % 2 == 1:
        A[h + 1][W - 1] += 1
        ans.append([h + 1, W, h + 2, W])

print(len(ans))
for a in ans:
    print(*a)
N, A, B = map(int, input().split())
l = []
for i in range(1, N + 1):
    for j in range(str(i)):
        wa += int(j)
    if wa >= A and wa <= B:
        l.append(i)
print(sum)
        

### FIXED CODE ###

N, A, B = map(int, input().split())
l = []
wa = 0
for i in range(1, N + 1):
    for j in str(i):
        wa += int(j)
        #print(wa)
    if wa >= A and wa <= B:
        l.append(i)
    wa = 0
print(sum(l))
import sys
import os
import math
import fractions
from functools import reduce
from fractions import gcd

def test(x,k,m):
    #print("i=",k)
    tmp=[0]*len(x)
    for j in range(m):
        tmp[j]=x[j]
    #print('a=',x)
    #print('tmp=',tmp)
    del tmp[k]
    #print('tmp=',tmp)
    #print("a==",x)
    XX=gcd(*tmp)
    #print("XX=",XX)
    return XX

def gcd(*numbers):
    return reduce(math.gcd, numbers)

def gcd_list(numbers):
    return reduce(math.gcd, numbers)

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

yakusu=[0]*len(a)
for i in range(n):
    yakusu[i]=test(a,i,n)

ans=max(yakusu)
print(ans)

### FIXED CODE ###

a,b,t = map(int,input().split())
count=1
sum=0
while a*count < t+0.5:
    sum=sum + b
    count+=1
print(sum)
a,b = int(input().split())
if a*b % 2 ==0:
  print(Even)
else:
  print(Odd)

### FIXED CODE ###

a,b = (int(j) for j in input().split())
if a*b % 2 == 0:
  print('Even')
else:
  print('Odd')
x = input()

if x >= 30:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

x = int(input())

if -40 <= x and x <= 40:
    if x >= 30:
        print("Yes")
    else:
        print("No")
if X <30:
  print("No")
else:
  print("Yes")

### FIXED CODE ###

X = input()
X = int(X)

if X >= 30:
  print('Yes')
else:
  print('No')
r = int(input())
print(2*r*3. 141592653)

### FIXED CODE ###

r = int(input())
print(2*r*3.141592653)
n = int(input())
s = input()
r = []
g = []
b = []
for i, item in enumerate(s):
    if item=="R":
        r.append(i)
    elif item=="G":
        g.append(i)
    else:
        b.append(i)

count = 0
for low,mid,high in [(r,g,b), (r,b,g), (g,r,b), (g,b,r), (b,r,g), (b,g,r)]:
    for m in mid:
        ind = len(high) - 1
        for l in low:
            if l >= m:
                continue
            while (l+high[ind] > m*2) and (ind>0):
                ind -= 1
            if m < high[ind]:
                if l+high[ind] == m*2:
                    count += 1

#                 print(l, m, high[ind])
print(len(r)*len(g)*len(b) - count)

### FIXED CODE ###

n = int(input())
s = input()
r = []
g = []
b = []
for i, item in enumerate(s):
    if item=="R":
        r.append(i)
    elif item=="G":
        g.append(i)
    else:
        b.append(i)
if (not r) or (not g) or (not b):
    print(0)
else:
    count = 0
    for low,mid,high in [(r,g,b), (r,b,g), (g,r,b), (g,b,r), (b,r,g), (b,g,r)]:
        for m in mid:
            ind = len(high) - 1
            for l in low:
                if l >= m:
                    continue
                while (l+high[ind] > m*2) and (ind>0):
                    ind -= 1
                if m < high[ind]:
                    if l+high[ind] == m*2:
                        count += 1
    print(len(r)*len(g)*len(b) - count)
a = input() 
b = input()
return a * b + " " + 2 * a + 2 * b

### FIXED CODE ###

a, b = map(int, raw_input().split())
print a * b, 2 * a + 2 * b
import math
n = int(input())
sqrt_n = math.ceil(math.sqrt(n))

list_cand = []
for i in range(1, sqrt_n):
  if n % i == 0:
    list_cand.append(max(len(str(i)), len(str(n // i))))

print(min(list_cand))

### FIXED CODE ###

import math
n = int(input())
sqrt_n = math.ceil(math.sqrt(n))

result = 100
for i in range(1, sqrt_n + 1):
  if n % i == 0:
    digit = max(len(str(i)), len(str(n // i)))
    if digit < result:
      result = digit

print(result)
N = int(input())

if N%2==0:
  print(N)
else:
  print(2＊N)

### FIXED CODE ###

n = int(input())

if n%2==0:
    print(n)

else:
    print(2 * n)
A=list(map(int, input().split()))
b=Str(A[0])+Str(A[1])
#isinstance(sqrt(int(b)))
if isinstance(sqrt(int(b))):
  print('Yes')
else:
  print('No')

### FIXED CODE ###

import math
A=list(map(int, input().split()))
b=str(A[0])+str(A[1])
c=int(b)
#print(round(math.sqrt(int(b)),10))
#c=round(math.sqrt(int(b)),10)
d=0
for i in range(10000):
    if i*i==c:
        print('Yes')
        d=1
if d==0:
    print('No')
X,Y,Z,K = map(int, input().split())
A = map(int, input().split())
B = map(int, input().split())
C = map(int, input().split())


AB = [x+y for x,y in itertools.product(A,B)]
AB.sort(reverse = True)
AB = AB[:3000]

ABC = [x+y for x,y in itertools.product(AB,C)]
ABC.sort(reverse=True)

for i in range(K):
    print(ABC[i])

### FIXED CODE ###

import heapq

X,Y,Z,K = map(int, input().split())
A = [int(x) for x in  input().split()]
B = [int(x) for x in  input().split()]
C = [int(x) for x in  input().split()]

A.sort(reverse = True)
B.sort(reverse = True)
C.sort(reverse = True)

h = []

heapq.heappush(h, (-A[0]-B[0]-C[0], 0,0,0))

result = []
used = set()

for _ in range(K):
    value, i,j,k = heapq.heappop(h)
    result.append(-value)
    if i < X-1 and (i+1,j,k) not in used:
        heapq.heappush(h, (-A[i+1]-B[j]-C[k],i+1,j,k))
        used.add((i+1,j,k))
    if j < Y-1 and (i,j+1,k) not in used:
        heapq.heappush(h, (-A[i]-B[j+1]-C[k],i,j+1,k))
        used.add((i,j+1,k))
    if k < Z-1 and (i,j,k+1) not in used:
        heapq.heappush(h, (-A[i]-B[j]-C[k+1],i,j,k+1))
        used.add((i,j,k+1))
        
for v in result:
    print(v)
H = int(input())
ls = [-1]*(H+1)
ls[0] = 0
ls[1] = 1
def battle(h):
  if ls[h] != -1:
    return ls[h]
  else:
    tmp = 2*battle(h//2)
    ls[h] = tmp+1
    return ls[h]
print(battle(H))



### FIXED CODE ###

H = int(input())

def battle(h):
  if h == 1:
    return 1
  else:
    return 2*battle(h//2)+1
print(battle(H))
nn=int(input())
kk=int(input())
num_value = list(map(int, input().split())) 
num_value.sort()
goukei=0
for i in range(kk):
   goukei=gokei+num_value[i]
print(goukei)


### FIXED CODE ###

nn,kk=map(int,input().split())
num_value = list(map(int, input().split())) 
num_value.sort()
gokei=0
for i in range(kk):
   gokei=gokei+num_value[i]
print(gokei)
from collections import deque
N,Q = (int(x) for x in input().split())
connection ={i:[] for i in range(1,N+1)}
#木の構造
for i in range(1,N):
    a,b = (int(x) for x in input().split())
    connection[a].append(b)
    connection[b].append(a)

#各頂点のポイント入力
point ={i:0 for i in range(1,N+1)}
for i in range(1,Q+1):
    p,x = (int(x) for x in input().split())
    point[p] =x

#深さ優先探索
dq =deque()
dq.append(1)
passed ={i:0 for i in range(1,N+1)} #各頂点を通過チェック、０は未通過
while dq:
    now =dq.pop()
    passed[now] =1
    for next in connection[now]:
        if passed[next] ==1:
            continue
        point[next] +=point[now]
        dq.append(next)
        #print(next,end=" ")
print(*point.values())

### FIXED CODE ###


from collections import deque
import sys
input = sys.stdin.readline
N,M = (int(x) for x in input().split())
connection ={i:set() for i in range(1,N+1)}

#構造入力
for i in range(1,M+1):
    a,b = (int(x) for x in input().split())
    connection[a].add(b)
    connection[b].add(a)

#幅優先探索
dq =deque()
dq.append(1)
parent ={i:-1 for i in range(1,N+1)} #1につながっている＝答え
parent[1] =0
while dq:
    now =dq.popleft()
    for next in connection[now]:
        if parent[next] !=-1:
            continue
        else:
            parent[next] =now
            dq.append(next)
if -1 not in parent.values():
    del parent[1]
    print("Yes")
    print(*parent.values(),sep="\n")
NL=input().split()
N=int(NL[0])
L=int(NL[1])

S=[]
rank=[]
for i in range(N):
    S.append(input())
    rank.append(0)
temp=[]
for i in range(N):
    for j in range(N):
        if(S[i]<S[j]):
           temp.append(int(1))
        else:
            temp.append(int(0))        

for i in range(N*N):
    a=i%N
    rank[a]+=temp[i]
j=0
moji=""
for i in range(N):
    for j in range(N):
        if(i==rank[j]):
            moji=moji+S[j]
print(moji)

### FIXED CODE ###

N=input()
N=N.split()
sum=0
flag1=0
flag2=0
for i in N:
    if(i=="5"):
        flag1=1
    if(i=="7"):
        flag2=1
    sum=sum+int(i)
if(sum == 17 and flag1 == 1 and flag2 == 1):
    print("YES")
else:
    print("NO")
N = int(input())
S = [int(i) for i in range(S)]
if "Y" in S:
  print("Four")
else:
  print("Three")

### FIXED CODE ###

N = int(input())
S = input().split()
if "Y" in S:
    print("Four")
else:
    print("Three")
A, N = map(int, input().split())
if (A < 9) and (B < 9):
    print("Yay!")
else:
    print(":(")


### FIXED CODE ###

A, B = map(int, input().split())
if (A < 9) and (B < 9):
    print("Yay!")
else:
    print(":(")
N = int(input())
a = [input() for i in range(N)]
if max(a)　>=　sum(a) - max(a):
  print("Yes")
else:
  print("No")

### FIXED CODE ###

n=input()
a=list(map(int, input().split()))
if max(a)*2 < sum(a):
    print("Yes")
else:
    print("No")
a, b, c = input()
r = 0

if a + b >= c:
  r = b + c
else:
  r = a + b

print(r)

### FIXED CODE ###

a, b, c = map(int,input().split())
r = 0
if c <= a + b + 1:
  r = b + c
else:
  r = a + 2 * b + 1
print(r)
N = int(input())

modd = 1000_000_007
dp = [[[[0 for k in range(4)] for i in range(4) ]for j in range(4) ]for n in range(N+1)]

dp[0][3][3][3] = 1


for L in range(N):
    for i in range(4):
        
        for j in range(4):
        
            for k in range(4):
                if (dp[L][i][j][k]==0): continue
                for a in range(4):
                    if (a == 2 and i == 1 and j == 0):    continue
                    if (a == 2 and i == 0 and j == 1):    continue
                    if (a == 1 and i == 2 and j == 0):    continue
                    if (a == 2 and i == 1 and k == 0):    continue
                    if (a == 2 and j == 1 and k == 0):    continue
                    
                    dp[L+1][a][i][j] += dp[L][i][j][k]
                    dp[L+1][a][i][j] %= modd
  
ans = 0         
for i in range(4):
    for j in range(4):
        for k in range(4):
            ans += dp[N][i][j][k]
            ans %= modd
print(ans)
                

### FIXED CODE ###

N = int(input())

modd = 1000000007
dp = [[[[0 for k in range(4)] for i in range(4) ]for j in range(4) ]for n in range(N+1)]

dp[0][3][3][3] = 1


for L in range(N):
    for i in range(4):
        
        for j in range(4):
        
            for k in range(4):
                if (dp[L][i][j][k]==0): continue
                for a in range(4):
                    if (a == 2 and i == 1 and j == 0):    continue
                    if (a == 2 and i == 0 and j == 1):    continue
                    if (a == 1 and i == 2 and j == 0):    continue
                    if (a == 2 and i == 1 and k == 0):    continue
                    if (a == 2 and j == 1 and k == 0):    continue
                    
                    dp[L+1][a][i][j] += dp[L][i][j][k]
                    dp[L+1][a][i][j] %= modd
  
ans = 0         
for i in range(4):
    for j in range(4):
        for k in range(4):
            ans += dp[N][i][j][k]
            ans %= modd
print(ans)
import math
S = int(input())
X1 = 0
Y1 = 0
X2 = 0
Y2 = 0
X3 = 0
Y3 = 0
if  S <= 10 ** 9:
    X2 = S
    Y3 = 1
else:
    X2 = int(math.sqrt(S+1))
    Y3 = X2
    s = X2 ** 2  - S #残りの面積
    for i in range(1, int(math.sqrt(s) + 1)):
        if s%i == 0 and s%i <= 10 ** 9 and i <= 10 ** 9:
                X3 = i
                Y2 = s
                break


print (X1, Y1, X2, Y2, X3, Y3)


### FIXED CODE ###

import math
S = int(input())
X1 = 0
Y1 = 0
X2 = 0
Y2 = 0
X3 = 0
Y3 = 0
if  S <= 10 ** 9:
    X2 = S
    Y3 = 1
elif S == 1000000000000000000:
    X2 = int(math.sqrt(S))
    Y3 = X2
else:
    X2 = int(math.sqrt(S) + 1)
    Y3 = X2
    s = X2 ** 2  - S #残りの面積
    for i in range(1, int(math.sqrt(s) + 1)):
        if s%i == 0 and s//i <= 10 ** 9 and i <= 10 ** 9:
            X3 = i
            Y2 = s//i
            break

print (X1, Y1, X2, Y2, X3, Y3)
import bisect

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

if 0 in X:
  K=K-1

Right=[]
Left=[]
  
for x in X:
  if x>0:
    Right.append(x):
  else:
    Left=[abs(x)]+Left

print(Right)
print(Left)
      
    

### FIXED CODE ###

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

ans=[]

for i in range(N-K+1):
  xl=X[i]
  xr=X[i+K-1]
  ans.append(min(abs(xl)+abs(xr-xl),abs(xr)+abs(xl-xr)))

print(min(ans))
N = int(input())
d = map(int, input().split())
sum = 0

for i in range(N):
  for j in range(i+1):
    sum += d(i) * d(j)
    
print(sum)

### FIXED CODE ###

N = int(input())
d = list(map(int, input().split()))
s = 0

for i in range(N):
  for j in range(i+1):
    if i != j:
      s += d[i]* d[j]
    
print(s)
n = int(input())
a = [0]*n
b = [0]*n
c = [0]*n
for i in range(n):
    a[i], b[i], c[i] = map(int, input().split())

dpa = [a[0]]+[0]*(n-1)
dpb = [b[0]]+[0]*(n-1)
dpc = [c[0]]+[0]*(n-1)
for i in range(1,n):
    dpa[i] = max( dpb[i-1]+a[i], dpc[i-1]+a[i])
    dpb[i] = max( dpc[i-1]+b[i], dpa[i-1]+b[i])
    dpa[i] = max( dpa[i-1]+c[i], dpb[i-1]+c[i])

print(max(dpa[-1], dpb[-1], dpc[-1]))

### FIXED CODE ###

n = int(input())
h = tuple(map(int, input().split()))

dp = [0]*n
dp[0] = 0
dp[1] = abs(h[1]-h[0])
for i in range(2,n):
    dp[i] = min(dp[i-1]+abs(h[i]-h[i-1]),dp[i-2]+abs(h[i]-h[i-2]))
print(dp[-1])
l,r = list(map(int, input().split())) l  %= 2019
r %= 2019
res=2019
if r-l >= 2019:
    print(0)
else:
    for i in range(r-l+1):
        if res > l*(l+1):
            print(l*(l+1))
            break

### FIXED CODE ###

L, R = list(map(int, input().split(" ")))

if R - L >= 2019:
    print(0)
else:
    L = L % 2019
    R = R % 2019
    
    if L >R:
        print(0)
    else:
        mi = (L*(L+1)) %2019
        for i in range(L, R):
            for j in range(i+1, R+1):
                tmp = (i*j) % 2019
                if tmp < mi:
                    mi = tmp
                    
        print(mi)
from collections import defaultdict
n = int(input())
points = [tuple(map(int, input().split())) for _ in range(n)]

cnt = defaultdict(int)
for i in range(n):
    for j in range(n):
        if i == j:
            continue
        cnt[(points[i][0] - points[j][0], points[i][1] - points[j][1])] += 1

# print(cnt)
ans = n - max(cnt.values())
print(ans)


### FIXED CODE ###

from collections import defaultdict
n = int(input())
points = [tuple(map(int, input().split())) for _ in range(n)]

cnt = defaultdict(int)
cnt[(0, 0)] = 0
for i in range(n):
    for j in range(n):
        if i == j:
            continue
        cnt[(points[i][0] - points[j][0], points[i][1] - points[j][1])] += 1

# print(cnt)
ans = n - max(cnt.values())
print(ans)
N = int(input())
if N < 105:
    print(int(0))
elif 105<=N<135:
    print(int(1))
elif 135<=N<165:
    print(int(2))
elif 165<=N<189
    print(int(3))
elif 189<=N<195
    print(int(4))
else:
    print(int(4))

### FIXED CODE ###

N = int(input())
if N < 105:
    print(int(0))
elif 105<=N<135:
    print(int(1))
elif 135<=N<165:
    print(int(2))
elif 165<=N<189:
    print(int(3))
elif 189<=N<195:
    print(int(4))
else:
    print(int(5))
L = [int(x) for x in input().split]
L.sort()
print(L[1] * L[1])

### FIXED CODE ###

L = [int(x) for x in input().split()]
L.sort()
print(L[1] * L[0] // 2)
n = int(input())
h = list(map(int, input().split()))
max_step = []
for m in range(n-1):
    step = 0
    for k in range(m, n-1):
        if h[k] >= h[k + 1]:
            step += 1
        else:
            break
    max_step.append(step)
print(max(max_step))

### FIXED CODE ###

n = int(input())
h = list(map(int,input().split()))
ans = []
a = 0
for i in range(1,n):
    if h[i] <= h[i-1]:
        a += 1
    else:
        ans.append(a)
        a = 0
ans.append(a)
print(max(ans))
x, y, a, b, c = map(int, input().split())
arrayP = list(map(int, input().split()))
arrayQ = list(map(int, input().split()))
arrayR = list(map(int, input().split()))
arrayP.sort(reverse=True)
arrayQ.sort(reverse=True)
arrayR.sort(reverse=True)
arrayAns = []
for i in range(x):
    arrayAns.append(int(arrayP[i]))
for i in range(y):
    arrayAns.append(int(arrayQ[i]))
arrayAns.sort()
for i in range(len(arrayR)):
    if arrayAns[i] <= int(arrayR[i]):
        arrayAns[i] = int(arrayR[i])
    else:
        break
print(sum(arrayAns))


### FIXED CODE ###

x, y, a, b, c = map(int, input().split())
arrayP = list(map(int, input().split()))
arrayQ = list(map(int, input().split()))
arrayR = list(map(int, input().split()))
arrayP.sort(reverse=True)
arrayQ.sort(reverse=True)
arrayR.sort(reverse=True)
arrayAns = []
for i in range(x):
    arrayAns.append(int(arrayP[i]))
for i in range(y):
    arrayAns.append(int(arrayQ[i]))
arrayAns.sort()
for i in range(min(len(arrayR), len(arrayAns))):
    if arrayAns[i] <= int(arrayR[i]):
        arrayAns[i] = int(arrayR[i])
    else:
        break
print(sum(arrayAns))
n=int(input())
s=set()
for i in range(n):
    s^=set(int(input()))
print(len(s))


### FIXED CODE ###

n=int(input())
s=set()
for i in range(n):
    s ^= {input()}
print(len(s))
def COMinit():
    fac[0] = fac[1] = 1
    finv[0] = finv[1] = 1
    inv[1] = 1
    for i in range(2,max):
        fac[i] = fac[i-1]*i%mod
        inv[i] = mod - inv[mod%i]*(mod//i)%mod
        finv[i] = finv[i-1]*inv[i]%mod

def COM(n,k):
    if n < k:
        return 0
    if n < 0 or k < 0:
        return 0
    return fac[n] * (finv[k]*finv[n-k]%mod)%mod

mod = 998244353
N,M,K = map(int,input().split())

max = N 
fac = [0] * max
finv = [0] * max
inv = [0] * max
COMinit()
ans = 0
for i in range(K+1):
    c = COM(N-1,i)
    m = pow(M-1,N-i-1,mod)
    ans = (ans + ((c*m%mod)*M%mod))%mod
print(ans)


### FIXED CODE ###

def COMinit():
    fac[0] = fac[1] = 1
    finv[0] = finv[1] = 1
    inv[1] = 1
    for i in range(2,max):
        fac[i] = fac[i-1]*i%mod
        inv[i] = mod - inv[mod%i]*(mod//i)%mod
        finv[i] = finv[i-1]*inv[i]%mod

def COM(n,k):
    if n < k:
        return 0
    if n < 0 or k < 0:
        return 0
    return fac[n] * (finv[k]*finv[n-k]%mod)%mod

mod = 998244353
N,M,K = map(int,input().split())

max = N + M + K
fac = [0] * max
finv = [0] * max
inv = [0] * max
COMinit()
ans = 0
for i in range(K+1):
    c = COM(N-1,i)
    m = pow(M-1,N-i-1,mod)
    ans = (ans + ((c*m%mod)*M%mod))%mod
print(ans)
N=int(input())
S=str(input())
list_R=[]
list_G=[]
list_B=[]
count=0
for i in range(N):
    if S[i]=="R":
        list_R.append(i)
    if S[i]=="G":
        list_G.append(i)
    if S[i]=="B":
        list_B.append(i)
for i in range(N):
    for j in range(N):
        if i+2*j>N-1:
            break
        if S[i]!=S[i+j] and S[i+j]!=S[i+j*2] and S[i+2*j]!=S[i]:
            count=count+1

print(len(list_B)*len(list_G)*len(list_R)-count)
        


### FIXED CODE ###

import math as np
K=int(input())
P=0
for i in range(1,K+1):
    for j in range(1,K+1):
        l=np.gcd(i,j)

        for k in range(1,K+1):
            m=np.gcd(l,k)
            P=m+P
print(P)
A = int(input())
B = int(input())
C = int(input())
if A == B == C:
    print('Yes')
else:
    print('No')


### FIXED CODE ###

A, B, C = map(int, input().split())
if A == B and B == C:
    print('Yes')
else:
    print('No')
L, R = map(int, input().split())

num_list = list(range(L, R + 1))

num_list = [i % 2019 for i in num_list]
num_list.sort()

if 1 in num_list and 673 in num_list:
    print(0)
else:
    print(num_list[0] * num_list[1])


### FIXED CODE ###

L, R = map(int, input().split())
if (L <= 673 <= R and R - L >= 3) or (R - L >= 673):
    print(0)
else:
    mods = []
    mods_append = mods.append
    for i in range(L, R):
        for j in range(i + 1, R + 1):
            m = (i * j) % 2019
            mods_append(m)
            if m == 2:
                break

    print(min(mods))
import sys
input = sys.stdin.readline

n = int(input())
C = [list(map(int,input().split())) for i in range(n)]

import math

for i in range(n):
    a = C[i][0]
    b = C[i][1]
    c = C[i][2]
    d = C[i][3]
    ng = 0

    e = 0  # 最初に補充が発生する直前の本数
    e0 = a - b
    e1 = ((c - a%b) // b) * b + a%b
    e = min(e0, e1)

    if e < 0 or b > d:
        ng = 1
    else:
        g = math.gcd(b, d)
        # print(c+1, b-1, g)
        if c+1 <= b-1 and (c - e) // g < (b-1 - e) // g:
            ng = 1

    if ng == 1:
        print("No")
    else:
        print("Yes")
        

### FIXED CODE ###

import sys
input = sys.stdin.readline

n = int(input())
C = [list(map(int,input().split())) for i in range(n)]

from fractions import gcd

for i in range(n):
    a = C[i][0]
    b = C[i][1]
    c = C[i][2]
    d = C[i][3]
    ng = 0

    e = 0  # 最初に補充が発生する直前の本数
    e0 = a - b
    e1 = ((c - a%b) // b) * b + a%b
    e = min(e0, e1)

    if e < 0 or b > d:
        ng = 1
    else:
        g = gcd(b, d)
        # print(c+1, b-1, g)
        if c+1 <= b-1 and (c - e) // g < (b-1 - e) // g:
            ng = 1

    if ng == 1:
        print("No")
    else:
        print("Yes")
#include<iostream>
#include<algorithm>
#include<vector>

using namespace std;

int main(){
  int N, T; cin >> N >> T;
  vector<int> c[i], t[i];
  for(int i = 0, i < N; ++i) {
    cin >> c[i] >> t[i];
  }
  int MAX = 1 << 30;
  int ans = MAX;

  for (int i = 0; i < N; ++i){
    if(t[i] <= T){
      ans = min(ans, c[i]);
      
    }
  }

  if (ans <  MAX){
    cout << ans << endl;
  }
  else {
    cout << "TLE" << endl;
  }
}

### FIXED CODE ###

n,T = map(int,input().split())
mn = 1001
for i in range(n):
    c,t = map(int,input().split())
    if t <= T:
        mn = min(mn,c)

if mn == 1001:
    print("TLE")
else :
    print(mn)
O, E = [input() for _ in range(2)]
E += ""

length = max(len(O), len(E))

for i in range(length):
    print(O[i], end='')
    print(E[i], end='')


### FIXED CODE ###

O, E = [input() for _ in range(2)]
E += " "

for i in range(len(O)):
    print(O[i], end='')
    print(E[i], end='')