TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
l,r = map(int, input().split())

if r//673 > (l-1)//673 and r-l = 2:
  print('0')

else:
    print((l%2019) * ((l+1)%2019))

from itertools import combinations

l,r = map(int, input().split())

if r//673 > (l-1)//673 and r//3 >(l-1)//3:
  print('0')

else:
    cmb = list(combinations(range(l, r+1), 2))
    mod = [(cmb[i][0] * cmb[i][1]) % 2019 for i in range(len(cmb))]
    print(min(mod))

Verdicts: Runtime Error

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
L,R = map(int,input().split())
ans = 1000000000
for i in range(L,R + 1):
	if ans == 0:
		break
		
	for j in range(i,R + 1):
		if ans > i*j % 2019:
			ans = i*j % 2019
			if ans == 0
				break
print(ans)

L,R = map(int,input().split())
ans = 10000000000
for i in range(L,R + 1):
	if ans == 0:
		break
		
	for j in range(i + 1,R + 1):
		if ans > i*j % 2019:
			ans = i*j % 2019
			if ans == 0:
				break
print(ans)

Verdicts: Runtime Error

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
a,b=map(int,input().split())
mod=2019
if b-a>=2018:
  print(0)
else:
  ans=0
  for i in range(a,b+1):
    for j in range(i+1,b+1):
      ans=max(ans,(i*j)%mod)
  print(ans)

a,b=map(int,input().split())
mod=2019
if b-a>=2018:
  print('0')
else:
  ans=2018
  for i in range(a,b+1):
    for j in range(i+1,b+1):
      ans=min(ans,(i*j)%mod)
  print(ans)


Verdicts: Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
L,R=map(input().split())
if int(R/2019)-int(L/2019)>=1 or (R/2019.is_integer)==True or (L/2019.is_integer)==True:
	print(0)
elif R-L>=3:
	if int((R+1346)/2019)-int(L/2019)>=1 or int(R/2019)-int((L-674)/2019)>=1:
		print(0)
	elif int((R+673)/2019)-int(L/2019)>=1 or int(R/2019)-int((L-1347)/2019)>=1:
		print(0)
	else:
		print(min((i*j)/2019 for i<j in range(L,R+1)))
else:
	print(min((i*j)/2019 for i<j in range(L,R+1)))

L,R=map(int,input().split())
a=[]
if R-L>=2019:
	print(0)
else:
	for i in range(L,R+1):
		for j in range(i+1,R+1):
			a.append(((i%2019)*(j%2019))%2019)

	print(min(a))

Verdicts: Runtime Error

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
L, R = map(int, input().split())
MOD = 2019
# L = 2020
# R = 2040
diff = (R - L) % MOD
new_L = L % MOD
new_R = new_L + diff
# print("diff:{}, new_L:{}, new_R:{}".format(diff, new_L, new_R))

ans = L*R%MOD
for i in range(new_L, new_R):
    for j  in range(i+1, new_R+1):
        count += 1
        if ans > i*j%MOD:
            ans = i*j%MOD
print(ans)


L, R = map(int, input().split())
MOD = 2019
ans = L*R%MOD
for i in range(L, R):
    for j  in range(i+1, R+1):
        if ans > i*j%MOD:
            ans = i*j%MOD
        if ans == 0:
            break
    if ans == 0:
        break
print(ans)


Verdicts: Runtime Error

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
L, R = map(int, input().split())

mi=10**10
for l in range(L,new_R+1):
    for r in range(L+1,new_R+1):
        mod = (l*r) % 2019
        if mod < mi:
            mi=mod
        if mi==0:
            print(mi)
            import sys
            sys.exit()
print(mi)

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

import sys

mi=10**10
for l in range(L,R+1):
    for r in range(l+1,R+1):
        mod = (l*r) % 2019
        if mod < mi:
            mi=mod
        if mi==0:
            print(mi)
            sys.exit()
print(mi)

Verdicts: Runtime Error

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
# Setup
import sys
sys.setrecursionlimit(4100000)

l,r = [int(i) for i in input().split()]
a = []
l = l%2019
r = r%2019
temp = float('inf')
for i in range(l,r+1):
    for k in range(i+1,r+1):
        print(i,k)
        if i*k%2019 < temp:
            temp = i*k%2019
print(temp)

import sys
sys.setrecursionlimit(4100000)

l,r = [int(i) for i in input().split()]
if abs(l - r) >= 2019:
    temp = 0
else:
    temp = float('inf')
l = l%2019
r = r%2019
if l>r:
    r,l = l,r

for i in range(l,r+1):
    for k in range(i+1,r+1):
        if i*k%2019 < temp:
            temp = (i*k)%2019

print(temp) if l != r else print(temp)


Verdicts: Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
import numpy as np

L, R = [int(i) for i in input().split()]

if R - L > 2019:
  print(0)
else:
  arr = np.array(range(L, R + 1))
  l4min = sorted(arr % 2019)
  l4max = sorted(arr % 2019, reverse=True)
  a_1 = (l4min[0] * l4min[1]) % 2019
  a_2 = (l4max[0] * l4max[1]) % 2019
  a_3 = (l4max[0] * l4min[0]) % 2019
  l4mod3 = sorted(arr % 3)
  l4mod673 = sorted(arr % 673)
  a_4 = (l4mod3[0] * l4mod673[0]) % 2019
  print(min([a_1, a_2, a_3, a_4]))

import numpy as np

L, R = [int(i) for i in input().split()]

if R - L > 2019:
  print(0)
else:
  arr = np.array(range(L, R + 1)) % 2019
  arr_1 = arr[:, np.newaxis]
  arr_2 = arr[np.newaxis, :]
  arr_X = (arr_1 * arr_2) % 2019
  np.fill_diagonal(arr_X, 2018)
  print(np.min(arr_X))

Verdicts: Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
L, R = map(int, input().split())

M = []
for i in range(L, R+1):
  for j in range(i+1, R+1):
    if i % 3 == 0 or j % 3 == 0:
      M.append (i * j / 3 % 673)
    else:
      M.append(i * j % 2019)
if len(M) == 0:
  print(L)
else:
  print (min(M))

L, R = map(int, input().split())
if R-L >= 2019:
  print (0)
else:
  print (min([((i % 2019) * (j % 2019)) % 2019 for i in range(L,R) for j in range(i+1,R+1)]))

Verdicts: Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
l, r = map(int, input().split())
ans = 100000000000000000
if r -l > 2019:
  print('0')
else:
  for i in range(l-1,r+1):
    for j in range(i+1,r+1):
      if (i*j)%2019 < ans:
        ans = (i*j)%2019
print(ans)

l, r = map(int, input().split())
ans = 100000000000000000
if r -l > 2019:
  print('0')
else:
  for i in range(l,r+1):
    for j in range(i+1,r+1):
      if (i*j)%2019 <= ans:
        ans = (i*j)%2019
  print(ans)

Verdicts: Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
l, r = map(int,input().split())

ans = 2019

for i in range(l,r):
	for j in range(i+1,r+1):
		temp = (i*j)%2019
		print("{} {}".format(i,j))
		if ans > temp:
			ans = temp
			if ans == 0:
				print(ans)
				exit()
if ans == 2019:
	ans = l*r
print(ans)



l, r = map(int,input().split())

ans = 2019

for i in range(l,r):
	for j in range(i+1,r+1):
		temp = (i*j)%2019
		#print("{} {}".format(i,j))
		if ans > temp:
			ans = temp
			if ans == 0:
				print(ans)
				exit()
if ans == 2019:
	ans = l*r
print(ans)



Verdicts: Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
l, r = map(int, input().split())
mod1 = []
mod2 = []
for i in range(l,r+1):
  mod1.append(i%2019)
print(mod1)
for i in range(len(mod1)-1):
  for j in range(i+1,len(mod1)):
    mod2.append((mod1[i]*mod1[j])%2019)
print(mod2)
print(min(mod2))

l, r = map(int, input().split())
mod1 = []
mod2 = []
for i in range(l,r+1):
  mod1.append(i%2019)
print(mod1)
for i in range(len(mod1)-1):
  for j in range(i+1,len(mod1)):
    mod2.append((mod1[i]*mod1[j])%2019)
print(mod2)
print(min(mod2))


l, r = map(int, input().split())
mod1 = []
mod2 = []
cccc=0
for i in range(l,r+1):
  b=i%2019
  mod1.append(b)
  if b==0:
    cccc=1
    break
#print(mod1)
if cccc==1:
  print(0)
else:
  for i in range(len(mod1)-1):
    for j in range(i+1,len(mod1)):
      mod2.append((mod1[i]*mod1[j])%2019)
	#print(mod2)
  print(min(mod2))



Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
l,r=map(int,input().split())
ans=0
d=r-l
if d>=2019:
    d=2019

for i in range(l%2019,(l+d)%2019):
    for j in range(i+1,(l+d)%2019+1):
        a=(i*j)%2019
        if a<ans:
            a=ans
print(ans)


l,r=map(int,input().split())
ans=2018
for i in range(l,min(r,l+2020)):
    for j in range(i+1,i+2021):
        if i*j%2019<ans:
            ans=i*j%2019
        if ans==0:
            break
print(ans)


l,r=map(int,input().split())
ans=2018
d=r-l
if d>2019:
    d=2019

for i in range(l%2019,l%2019+d):
    for j in range(i+1,l%2019+d+1):
        a=(i*j)%2019
        if a<ans:
            ans=a
print(ans)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
L, R = map(int, input().split())
if R - L > 2019:
  print(0)
else:
  l = []
  for i in range(L, R + 1):
    for j in range(i, R + 1):
      l.append(i * j % 2019)
  print(min(l))

L, R = map(int, input().split())
if R - L > 2019:
  print(0)
else:
  l = []
  for i in range(L, R + 1):
    for j in range(i + 1, R + 1):
      l.append(i * j % 2019)
  print(min(l))

Verdicts: Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):

LR = input().split()
L = int(LR[0])
R = int(LR[1])
S = []

if R - L >= 2019:
    print("0")
else:
    for i in range(L+1,R):
        for j in range(i+1,R+1):
            S.append(i * j % 2019)
    print(min(S))




LR = input().split()
L = int(LR[0])
R = int(LR[1])
S = []

if R - L > 2019:
    print("0")
else:
    for i in range(L,R-1):
        for j in range(i-1,R):
            S.append(i * j % 2019)
    print(min(S))





LR = input().split()
L = int(LR[0])
R = int(LR[1])
S = []

if R - L >= 2019:
    print("0")
else:
    for i in range(L,R):
        for j in range(i+1,R+1):
            S.append(i * j % 2019)
    print(min(S))




Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
x, y = map(int,input().split())
print([x, -1][x%y])

l, r = map(int,input().split())
s = range(l, r+1)[:673]
print(min(i*j % 2019 for i in s for j in s if i<j))

Verdicts: Runtime Error

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
L,R = map(int,input().split())
n = [i % 2019 for i in range(L,R+1)]
print(n)
i = n[n.index(min(n))]
n[n.index(min(n))] = 2020
j = n[n.index(min(n))]
print(i * j % 2019)

L,R = map(int,input().split())
ans = []
if(R - L >= 2019):
    print(0)
else:
    for i in range(L,R):
        for j in range(i+1,R+1):
            ans.append((i*j)%2019)
    print(min(ans))
     

Verdicts: Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
l, r = map(int, input().split())
n = r-l+1
ans1 = 0
ans2 = 0
min1 = 1000000000
min2 = 10000000000


for i in range(min(n, 2024)):
   # print(l+i)
    if (l+i) % 2019 == 0:
        print(0)
        break
else:
    ans = 10000000000
    for i in range(min(n, 2019)):
        for j in range(i+1, min(n, 2020)):
            if ((l+i)*(r+j)) % 2019 < ans:
                ans = ((l+i)*(r+j)) % 2019
                # print(ans, l+i, r+j)
    print(ans)


l, r = map(int, input().split())
n = r-l+1
ans1 = 0
ans2 = 0
min1 = 1000000000
min2 = 10000000000


for i in range(min(n, 2024)):
   # print(l+i)
    if (l+i) % 2019 == 0:
        print(0)
        break
else:
    ans = 10000000000
    for i in range(min(n, 2019)):
        for j in range(i+1, min(n, 2020)):
            # print(l+i, l+j)
            if ((l+i)*(l+j)) % 2019 < ans:
                ans = ((l+i)*(l+j)) % 2019
                # print(ans, l+i, l+j)
    print(ans)


Verdicts: Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
import sys

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

if R-L >= 2019:
  print('0')
  sys.exit()

L = L % 2019
R = R % 2019
if L > R:
  print('0')

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

import sys
 
L, R = map(int, input().split())
 
if R-L >= 2019:
  print('0')
  sys.exit()
 
L = L % 2019
R = R % 2019
if L > R:
  print('0')
 
mmin = 2019
for i in range(L, R):
  for j in range(i+1, R+1):
    mmin = min(mmin, (i*j)%2019)
print(mmin)

Verdicts: Runtime Error

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
L, R = map(int, input().split())

if (L <= 2019 and 2019 <= R) :
    print(0)
else :
    min = (2 * (10 ** 9)) ** 2 + 1
    for i in range(L, R):
        for j in range(L + 1, R):
            print(i, j, i * j % 2019)
            mod = i * j % 2019
            if (min > mod) :
                min = mod
                if (min == 0):
                    break
        if (min == 0):
            break

    if (min == (2 * (10 ** 9)) ** 2 + 1):
        print(L * R)
    else:
        print(min)

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

if (2019 in range(L, R)) :
    print(0)
else :
    min = (2 * (10 ** 9)) ** 2 + 1
    for i in range(L, R):
        for j in range(L + 1, R):
            print(i, j, i * j % 2019)
            mod = i * j % 2019
            if (min > mod) :
                min = mod
                if (min == 0):
                    break
        if (min == 0):
            break

    if (min == (2 * (10 ** 9)) ** 2 + 1):
        print(L * R)
    else:
        print(min)

L, R = map(int, input().split())
right = min(L + 2019, R + 1)
minimum = 2019
for i in range(L, right):
    for j in range(i + 1, right):
        minimum = min(minimum, (i * j) % 2019)
print(minimum)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
L, R = map(int, input().split())
l = L % 2019
r = R % 2019
ans= []
if R - L >= 2019:
    print(0)
else:
    for i in range(l, r):
    　　　　for k in range(l+1, r+1):
        　　　　ans.append(i * k % 2019)
print(min(ans))

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

if R - L > 2019:
    print(0)
else:
    l = L % 2019
    r = R % 2019
    ans = 10000000
    if r > l:
        for i in range(l, r):
            for k in range(i+1, r+1):
                if ans > (i * k) % 2019:
                    ans = (i * k) % 2019
        print(ans)
    else:
        print(0)

Verdicts: Runtime Error

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
L, R = map(int,(input().split()))
if(R-L >= 673):
  print("0")
else:
  pass

L, R = map(int,(input().split()))
if(R-L >= 2019):
  print("0")
else:
  pass


L, R = map(int,(input().split()))
mod_min = 2018
if(R-L >= 673):
  print("0")
else:
  for i in range(L,R):
    for j in range(L+1,R+1):
      temp_mod = (i*j % 2019)
      if (temp_mod < mod_min):
        mod_min = temp_mod
  print(mod_min)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
import sys

l,r = list(map(int, input().split()))
imin = 0

if r-l+1 <=2019:
    for i in range(1,2019):
        for j in range(i+1,2020):
            if imin > (i*j)%2019:
                imin = (i+j)%2019
else:
    print(0)

import sys

l,r = list(map(int, input().split()))
imin = 0

if r-l+1 <=2019:
    for i in range(l,r):
        for j in range(i+1,r+1):
            if imin > (i*j)%2019:
                imin = (i+j)%2019
    print(imin)
else:
    print(0)

import sys

l,r = list(map(int, input().split()))
imin = 0

if r-l+1 <=2019:
    for i in range(1,2019):
        for j in range(i+1,2020):
            if imin > (i*j)%2019:
                imin = (i+j)%2019
    print(imin)
else:
    print(0)

import sys

l,r = list(map(int, input().split()))

if r-l+1 <3:
    imin = 10**9+7
    for i in range(r-l):
        for j in range(i+1,r-l+1):
            if imin > ((l+i)*(l+j))%2019:
                imin = ((l+i)*(l+j))%2019
    print(imin)
elif r-l+1 <673:
    if (l % 673)+r-l > 672:
        print(0)
    else:
        if l % 3 == 0 or l % 3 == 2:
            print((l % 673)*((l+1)% 673))
        else:
            print((l % 673)*((l+2)% 673))
else:
    print(0)

import sys

l,r = list(map(int, input().split()))

if r-l+1 <3:
    imin = 10**9+7
    for i in range(r-l):
        for j in range(i+1,r-l+1):
            if imin > ((l+i)*(l+j))%2019:
                imin = ((l+i)*(l+j))%2019
    print(imin)
elif r-l+1 <672:
    if (l % 673)+r-l > 672:
        print(0)
    else:
        if l % 3 == 0 or l % 3 == 2:
            print((l % 673)*((l+1)% 673))
        else:
            print((l % 673)*((l+2)% 673))
else:
    print(0)

import sys

l,r = list(map(int, input().split()))
imin = 10**9+7

if r-l+1 <=2019:
    for i in range(l,r):
        for j in range(i+1,r+1):
            if imin > (i*j)%2019:
                imin = (i*j)%2019
    print(imin)
else:
    print(0)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
L, R = list(map(int,input().split()))

 if R - L >= 2019:
        print(0)
        exit()
 
ans = float('inf')
for i in range(L, R):
    for j in range(i+1, R+1):
        t = i*j%2019
        ans = min(ans,t)
print(ans)

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

if(R - L) >= 2019:
    print(0)
    exit()
 
ans = float('inf')
for i in range(L, R):
    for j in range(i+1, R+1):
        t = i*j%2019
        ans = min(ans,t)
print(ans)

Verdicts: Runtime Error

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
import numpy as np
from sys import stdin

L,R=[int(x) for x in stdin.readline().rstrip().split()]

L1,L2=divmod(L,2019)
R1,R2=divmod(R,2019)

ret=L2*R2
ret1=ret % 2019

print(ret1,flush=True)

l,r=map(int,input().split())
a=0
if r-l<2019:
 	a=min([(i*j)%2019 for i in range(l,r+1) for j in range(i+1,r+1)])
print(a)

Verdicts: Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
l,r=map(int,input().split())
amari = 2018
for i in range(l, l+2020):
  for j in range(i+1, l+2020):
    temp = (i*j)%2019
    if temp < amari:
      amari = temp
print(amari)

l,r=map(int,input().split())
amari = 2018
if r-l > 2019:
  print(0)
else:
  for i in range(l, r+1):
    for j in range(i+1, r+1):
      temp = (i*j)%2019
      if temp < amari:
        amari = temp
     
  print(amari)

Verdicts: Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
L,R=map(int,input().split())
M=2019
for i in range(L,R):
    for j in range(i+1,R+1) :
        if (i*j)%2019 < MOD :
            M = (i*j)%2019
print (M)



L,R=map(int,input().split())
M=2019
import sys
for i in range(L,R):
    for j in range(i+1,R+1) :
        if (i*j)%2019 < M :
            M = (i*j)%2019
            if M == 0:
                sys.exit()
        print(M)

L,R=map(int,input().split())
M=2019
import sys
for i in range(L,R):
    for j in range(i+1,R+1) :
        if (i*j)%2019 < M :
            if M=0:
                sys.exit()
            M = (i*j)%2019
    
 print(M)

L,R=map(int,input().split())
M=2019
import sys
for i in range(L,R):
    for j in range(i+1,R+1) :
        if (i*j)%2019 < M :
            M = (i*j)%2019
            if M == 0:
                print(M)
                sys.exit()
print (M)

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
MOD = 2019
L,R = list(map(int,input().split()))
R = min(R, L + MOD)
nums = range(L,R+1)
answer = MOD
for i in range(L,R+1):
    for j in range(max(i+1,L), R+1):
        c = (i*j)%MOD
        if c < answer:
            print(c,i,j)
        answer = min(c,answer)
print(answer)

MOD = 2019
L,R = list(map(int,input().split()))
R = min(R, L + MOD)
L %= MOD
R %= MOD
nums = range(L,R+1)
answer = MOD
for i in range(L,R+1):
    for j in range(max(i,L), R+1):
        c = (i*j)%MOD
        answer = min(c,answer)
print(answer)

MOD = 2019
L,R = list(map(int,input().split()))
R = min(R, L + MOD)
nums = range(L,R+1)
answer = MOD
for i in range(L,R+1):
    for j in range(max(i+1,L), R+1):
        c = (i*j)%MOD
        # if c < answer:
            # print(c,i,j)
        answer = min(c,answer)
print(answer)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
left, right = map(int, input().split())
imod = []
jmod = []

for i in range(left, right):
    imod.append(i % 2019)

for i in range(imod.index(min(imod))+1, len(imod)):
    jmod.append(imod[i])

print((min(imod) + min(jmod)) % 2019)


left, right = map(int, input().split())
mod = []
if right - left > 2019:
    print(0)
    exit()
else:
    for i in range(left, right):
        for j in range(left+1, right+1):
            mod.append(i*j%2019)
print(min(mod))


Verdicts: Runtime Error

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
import sys
l, r = map(int, input().split())
for i in range(l, r-1):
  for j in range(i+1, r):
    if i*j%2019 == 0:
      print(0)
      sys.exit()
    elif ans > i*j%2019:
      ans = i*j%2019
print(ans)

import sys
l, r = map(int, input().split())
ans = l*r%2019
for i in range(l, r):
  for j in range(i+1, r+1):
    if i*j%2019 == 0:
      print(0)
      sys.exit()
    elif ans > i*j%2019:
      ans = i*j%2019
print(ans)


Verdicts: Runtime Error

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
l,r=map(int,input().split())
ans = []

l = l%2019
r = r%2019 + 2019

for n in range(l,r+1):
    for m in range(n+1,r+1):
        tmp = n*m%2019
        if tmp == 0:
            print(0)
            exit()
        ans.append(tmp)
print(min(ans))

l,r=map(int,input().split())
ans = [0]

l = l%2019
r = r%2019

for n in range(l,r+1):
    for m in range(n+1,r+1):
        tmp = n*m%2019
        if tmp == 0:
            print(0)
            exit()
        ans.append(tmp)
print(min(ans))

l,r=map(int,input().split())
ans = []

for n in range(l,r+1):
    for m in range(n+1,r+1):
        tmp = n*m%2019
        if tmp == 0:
            print(0)
            exit()
        ans.append(tmp)
print(min(ans))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
l,r = map(int,input().split())
ans = 2019
if r-l+1 >= 2019:
    print(0)
else:
    for i in range(l,r):
        for j in range(i+1,r+1):
            print("i,j,",i,j)
            ans = min( (i*j) % 2019, ans)
    print(ans)

l,r = map(int,input().split())
ans = 2019
if r-l+1 >= 2019:
    print(0)
else:
    for i in range(l,r):
        for j in range(i+1,r+1):
            ans = min( (i*j) % 2019, ans)
    print(ans)

Verdicts: Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
import sys
import numpy as np 
def minimize():
    L, R=map(int,input().split())
    lis=[]
    for i in range(L,R):
        for j in range(i+1, R+1):
            x=(i*j) %2019
            lis.append(x)
        if len(np.uniq(lis))==2018:
            break
    lis=np.array(lis)
    ans=lis.min()
    print(ans)

minimize()



import sys
import numpy as np 
def minimize():
    L, R=map(int,input().split())
    lis=[]
    if (L+2019) >= R:
        
        for i in range(L,R):
            for j in range(i+1, R+1):
                x=(i*j) %2019
                lis.append(x)
        lis=np.array(lis)
        ans=lis.min()
        print(ans)
    
    else :
        for i in range(L,(L+2019)):
            for j in range(i+1, L+2020):
                x=(i*j) %2019
                lis.append(x)
        lis=np.array(lis)
        ans=lis.min()
        print(ans)


minimize()






Verdicts: Runtime Error

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
l,r=map(int,input().split())
if(r-l+1)>2019:
  print(0)
else:
  mod=[]
  ans=[]
  for i in range(r-l+1):
    mod.append((l+i)%2019)
  for i in range(r-l):
    for j in range(i,r-l+1):
      ans.append((mod[i]*mod[j])%2019)
  print(min(ans))

l,r=map(int,input().split())
if(r-l+1)>2019:
  print(0)
else:
  mod=[]
  ans=[]
  for i in range(r-l+1):
    mod.append((l+i)%2019)
  for i in range(r-l):
    for j in range(i+1,r-l+1):
      ans.append((mod[i]*mod[j])%2019)
  print(min(ans))



Verdicts: Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
l,r = map(int,input().split())
if l-r>=2019:
    print(0)
    exit()
ans = 2019
for i in range(l,r+1):
    for j in range(i,r+1):
        ans = min(ans,(i*j)%2019)


l,r = map(int,input().split())
if r-l>=2019:
    print(0)
    exit()
ans = 2019
for i in range(l,r+1):
    for j in range(i+1,r+1):
        ans = min(ans,(i*j)%2019)
print(ans)


Verdicts: Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
if(modR <= modL):
    modMin = 0
else:
    modMin = 2018

for i in range(modL,modR):
    for j in range(i+1,modR+1):
        modIJ = (i*j)%2019
        # print(i)
        # print(j)
        # print('----')
        #print(modMin)
        #print(modIJ)
        #print('---')
        if modIJ < modMin:
            modMin = modIJ
print(modMin)


l,r = map(int, input().split())
modL = l%2019
modR = r%2019

if(modR <= modL):
    modMin = 0
else:
    modMin = 2018

for i in range(modL,modR):
    for j in range(i+1,modR+1):
        modIJ = (i*j)%2019
        print(i)
        print(j)
        print('----')
        #print(modMin)
        #print(modIJ)
        #print('---')
        if modIJ < modMin:
            modMin = modIJ
print(modMin)


l,r = map(int, input().split())
waruL = l / 2019
waruR = r / 2019
if waruL < waruR :
    modMin = 0
else:
    modL = l%2019
    modR = r%2019

    for i in range(modL,modR):
        for j in range(i+1,modR+1):
            modIJ = (i*j)%2019
            if modIJ < modMin:
                modMin = modIJ
print(modMin)

l,r = map(int, input().split())
waruL = l // 2019
waruR = r // 2019
if waruL < waruR :
    modMin = 0
else:
    modMin = 2018
    modL = l%2019
    modR = r%2019

    for i in range(modL,modR):
        for j in range(i+1,modR+1):
            modIJ = (i*j)%2019

            if modIJ < modMin:
                modMin = modIJ
print(modMin)

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
l, r = [int(x) for x in input().split()]

remainder_list = []

if r - l >= 2019:
	print(0)
else :
	for x in range(l, r):
    	remainder_list.append((l * (x + 1)) % 2019)

remainder_list.sort()
print(remainder_list[0])
    	

import sys

l, r = [int(x) for x in input().split()]

remainder_list = []

if r - l >= 2019:
    print(0)
    sys.exit()
else :
    for x in range(l, r):
        for y in range(x + 1, r + 1):
            remainder_list.append((x * y) % 2019)

remainder_list.sort()
print(remainder_list[0])


Verdicts: Runtime Error

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
L,R=map(int,input().split())
MOD=2019
ans=10**12
for i in range(L,R+1):
    for j in range(i+1,R+1):
        flag=i*(j%MOD)
        if flag==0:
            print(0)
            exit()
        ans=min(ans,flag)
print(ans)

L,R=map(int,input().split())
MOD=2019
ans=10**9
for i in range(L,R):
    for j in range(i+1,R+1):
        flag=i*j%MOD
        if flag==0:
            print(0)
            exit()
        ans=min(ans,flag)
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
l,r=map(int, input().split())

mod_l = l % 2019
mod_r = r % 2019

if (r - l >= 2019) or (mod_r > mod_l):
  print('0')
else:
  rem = 2018
  for i in range(mod_l, mod_r):
    for j in range(i+1, mod_r+1):
      if rem > (i*j)%2019:
        continue
      else:
          rem = (i*j)%2019

  print(rem)


l,r=map(int, input().split())
if r > 2019:
    r %= 2019

if l > 2019:
    l %=2019
    l ,r = min(l, r), max(l, r)
rem = 2019
for i in range(l,r+1):
    for j in range(l+1,r+1):
         if rem<(i*j)%2019:
            continue
         else:
            rem = (i*j)%2019
print(l, r)
print(rem)

l,r=map(int, input().split())
if r > 2019:
    r %= 2019

if l > 2019:
    l %=2019
    l ,r = min(l, r), max(l, r)
rem = 2019
for i in range(l,r+1):
    for j in range(l+1,r+1):
         if rem<(i*j)%2019:
            continue
         else:
            rem = (i*j)%2019
print(l, r)
print(rem)

l,r=map(int, input().split())

mod_l = l % 2019
mod_r = r % 2019

if (r - l >= 2019) or (mod_r < mod_l):
  print('0')
else:
  rem = 2018
  for i in range(mod_l, mod_r):
    for j in range(i+1, mod_r+1):
      if rem < (i*j)%2019:
        continue
      else:
          rem = (i*j)%2019

  print(rem)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
l, r = map(int, input().split())
a = 2019

for i in range(r - l):
    t = 2019
    for j in range(i + 1, r - l + 1):
        tmp = (l + i) * (l + j) % 2019
        print(l + i,l + j,tmp)
        if tmp > t:
            break
        t = tmp
        if a > tmp:
            a = tmp

print(a)

l, r = map(int, input().split())
a= 2019
for i in range(r - l):
    for j in range(i + 1, r - l + 1):
        tmp = (l + i) * (l + j) % 2019
        print(l + i,l + j,tmp)
        if a > tmp:
            a = tmp

print(a)

l, r = map(int, input().split())
a = 2019

for i in range(r - l):
    t = 2019
    for j in range(i + 1, r - l + 1):
        tmp = (l + i) * (l + j) % 2019
        if a > tmp:
            a = tmp
        if a == 0:
            print(a)
            exit()
#        if tmp > t:
#            break
#        t = tmp
        

print(a)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):


S=input()

tmp=S.split()

L=int(tmp[0])
R=int(tmp[1])

n=L*R

print(n%2019)


import numpy as np

S=input()

tmp=S.split()

L=int(tmp[0])
R=int(tmp[1])

L_list=np.sort(np.array(range(L,R+1),dtype=np.int32)%2019)
#R_list=L_list.copy()

print(L_list)
#print(R_list)

print(L_list[0]*L_list[1])


S=input()

tmp=S.split()

L=int(tmp[0])
R=int(tmp[1])

R=min(L+2019,R)

flag=False
result=1000000000000
for i in range(L,R+1):
    for j in range(i+1,R+1):
        if i>=j:
            flag=True
            break
        n=(i*j)%2019
        if result>n:
            result=n
    if(flag):
        break



print(result)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
l, r = map(int, input().split())
if r - l + 1 >= 2019:
  print(0)
else:
  ans = 2019
  for i in range(r, l-1):
    for j in range(i+1, l):
      mod = (i*j) % 2019
      ans = min(ans, mod)
  print(ans)

l, r = map(int, input().split())
if r - l + 1 >= 2019:
  print(0)
else:
  ans = 2019
  for i in range(l, r):
    for j in range(i+1, r+1):
      mod = (i*j) % 2019
      ans = min(ans, mod)
  print(ans)


Verdicts: Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
L,R = map(int,input().split())

#f = 0
l = []

if R-L>=2019:
    #f = 1
    print(0)
    exit()

for i in range(L,R):
    for j in range(i+1,R+1):
        l.append((i*j)%2019)
else:
    l.sort()

if 3 in l and 673 in l:
    print(0)
elif 3 in l:
    print(min(l),637)
elif 637 in l:
    print(min(l),3)
else:
    print(min(l))



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

#f = 0
l = []

if R-L>=2019:
    #f = 1
    print(0)
    exit()

for i in range(L,R):
    for j in range(i+1,R+1):
        l.append((i*j)%2019)
else:
    l.sort()

if 3 in l and 673 in l:
    print(0)
elif 3 in l:
    print(min(l),637))
elif 637 in l:
    print(min(l),3))
else:
    print(min(l))



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

#f = 0
l = []

if R-L>=2019:
    #f = 1
    print(0)
    exit()

for i in range(L,R):
    for j in range(i+1,R+1):
        l.append((i*j)%2019)
else:
    l.sort()

print(l[0])


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
L, R = map(int, input().split())


if R-L>=L:
    print(0)
else:
    for l in range(L,R):
        for r in range(l+1, R+1):
            z = min(z, ((l % 2019) * (r % 2019)) % 2019)
    print(z)


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

z = 2019

if R-L>= 2019:
    print(0)
else:
    for l in range(L,R):
        for r in range(l+1, R+1):
            z = min(z, ((l % 2019) * (r % 2019)) % 2019)
    print(z)


Verdicts: Runtime Error

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
import sys
input = sys.stdin.readline

gen = 7
l, r = map(int, input().split())

for i in range(l, l+gen+1):
    if i%gen == 0:
        check = i - l

if r-l>=check:
    print(0)
    exit()

ll = min(l%gen, r%gen)
rr = max(l%gen, r%gen)

if rr-ll == 1:
    print((ll*rr)%gen)
    exit()

ans = 10**9

for i in range(ll, rr+1):
    for j in range(i+1, rr+1):
        ans = min(ans, (i*j)%gen)
print(ans)

import sys
input = sys.stdin.readline

gen = 2019
l, r = map(int, input().split())

for i in range(l, l+gen+1):
    if i%gen == 0:
        check = i - l

if r-l>=check:
    print(0)
    exit()

ll = min(l%gen, r%gen)
rr = max(l%gen, r%gen)

if rr-ll == 1:
    print((ll*rr)%gen)
    exit()

ans = 10**9

for i in range(ll, rr+1):
    for j in range(i+1, rr+1):
        ans = min(ans, (i*j)%gen)
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
L,R=map(int,input().split())
length=R-L
start=L%2019
if start+length<3:
    print((start*(start+1))%2019)
else:
    print(0)

L,R=map(int,input().split())
mod_min=2019
zero_judge=0
for i in range(L,R):
    if zero_judge==1:
        break
    else:
        for j in range(i+1,R+1):
            mod_calc=(i*j)%2019
            if mod_calc<mod_min:
                mod_min=mod_calc
                if mod_min==0:
                    zero_judge=1
                    break

print(mod_min)

Verdicts: Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
import itertools
LR = input().split(' ')
L = int(LR[0])
R = int(LR[1])

min_num = 2000000001
store = [0,0]
num_list = range(L,R+1)
combination_list = list(itertools.combinations(num_list,2))

for comb in combination_list:
    mod = (comb[0] * comb[1] ) % 2019
    if mod < min_num:
        min_num = mod
        store[0] = comb[0]
        store[1] = comb[1]

print(' '.join(map(str,store)))

LR = input().split(' ')
L = int(LR[0])
R = int(LR[1])

min_num = 2000000001
flag = False
for l in range(L,R):
    for r in range(l+1,R+1):
        mod = (l*r) %2019
        if mod < min_num:
            min_num = mod
            if mod == 0:
                flag =True
                break
    if flag:
        break

print(min_num)

Verdicts: Runtime Error

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
L,R = map(int,input().split())
n = 2019

for i in range(L,R+1):
    for j in range(L,R+1):
        if i == j:
            pass
        else:
            x = (i*j)%2019
            if x < n:
                n = x
            
            if x == 0:
                print (x)
                exit ()
print (x)


L,R = map(int,input().split())
ans = 2019

for i in range(L,R+1):
    for j in range(L,R+1):
        if i == j:
            pass
        else:
            x = (i*j)%2019
            if x < ans:
                ans = x
            
            if x == 0:
                print (x)
                exit ()
print (ans)


Verdicts: Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
l, r = map(int, input().split())
l = lr[0]
r = lr[1]
 
ans=2019
l_2019 = l % 2019
r_2019 = r % 2019
 
for i in range(l_2019,r_2019):
    for j in range(i+1, r_2019+1):
        new_ans = (i * j) % 2019
        if new_ans < ans:
            ans = new_ans
        
print(ans)

l = lr[0]
r = lr[1]
 
ans=2019
l_2019 = l % 2019
r_2019 = r % 2019
 
for i in range(l_2019,r_2019):
    for j in range(i+1, r_2019+1):
        new_ans = (i * j) % 2019
        if new_ans < ans:
            ans = new_ans
        
print(ans)

lr = list(map(int, input().split()))
 
l = lr[0]
r = lr[1]
 
ans=2018
tr=min(2019, r-l)
for i in range(l, l+tr):
    for j in range(l+1, l+tr+1):
        ans = min(ans, (i*j)%2019)
        
        
print(ans)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
import os, sys, re, math

(L, R) = [int(n) for n in input().split()]

result = None
for i in range(L, R + 1):
    if i % 2019 == 0:
        result = 0
        break

if result is None:
    if abs(2019 - L % 2019) < abs(2019 - R % 2019):
        result = (L * (L + 1)) % 2019
    else:
        result = ((R - 1) * R) % 2019

print(result)


import os, sys, re, math

(L, R) = [int(n) for n in input().split()]

result = None
for i in range(L, R + 1):
    if i % 2019 == 0:
        result = 0
        break

if not result:
    if abs(2019 - L % 2019) < abs(2019 - R % 2019):
        result = (L * (L + 1)) % 2019
    else:
        result = ((R - 1) * R) % 2019

print(result)


import os, sys, re, math

(L, R) = [int(n) for n in input().split()]

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

print(result)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
l,r = map(int,input().split())

r_min = min(l+2019,r)
inf = float('inf')
ans = inf

for i in (l,r_min):
    for j in (i+1,r_min):
        modu = i*j
        if modu%2019 <= ans:
            print(modu)
            ans = modu%2019

print(ans)


l,r = map(int,input().split())

r_min = min(l+2019,r)
inf = float('inf')
ans = inf

for i in range(l,r_min+1):
    for j in range(i+1,r_min+1):
        modu = i*j
        if modu%2019 <= ans:
            ans = modu%2019

print(ans)


Verdicts: Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
l,r=list(map(int,input().split()))
s=[]
import sys

if r-l>2050:
  print(0)
else:
  for i in range(l,r+1):
    s.append(i%2019)

n=len(s)
ans=30000
for i in range(n-1):
  for j in range(i+1,n):
    ans=min(ans,(i*j)%2019)

print(ans)

  
  
  

l,r=list(map(int,input().split()))
s=[]
import sys

if r-l>2050:
  print(0)
  sys.exit()
else:
  for i in range(l,r+1):
    s.append(i%2019)

n=len(s)
ans=30000
for i in range(n-1):
  for j in range(i+1,n):
    ans=min(ans,(i*j)%2019)

print(ans)

  
  
  




l,r=list(map(int,input().split()))
if r-l>=2019:
  print(0)
else:
  ans=2019
  for i in range(l,r):
    for j in range(i+1,r+1):
      ans=min(ans,(i%2019)*(j%2019)%2019)
      
      
  print(ans)
  

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
L,R=map(int,input().split())
ans=100100100
for i in range(min(R-L,2000),min(R,2001):
  for j in range(i+1,min(R,2002)):
    if ans>((i*j)%2019):
      ans=((i*j)%2019)
print(ans)

L,R=map(int,input().split())
ans=100100100
for i in range(R-L,R):
  for j in range(i+1,R+1):
    if ans>((i*j)%2019):
      ans=((i*j)%2019)
print(ans)

L,R=map(int,input().split())
ans=0
if R-L>=673:
  print(0)
  exit()
if R*(R-1)<=2018:
  print(L*(L+1))
  exit()
for i in range(R-L):
  for j in range(R-L):
    if ans>i*j%2019:
      ans=i*j%2019
print(ans)

L,R=map(int,input().split())
ans=0
if R-L>=673:
  print(0)
  exit()
for i in range(R-L):
  for j in range(R-L):
    if ans>i*j%2019:
      ans=i*j%2019
print(ans)

print(2018)

L,R=map(int,input().split())
if R-L>=2019:
    minimum=0
else:
    left,right=L%2019,R%2019
    minimum=2018**2
    for i in range(left,right+1):
        for j in range(i+1,right+1):
            minimum=min(minimum,i*j%2019)
print(minimum)

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: You are given two non-negative integers L and R. We will choose two integers i and j such that L \leq i < j \leq R. Find the minimum possible value of (i \times j) \mbox{ mod } 2019.

Submission attempts (in order):
L, R = map(int, input().split())
mod = 2018
i = L
if R > 2019:
    print(0)
    for i in range(L, R):
        for j in range(i+1, R+1):
            num = (i*j) % 2019
            mod = min(mod, num)
            if mod == 0:
                break
print(mod)

L, R = map(int, input().split())
mod = 2018
i = L
if R >= 2019:
    mod = 0
else:
    for i in range(L, R):
        for j in range(i+1, R+1):
            num = (i*j) % 2019
            mod = min(mod, num)
            if mod == 0:
                break
print(mod)

L, R = map(int, input().split())
mod = 2018
i = L
if R-L >= 2019:
    mod = 0
else:
    for i in range(L, R):
        for j in range(i+1, R+1):
            num = (i*j) % 2019
            mod = min(mod, num)
            if mod == 0:
                break
print(mod)

Verdicts: Wrong Answer

Wrong Answer

Accepted