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//2019 != l//2019:
    print(0)
else:
    l = list()
    for i in range(l, r):
        for j in range(i+1, r+1):
            l.append((i*j)%2019)
    print(min(l))

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

if r//2019 != l//2019:
    print(0)

else:
    lm = list()
    for i in range(l, r):
        for j in range(i+1, r+1):
            lm.append((i*j)%2019)
    print(min(lm))

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 = 2019
for l in range(L, min(R+1, L+2019)):
    for r in range(L, min(R+1, L+2019)):
        print(l, r)
        if l < r:
            ans = min([ans, (l*r)%2019])
print(ans)


L, R = map(int, input().split())
ans = 2019
for l in range(L, min(R+1, L+2019)):
    for r in range(L, min(R+1, L+2019)):
        if l < r:
            ans = min([ans, (l*r)%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())
mod=2019
if R%mod >= L%mod or R-L >= mod:
  print(0)
else:
  a=mod
  for i in range(L%mod,R%mod):
    if j in range(i+1,R%mod+1):
      a=min((i*j)%mod,a)
  print(a)

L,R=map(int,input().split())
mod=2019
if L%mod >= R%mod or R-L >= mod:
  print(0)
else:
  a=mod
  for i in range(L%mod,R%mod):
    for j in range(i+1,R%mod+1):
      a=min((i*j)%mod,a)
  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):
import sys
L, R = map(int,input().split())
a=[]

for i in range(L, R):
	for j in range(i+1,R+1):
		x = (i*j)%2019
		if x == 0:
			print(0)
			sys.exit()
		else:
			a.append()

print(min(a))

import sys
L, R = map(int,input().split())
a=[]

for i in range(L, R):
	for j in range(i+1,R+1):
		a.append((i*j)%2019)
		if (i*j)%2019 == 0:
			print("0")
			sys.exit()

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())
  

ans = 2018
for i in range(L, R):
    for j in range(i, R+1):
        ans = min(ans, (i * j) % 2019)
        if ans == 0:
            print(ans)
            exit()

print(ans)

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

ans = 0
if R - L < 2019:
    l = L % 2019
    r = R % 2019
    if l < r:
        if abs(2019 - l) < abs(2019 - r):
            ans = (l * ((L + 1) % 2019)) % 2019
        else:
            ans = (r * ((R - 1) % 2019)) % 2019
print(ans)
        

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

ans = 2018
for i in range(L, R):
    for j in range(i+1, R+1):
        ans = min(ans, (i * j) % 2019)
        if ans == 0:
            print(ans)
            exit()

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 = 2019
for i in range(l, r):
   for i in range(l+1, r+1):
      tmp = i*j % 2019
      if ans > tmp:
         ans = tmp         
      if ans == 0:
         print(ans)
         exit(0)
print(ans)

l, r = map(int, input().split())
ans = 2019
for i in range(l, r):
    for j in range(i+1, r+1):
        tmp = i*j % 2019
        if ans > tmp:
            ans = tmp
        if ans == 0:
            print(ans)
            exit(0)
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 

L, R = list(map(int, input().split()))
data = np.array([x for x in range(L, R+1)]) % 2019

if np.where(data == 0):
    print(0)

else: 
    data = np.sort(data)
    min_mod = (data[0] * data[1]) % 2019
    print(min_mod)

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

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

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

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

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):
def f(l,r):
    p=2019
    for i in range(l,r+1):
        for j in range(l,r+1):
            p=min((i*j)%2019,p)
    return p
    
l,r=map(int,input().split())
print(0 if r//2019-(l-1)//2019!=0 or (r//673-(l-1)//673!=0 and r//3-(l-1)//3!=0) else f(l,r))

def f(l,r):
    p=2019
    for i in range(l,r+1):
        for j in range(l,r+1):
            if i==j:
                continue
            p=min((i*j)%2019,p)
    return p
    
l,r=map(int,input().split())
print(0 if r//2019-(l-1)//2019!=0 else f(l,r))

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())
r = min(r,l+678)
ans = 2018

for i in range(l,r+1):
    for j in range(i+1,r+1):
        ans = min(i*j%678,ans)
print(ans)

l,r = map(int,input().split())
r = min(r,l+678)
ans = 2018

for i in range(l,r+1):
    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):
l, r = [int(i) for i in input().split()]
if r - l >= 2018:
    print(0)
    exit()

mn = 2019
for i in range(l, r + 1):
    for j in range(l, r + 1):
        t = (i * j) % 2019
        mn = min(mn, t)

print(mn)


l, r = [int(i) for i in input().split()]
if r - l >= 2018:
    print(0)
    exit()

mn = 2019
for i in range(l, r + 1):
    for j in range(l, r + 1):
        if i < j:    
            t = (i * j) % 2019
            mn = min(mn, t)

print(mn)


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 = 2019


ans = 2019

for i in range(L, R):
    for j in range(i + 1, R + 1):
        mod = (i * j) % N
        if ans > mod:
            ans = mod
        if ans = 0:
            print(ans)
            exit(0)

print(ans)

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

N = 2019


ans = 2019

for i in range(L, R):
    for j in range(i + 1, R + 1):
        mod = (i * j) % N
        if ans > mod:
            ans = mod
        if ans == 0:
            print(ans)
            exit(0)

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

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





def get_ans():
    
    if R - L >= 2018:
        return 0

    
    mods = np.mod(np.arange(L, R + 1), 2019)
    u_mods = np.unique(mods)

    length = len(u_mods)
    
    ans = 2019
    
    for X in range(length - 1):
        r = min([(u_mods[X] * u_mods[Y]) % 2019 for Y in range(X + 1, length)])
        if r < ans:
            ans = r
        # for Y in range(X + 1, length)
        #     mod = (u_mods[X] * u_mods[Y]) % 2019
        #     if mod < ans:
        #         ans = mod


print(get_ans())

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





def get_ans():
    
    nums = [2019, 2020]
    for n in range(L, R + 1):
        mod = n % 2019
        
        if mod == 0:
            return 0

        
        if nums[0] > n:
            nums[0] = n
        elif nums[1] > n:
            nums[1] = n

    
    return (nums[0] * nums[1]) % 2019


print(get_ans())

import numpy as np

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





np_nums = np.array(list(set([n % 2019 for n in range(L, R + 1)])))


L = len(np_nums)

ans = 2019
for p in range(L):
    for q in range(p + 1, L):
        current_ans = (p * q) % 2019
        if ans > current_ans:
            ans = current_ans

print(ans)

import numpy as np

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



np_nums = np.sort(np.mod(np.arange(L, R + 1), 2019))


def get_ans():
    
    nums = [2019, 2020]
    for n in range(L, R + 1):
        mod = n % 2019
        
        if mod == 0:
            return 0

        
        if nums[0] > n:
            nums[0] = n
        elif nums[1] > n:
            nums[1] = n

    
    return (nums[0] * nums[1]) % 2019


print(get_ans())

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





def get_ans():
    
    if R - L >= 2018:
        return 0

    
    ans = 2019
    for X in range(L, R):
        for Y in range(X + 1, R + 1):
            ans = min((ans, (X * Y) % 2019))
            if ans == 0:
                return 0

    return ans


print(get_ans())

Verdicts: Wrong Answer

Wrong Answer

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):
import numpy as np
L, R = list(map(int, input().split()))

min_val = 2019
for i in range(L, R):
  for j in range(i+1, R+1):
    val = (i*j)%2019
    if min_val > val:
      if min == 0:
        break
print(min_val)

import numpy as np
L, R = list(map(int, input().split()))

min_val = 2019
for i in range(L, R):
  for j in range(i+1, R+1):
    val = (i*j)%2019
    if min_val > val:
      min_val = val
      if min_val == 0:
        break
  if min_val == 0:
    break
print(min_val)

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=2018
for i in range(l,r):
	for j in range(i+1,r+1):
    	if i*j%2019<ans:
        	ans=i*j%2019
        elif i*j%2019==ans:
        	print(ans)
            exit()
print(ans)

l,r=map(int,input().split())
ans=2018
for i in range(l,r):
    for j in range(i+1,r+1):
        if i*j%2019<ans:
            ans=i*j%2019
        elif i*j%2019==ans:
            print(ans)
            exit()
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())
L=L%2019
min_mod = 2019
flg=[0]*2019
flg2=[0]*2019
for i in range(L,R):
    idx=i%2019
    if flg[idx]==0:
        for j in range(i+1,R+1):
            mod  = (i*j)%2019
            if flg2[mod]==1:
                break
            flg2[mod]=1
            if min_mod > mod:
                min_mod=mod
        flg[idx]=1
print(min_mod)

L, R = map(int, input().split())
min_mod = 2019
flg=[0]*2019
flg2=[0]*2019
for i in range(L,R):
    idx=i%2019
    if flg[idx]==1:
        break
    if flg[idx]==0:
        for j in range(i+1,R+1):
            mod  = (i*j)%2019
            if flg2[mod]==1:
                break
            flg2[mod]=1
            if min_mod > mod:
                min_mod=mod
        flg[idx]=1
print(min_mod)

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()))
m = R//2019
if R-L>=2019 or (m*2019<=R and m*2019>=L):
  print(0)
else:
  l = L%2019
  print((l*(l+1))//2019)

L, R = list(map(int, input().split()))
m = R//2019
if R-L>=2019 or (m*2019<=R and m*2019>=L):
  print(0)
else:
  l = L%2019
  r = R%2019
  min_c = 2019
  for i in range(l,r+1):
    for j in range(i+1, r+1):
      score = i*j%2019
      print(i,j)
      if i*j%2019<min_c:
        print('change')
        min_c = score
  print(min_c)

L, R = list(map(int, input().split()))
m = R//2019
if R-L>=2019 or (m*2019<=R and m*2019>=L):
  print(0)
else:
  l = L%2019
  r = R%2019
  min_c = 2019
  for i in range(l,r+1):
    for j in range(i+1, r+1):
      score = i*j%2019
      if i*j%2019<min_c:
        min_c = score
  print(min_c)

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):
temp=input().split()
L=int(temp[0])
R=int(temp[1])

print(min([(i*j)%2019 for i in range(L, R) for j in range(i, R+1)]))

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

print(min([(i*j)%2019 for i in range(L, R-1) for j in range(i, R)]))

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

print(min([(i*j)%2019 for i in range(L, R-1) for j in range(i, R)]))

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

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

Verdicts: Wrong Answer

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):
l,r = map(int,input().split())
a = float("inf")
if (r-l)>=2019:
  print("0")
else:
  l %= 2019
  r %= 2019
  for i in range(l,r+1):
    for j in range(i,r+1):
      a = min(a,i*j%2019)
print(a)

l,r = map(int,input().split())
a = float("inf")
if (r-l)>=2019:
  print(0)
else:
  for i in range(l,r+1):
    if i == 0:
      print(0)
      break
    elif a > i % 2019:
      a = i
  print(i*(i+1))

l,r = map(int,input().split())
ans = float("inf")
if (l <= 2019 and r >= 2019) or r-l >= 2019:
  print(0)
else:
  x = [_ for _ in range(l,r+1)]
  cnt = r-l+1
  for i in range(cnt):
    for j in range(i+1,cnt):
      ij_mod = (x[i]% 2019)*(x[j] % 2019) % 2019
      ans = min(ans,ij_mod)
  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(" "))
w = R-L


if w>2019:
    print(0)
else:
    List = [int(i) for i in range(L,R+1)]
    print(List)
    Min = 2018
    for i in range(len(List)-1):
        for j in range(i+1,len(List)):
            l = (List[j]*List[i])%2019
            if l<Min:
                Min = l
    print(Min)

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


if w>2019:
    print(0)
else:
    List = [int(i) for i in range(L,R+1)]
    Min = 2018
    for i in range(len(List)-1):
        for j in range(i+1,len(List)):
            l = (List[j]*List[i])%2019
            if l<Min:
                Min = l
    print(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):

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

    


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



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


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

if m >= 2019:
  print(0)
else:
  cnt = []
  for i in range(l,r):
    for j in range(l+1,r+1):
      cnt.append(i*j%2019)
  print(min(cnt))

Verdicts: Runtime Error

Runtime Error

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 %= 2019
r = r+(r-l)%2019

if l>=r:
    r += 2019

min = 2020
for i in range(l, r):
    for j in range(i+1, r+1):
        if (i*j)%2019 < min:
            min = (i*j)%2019

print(min)



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

if (r-l)>=2019:
    print(0)
else:
    l %= 2019
    r %= 2019

    min = 2020
    for i in range(l, r):
        for j in range(i+1, r+1):
            if (i*j)%2019 < min:
                min = (i*j)%2019
    if l>=r:
        min = 0
    print(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):
n = int(input())
D = list(map(int,input().split()))

D.sort()
print(D[n//2] -D[n//2-1])



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

cand = []
for i in range(l,r+1):
  cand.append(i%2019)
  if len(cand) == 2020*2:
    break
    
ans = float('inf')
for i in range(len(cand)):
  for j in range(len(cand)):
    if i==j:
      continue
    ans = min(ans, (cand[i]*cand[j])%2019)
    if ans ==0:
      break
  else:
    continue
  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 = [int(input()) for i in input().split()]
diff = R - L
ans = 2019
if diff == 1:
    x = (L * (L + 1)) % 2019
    print(min(x, ans))
else:
    for i in range(diff):
        for j in range(i + 1, diff):
            x = ((L + i) * (L + j)) % 2019
            ans = min(x, ans)
            if x == 0:
                break
    print(ans)


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


L, R = [int(input()) for i in input().split()]
diff = R - L
ans = 2 * (10 ** 9)
if diff == 1:
    print((L * (L + 1)) % 2019)
else:
    for i in range(diff):
        for j in range(i + 1, diff):
            x = ((L + i) * (L + j)) % 2019
            ans = min(x, ans)
            if x == 0:
                break
    print(ans)


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


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


L, R = [int(i) for i in input().split()]
R = min(R, L + 4038)
ans = 2018
for i in range(L, R + 1):
    for j in range(i + 1, R + 1):
        x = (i * j) % 2019
        if x == 0:
            ans = 0
            break
        ans = min(ans, x)
print(ans)


Verdicts: Runtime Error

Wrong Answer

Runtime Error

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):
L, R = map(int,input().split())
a = 10**10
for i in range(L,min(R,L+2019):
    for j in range(i+1,min(R,L+2019)+1):
        a = min(a,(i*j)%2019)
        if a == 1:
            print("1")
            exit()
print(a)

L, R = map(int,input().split())
a = 10**10
for i in range(L,min(R,L+2019)+1):
    for j in range(i+1,min(R,L+2019)+1):
        a = min(a,(i*j)%2019)
print(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):
n, r = map(int, input().split())
if r - n >= 2019:
  print(0)
  sys.exit(0)
min = 2019
#nM = n % 2019
#rM = r % 2019
for i in range(n, r+1):
  for j in range(i+1, r+1):
    min = min((i*j)%2019, min)
print(min)

import sys
n, r = map(int, input().split())
if r-n >= 2019:
  print(0)
  sys.exit(0)
mini = 2019
#nM = n % 2019
#rM = r % 2019
for i in range(n, r+1):
  for j in range(i+1, r+1):
    mini = min((i*j)%2019, mini)
print(mini)

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):
def nyu():
    L,R = map(int,input().split())
    return L,R


def convert(LL,LR):
    LL = LL % 2019
    LR = LR % 2019

    return LL,LR

def kansu(LL,LR):

    ans = 2020

    for ll in range(LL,LR):
        for lr in range(ll+1,LR+1):
            print(lr)
            tmp  = (ll * lr) % 2019
            if ans > tmp:
                ans = tmp

    print(ans)

ML,MR = nyu()
#ML,MR = convert(ML,MR)
kansu(ML,MR)


def nyu():
    L,R = map(int,input().split())
    return L,R


def convert(LL,LR):
    LL = LL % 2019
    LR = LR % 2019

    return LL,LR

def kansu(LL,LR):

    ans = 2020

    for ll in range(LL,LR):
        for lr in range(ll+1,LR+1):
            print(ll,"  ",lr)
            tmp  = (ll * lr) % 2019
            if ans > tmp:
                ans = tmp

    print(ans)

ML,MR = nyu()
ML,MR = convert(ML,MR)
kansu(ML,MR)


def nyu():
    L,R = map(int,input().split())
    return L,R



#     LL = LL % 2019
#     LR = LR % 2019

#     return LL,LR

def kansu(LL,LR):

    ans = 2020
    flg = False

    for ll in range(LL,LR):
        for lr in range(ll+1,LR+1):
            tmp  = (ll * lr) % 2019
            if ans > tmp:
                ans = tmp
                if ans == 0:
                    flg =True
                    break
        if flg == True:
            break

    print(ans)

ML,MR = nyu()
#ML,MR = convert(ML,MR)
kansu(ML,MR)


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())
from itertools import permutations, combinations,combinations_with_replacement,product
for 
if (R+1-L)<2019:
  LR = range(L,R+1)
  LRA = []
  for i in LR:
    LRA.append(i%2019)
  LRAA = set(LRA)
  C = combinations(LRAA, 2)
  Ret = 2019
  for i in list(C):
    Ret = min(Ret,(i[0]*i[1])%2019)
else:
  Ret = 0
print(Ret)

L,R=map(int, input().split())
from itertools import permutations, combinations,combinations_with_replacement,product
if (R+1-L)<2019:
  LR = range(L,R+1)
  LRA = []
  for i in LR:
    LRA.append(i%2019)
  LRAA = set(LRA)
  C = combinations(LRAA, 2)
  Ret = 2019
  for i in list(C):
    Ret = min(Ret,(i[0]*i[1])%2019)
else:
  Ret = 0
print(Ret)


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())
L=l%2019
R=r%2019
ans=2019
if l+2019<=r:
        print(0)
elif L>R:
        print(0)
else:
        for i in range(L,R+1):
                for j in range(i+1,R+!):
                        ans=min(ans,(i*j)%2019)
        print(ans)

l,r=map(int,input().split())
L=l%2019
R=r%2019
ans=2019
if l+2019<=r:
        print(0)
elif L>R:
        print(0)
else:
        for i in range(L,R+1):
              for j in range(i+1,R+1):
                        ans=min(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):

import sys
input = sys.stdin.readline
L,R = (int(x) for x in input().split())

mod_L =L %2019
mod_R =R %2019
ans =0
if 2018 <= R -L:
    ans =0
elif mod_R < mod_L:
    ans =0
elif:
    mod_L==0 :
    ans =0
else:
    ans =mod_L *(mod_L +1)
print(ans)


import sys
input = sys.stdin.readline
L,R = (int(x) for x in input().split())

mod_L =L %2019
mod_R =R %2019
ans =0
xx=[]
if 2018 <= R -L:
    ans =0
elif mod_R < mod_L:
    ans =0
elif mod_L==0 :
    ans =0
else:
    for i in range(L,R):
        for j in range(i+1,R+1):
            x =i*j %2019
            xx.append(x)
    ans =min(xx)
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())
a=[]
if r-l>=2018:
  print(0)
else:
  for i in range(0,r-l+1):
    a.append((l+i)%2019)
  
  a=sorted(a)
  print(a[0]*a[1])
    

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


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())
a = []

if r - l + 1 >= 2019:
    print(0)
    exit(0)

else:
    for i in range(r - l + 1):
        a.append((l + i) % 2019)

print(a)
a.sort()
print(a[0] * a[1])

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

data = 2019

if r - l + 1 >= 2019:
    print(0)
    exit()

else:
    for i in range(l, r + 1):
        for j in range(i+1, r + 1):
            data = min(data, i * j % 2019)

print(data)


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 r-l >= 2017:
	print (0)
	exit()
else:
	for i in range(l,r+1):
		for j in range(i+1,r+1):
			a = min(a,i*j%2019)
print (a)

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


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
import math
import copy
import re
import sys
#sys.exit(0)

inf = float("inf")

def check_print(check_flag, text, end="\n"):
  if check_flag:
    print(text, end=end)

def c2i(x):
    if str.isdecimal(x):
        return int(x)
    else:
        return x

def cout(*args):
  arglist = []
  for arg in args:
    if hasattr(arg, "__iter__"):
      arglist.extend(arg)
    else:
      arglist.append(arg)
      
  arglist = list(map(str, arglist))
  print(" ".join(arglist))

#or
#print(" ".join(list(map(str, lis))))
  
def count2(num):
  count=0
  while num%2==0:
    num/=2
    count+=1
  return count

def ketasum(num):
  nums = [int(s) for s in str(num)]
  return sum(nums)

#math
def gcd(a, b): 
  while b:
    a, b = b, a % b
  return a

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

def gcd3(lis): (3over)
  ans = lis[0]
  for li in lis:
    ans = gcd(ans,li)

def lcm3(lis): (3over)
  ans = lis[0]
  for li in lis:
    ans = lcm(ans,li)

def divisor(n): 
  i = 1
  table = []
  while i * i <= n:
    if n%i == 0:
      table.append(i)
      table.append(n//i)
    i += 1
  table = list(set(table))
  return table

def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(i)
    i += 1
  if n > 1:
    table.append(n)
  return table

def is_prime(n):
  for i in range(2, n + 1):
    if i * i > n:
      break
    if n % i == 0:
      return False
  return n != 1

#input stock


#processing stock






#math


#######################################
p = 2019

l,r = map(int, input().split())
n = r-l+1

if n<2*p:
  mini = 9999999999
  for i in range(l,r):
    for j in range(i+1,r+1):
      tmp = (i*j)%p
      if tmp<mini:
        mini=tmp
else:
  lis = list(range(l,r+1))[:p+1]
  lis = list(set([li%p for li in lis]))
  mini = 9999999999
  for i in lis:
    for j in lis:
      tmp = (i*j)%p
      if tmp<mini:
        mini=tmp

print(mini)


#######################################
p = 2019

l,r = map(int, input().split())
n = r-l+1

if n<2*p:
  tmps = [(i*j)%p for i in range(l,r) for j in range(i+1,r+1)]
  mini = min(tmps)

else:
  #lis = list(range(l,r+1))[:p+1]
  #lis = list(set([li%p for li in lis]))
  #tmps = [(i*j)%p for i in lis for j in lis]
  
  mini = 0

print(mini)


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())

min = 99999999
for i in range(l,r):
  if min == 0:
      break
  for j in range(i+1,r+1):
    value = (i*j)%2019
    print(value)
    if min > value:
      min = value
    if min == 0:
      break
print(min)

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

min = 99999999
for i in range(l,r):
  for j in range(i+1,r+1):
    value = (i*j)%2019
    print(value)
    if min > value:
      min = value
    if min == 0:
      break
print(min)

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

min = 99999999
for i in range(l,r):
  if min == 0:
      break
  for j in range(i+1,r+1):
    value = (i*j)%2019
    print(value)
    if min > value:
      min = value
print(min)

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

min = 2018
for i in range(l,r):
  for j in range(i+1,r+1):
    value = (i*j)%2019
    if min > value:
      min = value
print(min)

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):
MOD=2019

l,r=map(int,input().split()) #l<=i<i+1<=j<=r
res=2020
l=l%MOD
r=r%MOD
l,r=min(l,r),max(l,r)

for i in range(l,r+1):
  for j in range(i,r+1):
    res =min((i*j)%MOD,res)
print(res)




print(0)

l,r=map(int,input().split())
ans=10**15
for i in range(l,min(r,l+2100)):
  for j in range(i+1,min(r+1,l+2100)):
    ans=min(ans,(i*j)%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())
min=2019
for i in range(L,R+1):
    for k in range(i+1,R+1):
        mod=(i*k)%2019
        if mod==0:
            min=0
            break
        if mod<min:
            min=mod
        else:
            continue
    	break
print(min)


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


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 = (int(i) for i in input().split())

if (R - L) <= 2019:
    temp1 = float("inf")
    for i in range(R - L):
        if (R-i-1) < L:
            break
        temp2 = (R * (R - i - 1)) % 2019
        if temp2 < temp1:
            temp1 = temp2
    print(temp1)
else:
    temp1 = float("inf")
    for i in range(2019):
        if (R-i-1) < L:
            break
        temp2 = (R * (R - i - 1)) % 2019
        if temp2 < temp1:
            temp1 = temp2
    print(temp1)

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

if L == R:
    print((L * R) % 2019)

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

if R == 2019:
    print(0)
    exit()

if R < 2019:
    print(L)
    exit()

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

if R == 2019:
    print(0)
    exit()

if R < 2019:
    print(R)
    exit()

if L == R:
    print((L * R) % 2019)

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

if (R - L) <= 2019:
    temp1 = float("inf")
    for i in range(R - L):
        for j in range(R - L):
            temp2 = ((R-i) * (R - 1 -j)) % 2019
            if temp2 < temp1:
                temp1 = temp2
    print(temp1)
else:
    temp1 = float("inf")
    for i in range(2019):
        if (R-i-1) < L:
            break
        for j in range(2019):
            temp2 = ((R - i) * (R - 1 - j)) % 2019
            if temp2 < temp1:
                temp1 = temp2
    print(temp1)

Verdicts: 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):
import sys

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


import sys

L, R = map(int, input().split())
mod = 2019
ans = []
if R-L > 3000:
    print(0)
    sys.exit()
elif R-L <= 3000:
    for i in range(L, R + 1):
        for j in range(i + 1, R + 1):
            tmp = (i * j) % mod
            ans.append(tmp)
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)>=2018:
  print(0)
else:
  ans=2019
  for i in range(L,R):
    for j in range(i+1,R+1):
      ans=min(ans,I*j//2019)
print(ans)
  

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

L,R=map(int,input().split())
if (R-L)>=2018:
  print(0)
else:
  ans=2019
  for i in range(L,R):
    for j in range(i+1,R+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 numpy as np
l,r =  map(int,input().split())
MOD= 2019
ans = 10**10
if r-l+1 >= MOD:
  print(0)
else:
  i = l % MOD
  j = r % MOD
  for x in range(i+1,j):
    for y in range(x+1,j):
      ans = min((x*y)%MOD,ans)
  print(ans)      
      


import numpy as np
l,r =  map(int,input().split())
MOD= 2019
if r-l+1 >= MOD:
  print(0)
else:
  i = (l+1) % MOD
  j = r % MOD
  x = np.array((i,j),dtype=np.int32)
  m = np.min(x)
  ans = m * (m+1)
  print(ans)


L, R = map(int, input().split())
ans = 2018
for x in range(L, min(R, L+2019)):
    for y in range(L+1, min(R+1, L+2019)):
        ans = min(ans, (x*y)%2019)
        if ans == 0:
            print(0)
            quit()
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-1)*r < 2019:
    print(l*(l+1))
elif r >= 2019:
    print(0)
else:
    print(2)


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



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(r-l>=2019):
    print(0)
    exit()

low = 2*1e+200

for i in range(l,r-1):
    for j in range(i+1,r):
        if(((i%2019)*(j%2019))%2019<low):
            low = ((i%2019)*(j%2019))%2019

if(l*(l-1)%2019<low):
    low = l*(l-1)
print(low)

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

if((r-1)*r<=2019):
    print(l*(l+1))
    exit()

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

low = 2*1e+200

for i in range(l,r-1):
    for j in range(i,r):
        if(i*j%2019<low):
            low = i*j%2019

print(low)

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

if((r-1)*r<=2019):
    print(l*(l+1))
    exit()

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

low = 2*1e+9

for i in range(l,r-1):
    for j in range(i,r):
        if(i*j%2019<low):
            low = i*j%2019

print(low)

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

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=int(input())
R=int(input())

if R - L >= 672:
    ans = 0
elif R * L < 2019:
    ans = L*(L+1)
else:
    ans = 2018
    for i in range(L, R):
        for j in range(L+1, R+1):
            mod=(i*j)%2019
            if mod < ans:
                ans = mod
print(ans)
    

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


if R - L >= 672:
    ans = 0
elif R * L < 2019:
    ans = L*(L+1)
else:
    ans = 2018
    for i in range(L, R):
        for j in range(L+1, R+1):
            mod=(i*j)%2019
            if mod < ans:
                ans = mod
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())
m=r
for i in range(l,r+1):
  for j in range(l,r+1):
    m=min(m,(i*j)%2019)
    if m==0:
      print(m)
      exit()
print(m)

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

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

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())

sho_l = l // 2019
sho_r = r // 2019

if sho_r-sho_l >= 1:
  print(0)
else:
  ans = 2018
  for i in range(l,r):
    for j in range(i,r+1):
      ans = min((i*j)%2019,ans)
  print(ans)


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

sho_l = l // 2019
sho_r = r // 2019

if sho_r-sho_l >= 1:
  print(0)
else:
  ans = 2018
  flg_end = 0
  for i in range(l,r):
    for j in range(i+1,r+1):
      ans = min((i*j)%2019,ans)
      if ans == 0:
        flg_end = 1
    if flg_end == 1:
      break
  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 = 2019
L = L%MOD
R = R%MOD
if L > R:
    L, R = R, L

MIN = 2018
if L == R:
    MIN = 0
for i in range(L, R):
    for j in range(i+1, R+1):
        buf = (i*j) % MOD
        print(i, j)
        MIN = min(buf, MIN)

print(MIN)

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

MIN = 2018
if R-L > 4039:
    MIN = 0


MOD = 2019
L = L%MOD
R = R%MOD
if L > R:
    L, R = R, L
else if L == R:
    MIN = 0


for i in range(L, R):
    for j in range(i+1, R+1):
        buf = (i*j) % MOD
        #print(i, j)
        MIN = min(buf, MIN)

print(MIN)

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

MIN = 2018
if R-L > 4039:
    MIN = 0


MOD = 2019
L = L%MOD
R = R%MOD
if L > R:
    L, R = R, L
elif L == R:
    MIN = 0


for i in range(L, R):
    for j in range(i+1, R+1):
        buf = (i*j) % MOD
        #print(i, j)
        MIN = min(buf, MIN)

print(MIN)

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 = 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):
                print(i, j)
                tmp = (i*j) % 2019
                if tmp < mi:
                    mi = tmp
                    
        print(mi)

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)

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())
x, y = L % 2019, R % 2019
print(x,y)
if (R-L) > 2017 or x>=y:
    print(0)
else:
    m = 2019
    for i in range(x, y + 1):
        for j in range(i + 1, y + 1):
           x = (i * j) % 2019
           m = min(m, x)
           if m == 0:
               break
        if m == 0:
            break
    print(m)

L, R = map(int, input().split())
x = min(L%2019,R%2019)
if (R-L) > 2017:
    print(0)
else:
    if (R > 2019):
        print(0)
    else:
        print((x*(x+1))%2019)

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

L, R = map(int, input().split())
x, y = L % 2019, R % 2019
if (R-L) > 2017 or x>=y:
    print(0)
else:
    m = 2019
    for i in range(x, y + 1):
        for j in range(i + 1, y + 1):
           x = (i * j) % 2019
           m = min(m, x)
           if m == 0:
               break
        if m == 0:
            break
    print(m)

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):
mod=[]
answer = 2018
count = 0
sub=0
mod = [int(i) for i in input().split()]
if(mod[0]+1==mod[1]):
    answer = (mod[0]*mod[1])%2019

for i in range(mod[0],mod[1]+1):
    for j in range(i+1,mod[1]+1):
        sub = (i*j)%2019
        if sub<answer:
            answer = sub
            print(answer)
    if count == 2018:
        break
    count = count + 1
print(answer)

mod=[]
answer = 2018
count = 0
sub=0
mod = [int(i) for i in input().split()]
if(i+1==mod[1]):
    answer = (mod[0]*mod[1])%2019

for i in range(mod[0],mod[1]+1):
    for j in range(i+1,mod[1]+1):
        sub = (i*j)%2019
        if sub<answer:
            answer = sub
            print(answer)
    if count == 2018:
        break
    count = count + 1
print(answer)

mod=[]
answer = 2018
count = 0
sub=0
mod = [int(i) for i in input().split()]
#if(mod[0]==mod[1]):
    #answer = (mod[0]*mod[1])%2019

for i in range(mod[0],mod[1]+1):
    if 2019<=mod[1]-mod[0]:
        answer = 0
        break
    for j in range(i+1,mod[1]+1):
        sub = (i*j)%2019
        if sub<answer:
            answer = sub
print(answer)

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()))
Lmod, Rmod = L%2019, R%2019
print(L,R,Lmod,Rmod)

if Lmod < Rmod and (R - L >= 2019):
    print(0)
elif Lmod < Rmod and (R - L < 2019):
    ch_list =[]
    for i in range(L,R,1):
        for j in range(i+1, R+1, 1):
            ch_list.append((i*j)%2019)
    print(ch_list)
    print(min(ch_list))
elif Lmod > Rmod:
    print(0)

L, R = map(int, (input().split()))
Lmod, Rmod = L%2019, R%2019
result = 2019
if Lmod < Rmod and (R - L >= 2019):
    print(0)
elif Lmod < Rmod and (R - L < 2019):
    for i in range(L,R,1):
        for j in range(i+1, R+1, 1):
            if result > (i*j)%2019:
                result = (i*j)%2019
    print(result)
elif Lmod > Rmod:
    print(0)

Verdicts: Wrong Answer

Accepted