peterverebics/CodeNet_Python_428 huggingface dataset:
# Judge status: Accepted
l = int(input())
ans = (l/3)**3
print(ans)
# Judge status: Accepted
X=int(input())
cnt=0
for i in range(1,10**7):
    cnt+=X
    if cnt%360==0:
        print(i)
        break
# Judge status: Accepted
s = input()
t = input()
l = len(s)
t_l = len(t)
l_gap = l - t_l

x = 0
for i in range(l_gap + 1):
  c = 0
  for m in range(t_l):
    if t[m] == s[i+m]:
      c += 1
  if c > x:
    x = c
print(t_l -x)
# Judge status: Accepted
L = int(input())
r = L/3
print(r**3)
# Judge status: Wrong Answer
import math

a,b,x = map(int,input().split())
if 2*(a**2)*b <= 2*(a**2)*x:
    print(math.degrees(math.atan2(2*(b-x/(a**2)), a)))
else:
    print(math.degrees(math.atan2(b, 2*x/(a*b))))
# Judge status: Wrong Answer
# input
N, K = map(int, input().split())

print(N % K)
# Judge status: Wrong Answer
lis =[]
abc =[]
count = 0

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

for i in lis:
    if any(i == j for j in abc):
        pass
    else:
        abc.append(i)
        count += 1

print(count)
# Judge status: Accepted
import numpy as np
import itertools

Cmin = 10**10
N, M, X = map(int, input().split())
L = np.array([[int(j) for j in input().split()] for i in range(N)])
for i in range(N):
  for idx in itertools.combinations(list(range(N)), i+1):
    A = np.zeros(M+1, dtype=int)
    A = A + np.sum(L[list(idx)], axis=0)
    if A[0] < Cmin and (A[1:] >= X).all() == True:
      Cmin = A[0]
if Cmin == 10**10:
  print(-1)
  exit()
print(Cmin)
# Judge status: Accepted
n=int(input())
a=list(map(int,input().split()))
dp=[10**9]*(n)
dp[0]=0
for i in range(1,n):
    dp[i]=min(dp[i],dp[i-1]+abs(a[i]-a[i-1]))
    if i==1:
        continue
    dp[i]=min(dp[i],dp[i-2]+abs(a[i]-a[i-2])) 
print(dp[n-1])
# Judge status: Wrong Answer
s=input()
while len(s)>7:
    if s[-5:]=='dream' or s[-5:]=='erase':
        s=s[-5:]
    elif s[-6:]=='eraser':
        s=s[-6:]
    else:
        s=s[-7:]
print('YES' if s=='erase' or s=='dreamer' or s=='dream' or s=='eraser' or s=='' else 'NO')
# Judge status: Wrong Answer
a,b=map(int,input().split())
if a==0 or b==0:
    print('Zero')
elif a>0 and b>0:
  print('Positive')
elif a<0 and b>0:
  print('zero')
elif a<0 and b<0:
  if (b-a)%2==0:
    print('Negative')
  else:
    print('Positive')
# Judge status: Accepted
n, k= map(int, input().split())
print(0) if n%k == 0 else print(1)
# Judge status: Accepted
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math
###############################################################################\
s=input()
a="Sunny"
b="Cloudy"
c="Rainy"
if s==a:
	print(b)
elif s==b:
	print(c)
else:
	print(a)
# Judge status: Wrong Answer
N, M = map(int, input().split())

for i in range(M//N, int(N**0.5)-1, -1):
    if M % i == 0:
        print(i)
        break
# Judge status: Wrong Answer
n = int(input())
balls = list(map(int, input().split()))
conbi = [0]*n
result = 0
for i in balls:
    conbi[i-1] +=1
print(conbi)
for j in range(n):
    result += (conbi[j]*(conbi[j]-1))//2
for k in balls:
    print(result-conbi[k-1]+1)
# Judge status: Accepted
#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys
input= lambda: sys.stdin.readline().rstrip()
def pin(type=int):return map(type,input().split())
def tupin(t=int):return tuple(pin(t))
#%%code
def resolve():
    K,A,B=pin()
    t=(B-A)/2
    if K<A or B-A<=2:
        print(K+1)
        return
    K-=(A-1)
    cnt=A
    p,q=K%2,K//2
    cnt+=(B-A)*q+p
    print(cnt)

#%%submit!
resolve()
# Judge status: Accepted
s = input()
start = 1000000
end = 0

for i in range(len(s)):
    #print(s[i])
    if s[i] == 'A' and start > i:
        start = i
        #print(start)
    elif s[i] == 'Z' and end < i:
        end = i

print(end - start + 1)
# Judge status: Accepted
n = int(input())
a = list(map(int,input().split()))

cnt = 0
num = 1
for i in range(n):
    if a[i] != num:
        cnt += 1
        continue
    num += 1
print(cnt if cnt != n else -1)
# Judge status: Accepted
x, y, a, b ,c = map(int, input().split())
pList = sorted(list(map(int, input().split())), reverse=True)
qList = sorted(list(map(int, input().split())), reverse=True)
rList = sorted(list(map(int, input().split())), reverse=True)

xyList = sorted(pList[:x] + qList[:y]) # 小さい順

for i, r in enumerate(rList):
  if len(xyList) <= i:
    break;
  if xyList[i] > r:
    break;
  xyList[i] = r
print(sum(xyList))
# Judge status: Wrong Answer
def resolve():
    N = int(input())
    A = list(map(int, input().split()))
    if N%2 == 0:
        print(abs(sum(A[:N//2]) - sum(A[N//2:])))
    else:
        if A[0] <= A[-1]:
            print(abs(sum(A[:N//2+1]) - sum(A[N//2+1:])))
        if A[0] > A[-1]:
            print(abs(sum(A[:N//2]) - sum(A[N//2:])))
resolve()
# Judge status: Accepted
import fractions
n=int(input())
t = list(map(int, input().split()))
x=0
ans = t[0]
for i in range(1, n):
    ans = ans * t[i] // fractions.gcd(ans, t[i])
for j in range(n):
    x+=ans//t[j]
print(x%(10**9+7))
# Judge status: Accepted
a, v = map(int, input().split())
b, w = map(int, input().split())
t = int(input())
print('YES' if abs(a - b) <= t * (v - w) else 'NO')
# Judge status: Accepted
# 2つの入力を空白で分割し、数値化
s = input()

for c in s:
    if c == "7":
        print("Yes")
        exit(0)
    else:
        pass

print("No")
# Judge status: Accepted
# https://atcoder.jp/contests/abc099/tasks/abc099_b

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

num = 0
for i in range(1, 999):
    if b - a == i + 1:
        num = i
        break
ans = num * (num + 1) // 2 - a
print(ans)
# Judge status: Wrong Answer
N, M = map(int, input().split())
A = list(map(int, input().split()))
bc = [list(map(int, input().split())) for _ in range(M)]
bc = sorted(bc, key=lambda x:x[1], reverse=True)

idx = 0
for i in range(N):
  if A[i] < bc[idx][1]:
    bc[idx][0] -= 1
    A[i] = bc[idx][1]
  if bc[idx][0] == 0:
    idx += 1
  if idx == len(bc):
    break

print(sum(A))
# Judge status: Wrong Answer
S = input()
T = input()
if S in T and S != T and len(T) == len(S) + 1:
    print('Yes')
else:
    print('No')
# Judge status: Wrong Answer
N = input()
N = [int(s) for s in N]
input_line = input()
Line = input_line.split()
Line = [int(s) for s in Line]

count = 0
for x in range(N[0]):
    print("x",x)
    flag = 1
    for i in range(x+1):
        print("i",i)
        if Line[x] > Line[i] :
            print(Line[x],Line[i])
            flag = 0
    print("ss")
    if flag == 1 :
        print("OK")
        count += 1

print(count)
# Judge status: Accepted
N = int(input())
cnt = 0
f = False
for i in range(N):
    d1, d2 = map(int, input().split())
    if d1 == d2:
        cnt += 1
    else:
        cnt = 0
    if cnt >= 3:
        f = True
if f:
    print('Yes')
else:
    print('No')
# Judge status: Accepted
A,B,C = input().split()
ls = [int(A+B)+int(C),int(B+A)+int(C),int(A)+int(B+C),int(A)+int(C+B),int(B)+int(A+C),int(B)+int(C+A)]
print(max(ls))
# Judge status: Accepted
s = input()

count = 0

for i in range(len(s)//2):
  if s[i] != s[len(s)-1-i]:
    count += 1
print(count)
# Judge status: Accepted
from bisect import bisect_left,bisect_right
n=int(input())
A=sorted(list(map(int,input().split())))
B=sorted(list(map(int,input().split())))
C=sorted(list(map(int,input().split())))

ans=0
for i in B:
    ans +=bisect_left(A,i)*(n-bisect_right(C,i))
print(ans)
# Judge status: Accepted
n,y=map(int,input().split())
for a in range(n+1):
    for b in range(n+1):
        c=(y-(a*10000+b*5000))//1000
        if a+b+c==n and c>=0:
            print(a,b,c)
            exit()
print(-1,-1,-1)
# Judge status: Accepted
s = list(input())

print('Yes' if s[2] == s[3] and s[4] == s[5] else 'No')
# Judge status: Accepted
Value = [int(input()) for _ in range(5)]
amari = list()
for i in range(5):
  if(Value[i]%10 == 0):
    amari.append(10)
  else:
    amari.append(Value[i]%10)
min_amari = [i for i in range(5) if(min(amari)==amari[i])]

ans = 0
for i in range(5):
  if(i == min_amari[0]):
    ans += 0
  else:
    ans += (Value[i] + 10-amari[i])
ans += Value[min_amari[0]]
print(ans)
# Judge status: Wrong Answer
A,B,K=map(int,input().split())
if A>=K:
    A=A-K
else:
    B=B-(K-A)
    A=0
print(A,B)
# Judge status: Wrong Answer
n,m = map(int, input().strip().split())
to = [[] for _ in range(n)]

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

stack=[0]
ans=[None]*n
while stack:
    cur=stack.pop()
    for nxt in to[cur]:
        if ans[nxt] is not None: # visited
            continue
        ans[nxt]=cur+1
        stack.append(nxt)

if None in ans:
    print("No")
else:
    print("Yes")
    print(*ans[1:])
# Judge status: Wrong Answer
def gcd(a, b):
    if a < b:
        a, b = b, a
    while b != 0 :
        a, b = b, a % b
    return a

def lcm(a, b):
    return (a * b) / gcd(a, b)

a , b = map(int, input().split())
print(lcm(a, b))
# Judge status: Wrong Answer
X,N=map(int,input().split())
p=sorted(list(map(int,input().split())))

sa_min=100

"""
sa=[]
for i in range(N):
    sa.append(p[i]-X)
"""

for i in range(101):
    if sa_min>abs(i-X) and (not i in p):
        sa_min=abs(i-X)
        ans=i

if N==0:ans=X

print(ans)
# Judge status: Accepted
N = int(input())
ans = 1
while ans <= N:
  ans *= 2
print(int(ans/2))
# Judge status: Accepted
H = int(input())
W = int(input())
N = int(input())
print(min((N-1)//H, (N-1)//W) + 1)
# Judge status: Accepted
from heapq import heappush, heappop
n = int(input())
q = []
for _ in range(n):
    a, b = map(int, input().split())
    heappush(q, (b, a))

time = 0
while q:
    deadline, cost = heappop(q)
    time += cost
    if deadline < time:
        print('No')
        break
else:
    print('Yes')
# Judge status: Accepted
N = int(input())
S = input()
ans = 0
for i in range(1, N):
    head = set(S[:i])
    tail = set(S[i:])
    tmp_sum = 0
    for c in head:
        if c in tail:
            tmp_sum += 1

    ans = max(ans, tmp_sum)

print(ans)
# Judge status: Accepted
S=input()
if S[-1]=='s':
    print(S+'es')
else:
    print(S+'s')
# Judge status: Wrong Answer
n = int(input())

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

ans = 0

for i, a in enumerate(a):
    if i % 2 == 1:
        if a % 2 == 1:
            ans += 1

print(ans)
# Judge status: Accepted
n = int(input())
v = sorted([int(i) for i in input().split()], reverse=True)

rs = v[-1]/2**(n-1)
for i in range(n-1):
    rs += v[i] /2**(i+1)
print(rs)
# Judge status: Wrong Answer
n,r=map(int,input().split())
if n>=10:
  print(r)
else:
  print(r+100*(10-r))
# Judge status: Wrong Answer
a,b,c,d=map(int,input().split())
if b<c or a>d:
    print(0)
elif b>=c:
    print(min(abs(b-c),abs(b-d)))
else:
    print(min(abs(d-a),abs(d-b)))
# Judge status: Wrong Answer
# ABC117

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

max_length = L[-1]
sum_length = sum(L[0:len(L)-1])

print("Yes") if max_length > sum_length else print("No")
# Judge status: Accepted
a,b,c=list(map(int, input().split()))
a, b = b, a
a, c = c, a
print(a,b,c)
# Judge status: Accepted
n,x = map(int, input().split())
l = list(map(int, input().split()))

s = 1
d = 0
for i in l:
  d += i
  if d <= x:
    s += 1
print(s)
# Judge status: Accepted
import collections as co
n = int(input())
a = list(map(int,input().split()))
q = int(input())
bc = [list(map(int,input().split())) for i in range(q)]
c = co.Counter(a)
ans = sum(a)
for i in range(q):
    ans += (c[bc[i][0]] * (bc[i][1]-bc[i][0]))
    print(ans)
    c[bc[i][1]] += c[bc[i][0]]
    c[bc[i][0]] = 0
# Judge status: Wrong Answer
N = int(input())
r = [input() + ' ' + str(i + 1) for i in range(N)]

R = []
for i in r:
    R.append(i.split()[0] + ' ' + str(1000 -int(i.split()[1])) + ' ' + i.split()[2])
R = sorted(R)

for i in R:
    print(i.split()[2])
# Judge status: Wrong Answer
import numpy as np

n = int(input())

a = input().split(' ')

a = np.array(a).astype(int)


while a[a>0].shape[0] > 1:
  not_0_a = a[a!=0]
  min_ = not_0_a.min()
  a = a % min_
  
print(min_)
# Judge status: Accepted
K, N = map(int, input().split())
A = list(map(int, input().split()))

diff = [0]*N
diff[N-1] = A[0] + K - A[N-1]
for i in range(N-1):
  diff[i] = A[i+1] - A[i]

ans = sum(diff) - max(diff)
print(ans)
# Judge status: Wrong Answer
N = [int(e) for e in input().split()]
if(N[1]>=2):
    ans = N[0] + (N[1] - N[0]*2)//4
    print(ans)
else:
    print(0)
# Judge status: Accepted
n = int(input())
c = 1
x = []
x.append(n)
while True:
    if n%2 == 0:
        n = n//2
    else:
        n = 3*n+1
    c+=1
    if n in x:
        break
    x.append(n)
print(c)
# Judge status: Wrong Answer
N = int(input())
s = [input() for i in range(N)]
word_list = []
count = 0
for word in s:
    if sorted(word) in word_list:
        count += 1
    else:
        word_list.append(sorted(word))
print(count)
# Judge status: Accepted
import sys
n,a,b,c,d=map(int,input().split())
s=input()
for i in range(a-1,c-2):
  if s[i]=='#' and s[i+1]=='#':
    print('No')
    sys.exit()
for i in range(b-1,d-2):
  if s[i]=='#' and s[i+1]=='#':
    print('No')
    sys.exit()
if d<c:
  failflag=1
  for i in range(b-1,d):
    if s[i-1]=='.' and s[i]=='.' and s[i+1]=='.':
      failflag=0
  if failflag==1:
    print('No')
    sys.exit()
print('Yes')
# Judge status: Wrong Answer
import math
import sys
input = sys.stdin.readline
def main():
    N = int(input())
    POS = [list(map(int, input().split())) for i in range(N)]
    DIS = [[0]*(N) for _ in range(N)]
    M = 1
    for i in range(1,N+1):
        M *= i
    print(M)
    for i in range(N):
        for j in range(N):
            DIS[i][j] = math.sqrt((POS[i][0] - POS[j][0])**2 +(POS[i][1] - POS[j][1])**2)
    print(sum(map(sum, DIS))*(N-1)/M)

if __name__ == '__main__':
    main()
# Judge status: Accepted
n,a,b = map(int, input().split())
ans = sum(i for i in range(1, n+1) if a <= sum(map(int, str(i))) <= b)
print(ans)
# Judge status: Accepted
N=int(input())
A=list(map(int,input().split()))
total=sum(A)
cost=total
cumulative=0
for i in range(N):
    cumulative+=A[i]
    cost=min(cost,abs(cumulative-(total-cumulative)))
print(cost)
# Judge status: Accepted
H, A = list(map(int, input().split()))
print((H+A-1)//A)
# Judge status: Wrong Answer
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    X = int(input())

    x1, x2 = X, 180 - X
    for n in range(3, 361):
        s = 180 * (n - 2)
        d, m = divmod(s, n)
        if d == x1 or d == x2:
            print(n)
            break


main()
# Judge status: Accepted
N = int(raw_input())

char_list = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j"]

prev = ["a"]

for i in range(1, N):
    temp = []
    for item in prev:
        item_list = []
        for j in range(len(item)):
            item_list.append(item[j])
        num_char = len(set(item_list))
        for j in range(num_char+1):
            temp.append(item+char_list[j])

    prev = temp


print ' '.join(map(str, prev))
# Judge status: Accepted
n = int(input())
array = []
for i in range(n):
    array.append(input())
ac = 0
wa =0
tle = 0
re = 0

for s in array:
    if s=='AC':
        ac += 1
    elif s=='WA':
        wa += 1
    elif s=='TLE':
        tle += 1
    elif s=='RE':
        re += 1
print('AC x '+str(ac))
print('WA x '+str(wa))
print('TLE x '+str(tle))
print('RE x '+str(re))
# Judge status: Accepted
a = int(input())
b = int(input())
lst = [1, 2, 3]

lst.remove(a)
lst.remove(b)

print(*lst)
# Judge status: Wrong Answer
def main():
    x, a, b = map(int, input().split())
    distance_a = a - x
    distance_b = b - x
    if distance_a < 0:
        distance_a = distance_a * -1
    elif distance_b < 0:
        distance_b = distance_a * -1
    if distance_a > distance_b:
        print('B')
    else:
        print('A')
main()
# Judge status: Accepted
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

a,b,x=nm()

if a+b>=x and a<=x:
  print('YES')
else:
  print('NO')
# Judge status: Accepted
n,m = map(int,input().split())
a = set([int(input()) for _ in range(m)])
mod = 10**9+7
fl = [0]*(n+1)
fl[0] = 1

for i in range(1,n+1):
    if i not in a:
        fl[i] = (fl[i-1] + fl[i-2])%mod
    else:
        fl[i] = 0
print(fl[-1])
# Judge status: Accepted
N = int(input())
#print(N)
K = int(input())
#print(K)
X = int(input())
#print(X)
Y = int(input())
#print(Y)

ans = 0
for i in range(N):
  if i+1 <= K:
    ans += X
  else:
    ans += Y
      
print(ans)
# Judge status: Accepted
# -*- coding: utf-8 -*-
# 整数の入力
s = input()
number = "1"

count = s.count(number)
print(count)
# Judge status: Wrong Answer
import numpy as np

n = int(input(""))
a = np.zeros((n,2))
cnt = 0

for i in range(n): 
    a[i] = input().split()
    if a[i,0] == a[i,1]:
        a[i] = [0]

for i in range(n-1):
    if a[i,0] == a[i+1,0]:
        cnt += 1
        print(cnt , i)
    elif cnt >= 2:
        cnt = cnt
    else:
        cnt = 0


if cnt >= 2:
    print("Yes")
else:
    print("No")
# Judge status: Accepted
from collections import deque

N,K=map(int,input().split())
D=list(map(int,input().split()))
like=list(range(1,10))
dislike0=False

for s in D:
    if s==0:
        dislike0=True
    else:
        like.remove(s)

like.sort()
q=deque(like)

if dislike0==False:
    like.insert(0,0)

while q:
    num=q.popleft()

    if num>=N:
        print(num)
        exit()
    for i in range(len(like)):
        q.append((int(str(num)+str(like[i]))))
# Judge status: Accepted
N = int(input())
P = tuple(map(int, input().split()))
Q = tuple(map(int, input().split()))
 
from itertools import permutations as per
tuples = per(range(1, N+1))
 
a = 0
b = 0
for i, t in enumerate(tuples):
    if t == P:
        a = i
    if t == Q:
        b = i
print(abs(a - b))
# Judge status: Accepted
# coding: utf-8
# Your code here!
import sys

n = int(input())
h = list(map(int, input().split()))
h = h[::-1]
for i in range(1, n):
  if h[i] >= h[i-1] + 2:
    print("No")
    sys.exit()
  elif h[i] == h[i-1] + 1:
    h[i] -= 1
print("Yes")
# Judge status: Wrong Answer
A,B,N=map(int,input().split())
#print(math.floor(A/B))
#c=[0]*N
s=0

if N<=B:
  print((A*(N-1))//B-A*((N-1)//B))
else:print(A-1)
exit()
for i in range(1,N+1):
  if s<(A*i)//B-A*(i//B):
    s=(A*i)//B-A*(i//B)
  if s==39204:print(i)
print(s)
# Judge status: Wrong Answer

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

ans = 0
cnt = 0
cur = X[0]
for i in range(1, N):
    if cur < X[i]:
        cnt += 1
    else:
        ans = max(ans, cnt + 1)
        cnt = 0
    cur = X[i]

print(ans)
# Judge status: Accepted
#copy

a, b = map(int, input().split())
if (a + b) % 2 == 1:
    print("IMPOSSIBLE")
else:
    print((a + b) // 2)
# Judge status: Wrong Answer
int = int(input()) 
print(int*2)
# Judge status: Accepted
#

import sys
input=sys.stdin.readline

def main():
    ab="qwertyuiopasdfghjklzxcvbnm"
    S=input()
    y=1
    for a in ab:
        if S.count(a)>1:
            y=0
            break
    if y==1:
        print("yes")
    else:
        print("no")
    
if __name__=="__main__":
    main()
# Judge status: Accepted
n, k = map(int, input().split())
p = list(map(int, input().split()))

p.sort()

print(sum(p[:k]))
# Judge status: Accepted
S = input()
stack = []

for s in S:
  if s == "B" :
    if not stack:
      continue
    else:
      stack.pop()
      
  elif s == "0" or s=="1":
    stack.append(s)
    
    
print("".join(stack))
# Judge status: Accepted
c = [list(map(int,input().split())) for i in range(3)]
a = c[0][0]-c[1][0]
b = c[1][0]-c[2][0]
d = c[0][0]-c[2][0]

if (a == c[0][1]-c[1][1]) and (a==c[0][2] - c[1][2]):
  if (b == c[1][1] - c[2][1]) and (b == c[1][2]-c[2][2]):
    if (d == c[0][1]-c[2][1]) and (d == c[0][2]-c[2][2]):
      print('Yes')
      exit()
      
      
print('No')
# Judge status: Wrong Answer
L=int(input())
if L%3==0:
    print((L//3)**3)
elif L%3==1:
    print((L/3)*(L/3)*(L/3+1))
else:
    print((L/3)*(L/3+1)*(L/3+1))
# Judge status: Accepted
nk = list(map(int,input().split()))
h = list(map(int,input().split()))
n,k = nk[0], nk[1] #5,3
DP = [0]
for i in range(1, n):#0~3 -> 1~4
  act = float("inf")
  for k_ in range(1, k+1):#0~2 -> 1~3
    if i-k_ < 0 : continue
    act = min(DP[-k_] + abs(h[i-k_]-h[i]), act)#
  DP+= [act]#[0,20,]
print(DP[-1])
# Judge status: Accepted
L, R = map(int, input().split())
ml = L // 2019
mr = R // 2019

for i in range(ml, mr+1):
  if L <= 2019 * i <= R:
    print(0)
    exit()

L %= 2019
R %= 2019
ans = float('inf')
if L > R:
  L, R = R, L
elif L == R:
  R += 2019
if L == 0 or R == 0:
  print(0)
  exit()

for i in range(L, R+1):
  for j in range(i+1, R+1):
    ans = min(ans, (i*j)%2019)

print(ans)
# Judge status: Wrong Answer
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

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

if __name__ == '__main__':
    a = [int(i) for i in input().split()]

    if (a[0] < a[1] and a[0]<a[2] and a[2] <a[1]) or (a[0] > a[1] and a[0]>a[2] and a[2] >a[1]):
        print("Yes")
    else:
        print("no")
# Judge status: Wrong Answer
n = int(input())
from fractions import gcd
g = 0
seki = 1
for i in range(n):
    s = int(input())
    g = gcd(g, s)
    seki *= s

print(seki//g)
# Judge status: Wrong Answer
n, a, b = map(int, input().split())

if abs(a-b) % 2 == 0:
    print(abs(a-b)//2)
else:
    print(min(b-1, n-a))
# Judge status: Accepted
import sys
import numpy as np

n=int(sys.stdin.readline())
v=np.array(sys.stdin.readline().split(),dtype='int64')
v=np.sort(v)


for i in range(n):
    if i==0:
        ans=v[i]/(2**(n-i-1))
    else:
        ans+=v[i]/(2**(n-i))

print(ans)
# Judge status: Wrong Answer
n = int(input())
da = list(map(int,input().split()))
ans = 0
now_max = 0
for i in range(n):
  if now_max < da[i]:
    ans += 1
    now_max = da[i]
print(ans)
# Judge status: Wrong Answer
A, B, C, D = map(int, input().split())

alice = [1 if A <= t < B else 0 for t in range(1, 101)]
bob = [1 if C <= t < D else 0 for t in range(1, 101)]

overlap = [1 for a, b in zip(alice, bob) if a > 0 and b > 0]

print(len(overlap))
# Judge status: Accepted
a,b = map(int, input().split())
for i in range(1,b+1):
    if a*i%b == 0:
        print(a*i)
        exit()
# Judge status: Accepted
from collections import deque
n=int(input())
a=sorted(list(map(int,input().split())),reverse=True)
if n==2:
	print(a[0])
	exit(0)
ans=a[0]
d=deque()
d.append(a[1])
d.append(a[1])
for i in range(2,n):
	x=a[i]
	ans+=d.popleft()
	d.append(x)
	d.append(x)
print(ans)
# Judge status: Accepted
#from collections import deque,defaultdict
from sys import stdin
input = stdin.readline
printn = lambda x: print(x,end='')
inn = lambda : int(input())
inl   = lambda: list(map(int, input().split()))
inm   = lambda:      map(int, input().split())
ins = lambda : input().strip()
DBG = True # and False
BIG = 10**18
R = 10**9 + 7

def ddprint(x):
  if DBG:
    print(x)

s = ins()
t = ins()
x = 0
for i in range(len(s)):
    if s[i]!=t[i]:
        x += 1
print(x)
# Judge status: Accepted
K, N = map(int, input().split())
lis_A = list(map(int, input().split()))
dif = [0]*len(lis_A)
dif[0] = K-lis_A[-1] + lis_A[0]
for i in range(1,len(lis_A)):
    dif[i] = lis_A[i]-lis_A[i-1]
ans = sum(dif)-max(dif)
print(ans)
# Judge status: Accepted
import sys
import math

N, X = map(int, input().split())
x = list(input().split())
city = [abs(int(x[i]) - X) for i in range(N)]
MAX = min(city)
candidate = []
for i in range(int(math.sqrt(MAX)+1)):
    if MAX % (i+1) == 0:
        candidate.append(i+1)
        candidate.append(MAX // (i+1))

candidate = list(sorted(candidate, reverse=True))

for j in range(len(candidate)):
    ans = candidate[j]
    tmp = [city[i] % ans for i in range(N)]
    if max(tmp) == 0:
        print(ans)
        sys.exit()
# Judge status: Accepted
N = int(input())

ans = 0
for i in range(1,N+1):
    k = N // i
    ans += (i + i*k) * k // 2
print(ans)
# Judge status: Wrong Answer
X, Y = map(int, input().split())
a = 2*Y-X
b = 2*X-Y

def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res

if a%3==0 and b%3==0:
    a //= 3 
    b //= 3
    print(combination(a+b, a))
else:
    print(0)