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):
import collections
import numpy as np
import sys
sys.setrecursionlimit(10000000)
import copy
#N=int(input())
L,R=map(int,input().split())
l=[]
for i in range(2021):
    l.append(L%2019)
    if L==R:
        break
    L+=1
ans=2019999
for i in range(len(l)):
    for j in range(len(l)-i):
        ans=min(l[i]*l[j]%2019,ans)
print(ans)

import collections
import numpy as np
import sys
sys.setrecursionlimit(10000000)
import copy
#N=int(input())
L,R=map(int,input().split())
l=[]
for i in range(2021):
    l.append(L%2019)
    if L==R:
        break
    L+=1
ans=2019999
for i in range(len(l)):
    for j in range(len(l)-1):
        ans=min(l[i]*l[j]%2019,ans)
print(ans)

import collections
import numpy as np
import sys
sys.setrecursionlimit(10000000)
import copy
#N=int(input())
L,R=map(int,input().split())
if R-L>=2019:
    print(0)
    exit()
else:
    ans=2019999
    for i in range(L,R+1):
        for j in range(i+1,R+1):
            ans=min(i*j%2019,ans)
            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):
import sys
input = sys.stdin.readline

L,R = map(int,input().split())
lst = []

if L <= 2019 and R >= 2019:
    print(0)
else:
    for i in range(L,R+1):
        if i % 2019 == 0:
            print(0)
            break
        for j in range(i+1,R+1):
            if j % 2019 == 0:
                print(0)
                break
            lst.append((i * j) % 2019)
        else:
            continue
        break
        print(min(lst))


import sys
input = sys.stdin.readline

L,R = map(int,input().split())
lst = []

if L <= 2019 and R >= 2019:
    print(0)
else:
    for i in range(L,R+1):
        if i % 2019 == 0:
            lst.append(0)
            break
        for j in range(i+1,R+1):
            if j % 2019 == 0:
                lst.append(0)
                break
            lst.append((i * j) % 2019)
        else:
            continue
        break
    print(min(lst))


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 = map(int, input().split())
if (((l-1)//2019)<(r/2019))|((((l-1)/673)<(r//673))&(((l-1)//3)<(r//3))):
  print(0)
else:
  arr1 = np.array(range(l,r+1))
  arr2 = np.array(range(l,r+1)).reshape(r-l+1,1)
  arr = arr1*arr2%2019 + (np.identity(r-l+1)*2019)
  print(int(np.min(arr)))

import numpy as np
l,r = map(int, input().split())
if ((l//2019)<(r//2019)):
  print(0)
else:
  arr1 = np.array(range(l,r+1))
  arr2 = np.array(range(l,r+1)).reshape(r-l+1,1)
  arr = arr1*arr2%2019 + (np.identity(r-l+1)*2019)
  print(int(np.min(arr)))

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):
def main():
    l, r = map(int, input().split())
    
    a = l % 2019
    b = r % 2019
    if a >= b or r - l > 2019 or l % 2019 == 0 or r % 2019 == 0:
        print(0)
    else:
        print(0)
        
    
if __name__ == '__main__':
    main()

def main():
    ans = 10**19
    l, r = map(int, input().split())
    for i in range(l, r + 1):
        for j in range(i + 1, r + 1):
            ans = min(ans, (i * j) % 2019)
            if ans == 0:
                print(0)
                return
    print(ans)              
        
    
if __name__ == '__main__':
    main()

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())
a = []
b = []
flag = False
if R - L >= 2019:
    print(0)
else:
    for i in range(L,R):
        for j in range(i+1, R+1):
            mod = (i*j)%2019
            if mod != 1:
                 a.append(mod)
            else:
                flag = True
                break
        if flag:
            break
        else:
            b.append(min(a))
    if flag:
        print(1)
    else:
        print(min(b))

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

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 >= 2019:
    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 >=2019:
    print(0)
else:
    ans = 2019
    for i in raneg(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 >=2019:
    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: 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 sys
from math import *
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

num = 2019
l, r = na()
li = []
if r - l > 2019:
    print(0)
else:
    for i in range(l, r+1):
        li.append(l % num)
    li.sort()
    print((li[0] * li[1]) % num)



import sys
from math import *
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

num = 2019
l, r = na()
li = []
if r - l > 2019:
    print(0)
else:
    for i in range(l, r+1):
        li.append(i % num)
    li.sort()
    n = len(li)
    m = 1000000000
    for i in range(n):
        for j in range(i+1, n):
            kazu = (li[i] * li[j]) % num
            if m > kazu:
                m = kazu
    print(m)




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


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

if R - L >= 2050:
    print(0)
else:
    ans = 20000000
    for i in range(L, R):
        for j in range(i+1, R+1):
            x = (i*j)%2019
            if ans > x:
                ans = x
    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 = [int(i) for i in input().split(" ")]
min_rem = 2018

for i in range(L, R + 1):
    if i % 2019 == 0:
        print(0)
        sys.exit()
    else:
        pass

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

print(min_rem)

import sys

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

for i in range(L, R + 1):
    if i % 2019 == 0:
        print(0)
        sys.exit()
    else:
        pass

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

print(min_rem)

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 = map(int, input().split())

if R-L>=2019:
    print(0)
else:
    range_L_R = np.array(list(range(L, R+1)))
    range_mod_2019 = range_L_R % 2019
    range_mod_3 = range_L_R % 3
    range_mod_673 = range_L_R % 673

    if (0 in range_mod_2019) or (0 in range_mod_3 and 0 in range_mod_673):
        print(0)
    else:
        print(L*(L+1))

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

ans = 2018

if R-L>=2019:
    print(0)
else:
    for i in list(range(L, R)):
        for j in list(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):
from itertools import combinations

L, R = map(int, input().split())
mod = 2019
min_score = float('inf')
L = L%mod
R = R%mod    
if L<R:
    pair = [i for i in range(L,R+1)]
else:
    pair = [i for i in range(L,mod)]
    for i in range(R+1):
        pair.append(i)
for a,b in combinations(pair,2):
    min(min_score, a*b%mod)
print(min_score)

L, R = map(int, input().split())
mod = 2019
ans = float('inf')

for i in range(L,R):
    for j in range(i+1, R+1):
        tmp = i*j%mod
        ans = min(ans, tmp)
        if tmp == 0:
            print(ans)
            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):
import math

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

ans = 2019

for i, j in zip(range(2019), range(L, R)):
    for k in range(j+1, L + 2019):
        lr_mod = (j * k) % 2019
        if lr_mod < ans:
            ans = lr_mod

print(ans)

import math

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

ans = 2019

for i, j in zip(range(2019), range(L, R)):
    for k in range(j+1, L + 2019*2):
        lr_mod = (j * k) % 2019
        if lr_mod < ans:
            ans = lr_mod
        if ans==0:break
    if ans==0:break

print(ans)

import math

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

ans = 2019

for i, j in zip(range(2019), range(L, R)):
    for k in range(j+1, min(L + 2019*2, R + 1)):
        lr_mod = (j * k) % 2019
        if lr_mod < ans:
            ans = lr_mod
        if ans==0:break
    if ans==0:break

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>=673:
    print(0)
else:
    x=[]

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

            print(min(x))


L,R=map(int,input().split())
if R-L>=673:
    print(0)
else:
    x=[]

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

    print(min(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):
print(1%2019)
print(2020%1)

print(1%2019)
print(2020%1)

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

if r-l >= 2019: print(0)
else:
  ans = float("inf")
  for i in range(l, r):
    for j in range(i+1, r+1):
      t = i*j%2019
      if t < ans: ans = t
  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):
import math
import copy
from operator import mul
from functools import reduce
from collections import defaultdict
from collections import Counter
from collections import deque

from itertools import product

from itertools import permutations

from itertools import combinations

from itertools import accumulate
from bisect import bisect_left, bisect_right

# import numpy as np
# from scipy.misc import perm
# from scipy.misc import comb

def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]
 
def i_inpl(): return int(input())
def l_inpl(): return list(map(int, input().split()))
def line_inpl(x): return [i_inpl() for _ in range(x)]

INF = int(1e18)
MOD = int(1e9)+7 # 10^9 + 7

########

L, R = l_inpl()
L %= 2019
R %= 2019

if R<=L:
    R += 2019

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

print(ans)


import math
import copy
from operator import mul
from functools import reduce
from collections import defaultdict
from collections import Counter
from collections import deque

from itertools import product

from itertools import permutations

from itertools import combinations

from itertools import accumulate
from bisect import bisect_left, bisect_right

# import numpy as np
# from scipy.misc import perm
# from scipy.misc import comb

def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]
 
def i_inpl(): return int(input())
def l_inpl(): return list(map(int, input().split()))
def line_inpl(x): return [i_inpl() for _ in range(x)]

INF = int(1e18)
MOD = int(1e9)+7 # 10^9 + 7

########

L, R = l_inpl()

if R-L>=2019:
    print(0)
else:
    ans = INF
    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):
import numpy

L, R = map(int, input().split())
l, r = L % 2019, R % 2019

if l > r or (R - L) >= 2019:
    print(0)
else:
    print(numpy.min([(i * j) % 2019 for i in range(l, r)　for j in range(i + 1, r + 1)]))

import numpy

L, R = map(int, input().split())
l, r = L % 2019, R % 2019

if l > r or (R - L) >= 2019:
    print(0)
else:
    print(numpy.min([(i * j) % 2019 for i in range(l, r) for j in range(i + 1, r + 1)]))

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 = list(map(int,input().split(" ")))
l = L % 2019
r = R % 2019

ans = 2019

if R - L >= 2018 or L > R or (l <= 3 and 673 <= r):
    print("0")
else:
    array = list(range(l,r+1))
    for i in array:
        for j in array:
            temp = i * j % 2019
            if ans > temp:
                ans = temp
    
    print(ans)


L, R = list(map(int,input().split(" ")))
l = L % 2019
r = R % 2019

ans = 2019

if R - L >= 2018 or L > R:
    print("0")
else:
    array = list(range(l,r+1))
    for i in array:
        for j in array:
            if i == j:
                continue
            temp = i * j % 2019
            if ans > temp:
                ans = temp
    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(s) for s in input().split()]

mod_l = l % 2019
mod_r = r % 2019

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

print(min)


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

mod_l = l % 2019
mod_r = r % 2019

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

  print(vmin)


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())
mL = L % 2019
mR = R % 2019
if (mL > mR):
    print(0)
else:
    if (mL == 0):
        print(0)
    else:
        print(2*mL+1)


L,R = map(int,input().split())
mL = L % 2019
mR = R % 2019
if (mL > mR):print(0)
else:
    m = 2019
    for i in range(mL,mR):
        for j in range(i+1,mR+1):
            s = (i*j)%2019
            if m < s : m = s
    print(m)
            

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

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

min = 2 * 10 ** 9

if ((l * r) % 2019 == 0):
    print("0")
elif((l*r) < 2019):
    print(l * r)
else:
    for i in range(l, r-1):

        for j in range(i + 1, r):
            sub = (i * j) % 2019
            print(j)
            if (min > sub):
                min = sub
            if (min == 1):
                break
            if (j - i >= 2019):
                break
        if (min == 1):
            break
        elif (j - i >= 2019):
            break

    print(min)


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

a = 2018

for i in range(l, r):

    for j in range(i + 1, r + 1):
        a = min(a, (i * j) % 2019)
        if a == 0:
            print(a)
            exit()

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

import sys
l,r = map(int, input().split())
if r-l >= 2019:
    print(0)
    sys.exit()
ans = 10 ** 9
for i in range(l,r):
    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):
L,R = map(int,input().split())
right = min(L+2019, R+1)
minumum = 2019

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

print(minimum)

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

if R-L >= 2019:
    print("0")
else:
    sL = L % 2019
    sR = R % 2019
    minjo = 2019

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

    print(minjo)


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())
X=2019
for i in range (R-L):
    for j in range(R-L-i):
        if (L+i)*(L+i+j+1)%2019==0:
            X=0
            break
        elif X >(L+i)*(L+i+j+1)%2019:
            X=(L+i)*(L+i+j+1)%2019
    if X=0:
        break        
print(X)


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


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):
r,l = map(int,input().split())
if l-r+1 >= 2019:
    print("0")
    exit()
li = []
for i in range(l-r+1):
    li.append((r+i)%2019)
li.sort()
lia = []
for i in range(len(li)):
    for j in range(len(li)):
        lia.append((li[i]*li[j])%2019)
print(min(lia))

r,l = map(int,input().split())
if l-r+1 >= 2019:
    print("0")
    exit()
li = []
for i in range(l-r+1):
    li.append((r+i)%2019)
li.sort()
lia = []
for i in range(len(li)):
    for j in range(len(li)):
        if i != j:
            lia.append((li[i]*li[j])%2019)
print(min(lia))

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 = float('inf')
for i in range(min(2019,R-L+1)):
    for j in range(min(2019,R-L+1)):
        ans = min(ans,((L+i)*(L+j))%2019)
print(ans)

L,R = map(int,input().split())
ans = float('inf')
for i in range(L,min(L+2019,R)):
    for j in range(L,min(L+2019,R)):
        if ans > (i*j)%2019:
            ans = (i*j)%2019
print(ans)

L,R = map(int,input().split())
ans = float('inf')
for i in range(L,min(L+2019,R)):
    for j in range(i+1,min(L+2019,R)+1):
        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())

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

for i in range(l,r+1):
    if i%2019 == 0:
        print(0)
        exit()


# ans = (l*(l+1))%2019
# print(ans)


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

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

for i in range(l,r+1):
    if i%2019 == 0:
        print(0)
        exit()

ans = (l*(l+1))%2019
print(error)


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

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

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

print(ans)
    


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):
import math
import string
import itertools
import fractions
import heapq
import collections
import re
import array
import bisect
import sys
import random
import time
inf = 10**9


def main():
    ans = 2018
    l, r = list(map(int, input().split()))
    for i in range(l, min(l+2019, r)+1):
        for j in range(l, min(l+2019, r)+1):
            ans = min(ans, i*j % 2019)
    print(ans)


if __name__ == '__main__':
    main()


import math
import string
import itertools
import fractions
import heapq
import collections
import re
import array
import bisect
import sys
import random
import time
inf = 10**9


def main():
    ans = 2018
    l, r = list(map(int, input().split()))
    for i in range(l, min(l+2019, r)):
        for j in range(i, min(l+2019, r)+1):
            ans = min(ans, i*j % 2019)
    print(ans)


if __name__ == '__main__':
    main()


import math
import string
import itertools
import fractions
import heapq
import collections
import re
import array
import bisect
import sys
import random
import time
inf = 10**9


def main():
    ans = 2018
    l, r = list(map(int, input().split()))
    for i in range(l, min(l+2019, r)):
        for j in range(i+1, min(l+2019, r)+1):
            ans = min(ans, i*j % 2019)
    print(ans)


if __name__ == '__main__':
    main()


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 l > r:
    l, r = r, l

mod = 2020

for i in range(l, r+1):
    for j in range(i, r):
        tmp = i * j // 2019
        if tmp < mod:
            mod = tmp

print(tmp)

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

if l > r:
    l, r = r, l

mod = 2020

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

print(mod)

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

if l > r:
    l, r = r, l

mod = 2020

for i in range(l, r+1):
    for j in range(i+1, r+1):
        tmp = i * j % 2019
        if tmp < mod:
            print(i, j)
            mod = tmp

print(mod)

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

mod = 2018

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

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

ans_list = []
for i in range(2019):
  if l + i > r:
    break
  ans = (l * (l + i)) % 2019
  ans_list.append(ans)
  if ans == 0:
    break
print(min(ans_list))

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

ans_list = []
for i in range(2 * 10**9):
  if l + 1 > r:
    break
  ans = (l * (l + 1)) % 2019
  ans_list.append(ans)
  if ans == 0:
    break
print(min(ans_list))

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

ans_list = []
for i in range(l, min(l+2019, r)):
  for j in range(i + 1, min(i + 2019, r + 1)):
    ans = (i * j) % 2019
    ans_list.append(ans)
    if ans == 0:
      break
print(min(ans_list))

Verdicts: Wrong Answer

Time Limit Exceeded

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(_) for _ in input().split())

if abs(l - r) == 1:
    print(l * r % 2019)
else:
    lower = l // 2019
    upper = r // 2019
    start = l % 2019
    stop = r % 2019
    if 2019 * (lower + 1) < r:
        print(0)
    else:
        if start == 0:
            print(0)
        elif stop == 0:
            print(0)
        elif stop < start:
            print(0)
        elif stop > start:
            while stop > start:
                total = stop * start % 2019
                if total < ans:
                    ans = total
                start += 1
            print(ans)
                



l, r = (int(_) for _ in input().split())

if abs(l - r) == 1:
    print(l * r % 2019)
else:
    lower = l // 2019
    upper = r // 2019
    start = l % 2019
    stop = r % 2019
    if 2019 * (lower + 1) < r:
        print(0)
    else:
        ans = 1000000
        if start == 0:
            print(0)
        elif stop == 0:
            print(0)
        elif stop < start:
            print(0)
        elif stop > start:
            for i in range(start, stop + 1):
                for j in range(i+1, stop + 1):
                    if i * j % 2019 < ans:
                        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 = []
if R-L<2019:
    for i in range(L,R):
        for j in range(i+1,R+1):
            ans = (i*j)%2019
            ans_l.append(ans)
    print(min(ans_l)):
else:
    print(0)

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

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

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):
l, r = map(int, input().split())
ans = 2019
cnt = min(l + 2019, r)
lr = [i%2019 for i in range(l,cnt+1)]
for i in range(len(lr)-1):
    for j in range(i + 1,len(lr)):
        ans=min(ans,i*j)
print(ans)


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

ans = 2019
R = min(R, L+4038)
for i in range(L, R):
    f = False
    for j in range(i, R):
        m = (i*j)%2019
        if  m  == 0:
            print(0)
            f = True
            break     
        ans = min(ans, m)
    if f:
        break
print(ans)

L, R = map(int, input().split())
for i in range(L, R+1):
    f = False
    for j in range(i+1, R+1):
        m = (i*j)%2019
        if  m  == 0:
            print(0)
            f = True
            break     
        ans = min(ans, m)
    if f:
        break
print(ans)

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

ans = 2019
for i in range(L, R):
    f = False
    for j in range(i, R):
        if  ((i*j) % 2019) == 0:
            print(0)
            break
        ans = min(ans, (i*j)%2019)
    if f:
        break
print(ans)

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

ans = 2019
R = min(R, L+2019)
for i in range(L, R):
    f = False
    for j in range(i, R):
        m = (i*j)%2019
        if  m  == 0:
            print(0)
            break     
        ans = min(ans, m)
    if f:
        break
print(ans)

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

ans = 2018
R = min(R, L+2020)
for i in range(L, R+1):
    f = False
    print(i, L, R)
    for j in range(i+1, R+1):
        print(i, j, L, R)
        m = (i*j)%2019
        if  m  == 0:
            print(0)
            f = True
            break     
        ans = min(ans, m)
    if f:
        break
print(ans)


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

ans = 2018
R = min(R, L+2020)
for i in range(L, R+1):
    f = False
    for j in range(i+1, R+1):
        m = (i*j)%2019
        if  m  == 0:
            ans = m
            f = True
            break     
        ans = min(ans, m)
    if f:
        break
print(ans)


Verdicts: Wrong Answer

Runtime Error

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

L = L%2019
R = R%2019
MIN = 2020


for i in range(L,R+1):
    for j in range(i,R+1):
        if i != j:
            mod = i*j
            print(mod)
            MIN = min(MIN,mod%2019)
if R == 0 or L == 0:
    print(0)
elif R - L == 1:
    print((R*L)%2019)
elif R == L:
    print((R*L)%2019)
else:
    print(MIN)

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

MIN = 2020

for i in range(L,R+1):
    for j in range(i,R+1):
        mod = i*j
        MIN = min(MIN,mod%2019)
        if MIN == 0:
            break
# if R == 0 or L == 0:
#     print(0)
# elif R - L == 1:
#      print((R*L)%2019)
else:
    print(MIN)

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

MIN = 2020
flag = 0

for i in range(L,R+1):
    for j in range(i,R+1):
        mod = i*j % 2019
        MIN = min(MIN,mod%2019)
        if MIN == 0:
            flag = 1
            break
    if flag == 1:
        break

if R == 0 or L == 0:
    print(0)
elif R - L == 1:
     print((R*L)%2019)
else:
    print(MIN)

s = input().split()
L = int(s[0])
R = int(s[1])
 
L = L%2019
R = R%2019
MIN = 2020
if R - L >= 2019:
    flag = True

for i in range(min(L,R),max(L,R)+1):
    for j in range(i,max(L,R)+1):
        if i != j:
            mod = i*j
            MIN = min(MIN,mod%2019)
if R == 0 or L == 0 or flag:
    print(0)
elif abs(R - L) == 1:
    print((R*L)%2019)
elif R == L:
    print((R*L)%2019)
else:
    print(MIN)

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

MIN = 2020

for i in range(L,R+1):
    for j in range(i,R+1):
        mod = i*j
        MIN = min(MIN,mod%2019)
        if MIN == 0:
            break
# if R == 0 or L == 0:
#     print(0)
# elif R - L == 1:
#      print((R*L)%2019)
print(MIN)

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

MIN = 2020
flag = 0

for i in range(L,R+1):
    for j in range(i+1,R+1):
        mod = i*j % 2019
        MIN = min(MIN,mod%2019)
        if MIN == 0:
            flag = 1
            break
    if flag == 1:
        break

if R == 0 or L == 0:
    print(0)
elif R - L == 1:
     print((R*L)%2019)
else:
    print(MIN)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

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):
import sys
L,R=[int(x) for x in input().strip().split()]

tmp=10**9+1
ans=10**0+1

for i in range(L,R+1):
  for j in range(L,R+1):
    if i<=j:
      tmp=(i*j)%2019
      if ans==0:
          print(0)
          sys.exit()
      elif tmp<ans:
          ans=tmp
print(ans)


l,r=map(int,input().split())
import sys
mod=2019
ans=float('inf')

for i in range(l,r+1):
  for j in range(j+1,r+1):
    ans=min((i*j)%mod,ans)
    if ans==0:
      print(0)
      sys.exit()
print(ans)

l,r=map(int,input().split())
import sys
mod=2019
ans=float('inf')

for i in range(l,r):
  for j in range(j+1,r+1):
    ans=min((i%mod)*(j%mod),ans)
    if ans==0:
      print(0)
      sys.exit()
print(ans)

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

ans=10**9+1


for i in range(2020):
  for j in range(2020):
    if i<j:
      ans=min((i*j)%2019,ans)

print(ans)


  
      





l,r=map(int,input().split())
import sys
mod=2019
ans=float('inf')

for i in range(l,r+1):
  for j in range(i+1,r+1):
    ans=min((i*j)%mod,ans)
    if ans==0:
      print(0)
      sys.exit()
print(ans)

Verdicts: Wrong Answer

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):
import sys
l, r = map(int, input().split())
m = 2019

if r - l + 1 >= 2019 or l == 0:
    print(0)
else:
    min = (l%m * (l+1)%m)%m
    for i in range(l, r):
        if i%m == 0:
            print(0)
            sys.exit()
        for j in range(i+1, r+1):
            else:
                if min > (i%m * j%m)%m:
                    min = (i%m * j%m)%m
print(min)


import sys
l, r = map(int, input().split())
m = 2019
min = 2019

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



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


def main(L,R):
    mod_min = 2019
    if L // mod_min == R // mod_min:
        L %= mod_min
        R %= mod_min
        for i in range(L,R):
            for j in range(i+1, R+1):
                Y = i*j % 2019
                if Y < mod_min:
                    mod_min = Y
    else:
        mod_min = 0
    return mod_min
print(main(L,R))

L,R = list(map(int,input().split()))
def main(L,R):
    mod_min = 2019
    if L // mod_min == R // mod_min:
        L %= mod_min
        R %= mod_min
        for i in range(L,R):
            for j in range(i+1, R+1):
                Y = i*j % 2019
                if Y < mod_min:
                    mod_min = Y
    else:
        mod_min = 0
    return mod_min
print(main(L,R))

Verdicts: 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):
s, e = map(int,input().split())
mn = min(map(lambda x:x%2019,range(s,e+1)))
for i in range(s, e+1):
  ans = min(ans, mn*i)
print(ans)

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

ans = 2018
for i in range(l, min(r+1, l+2020)):
        for j in range(i+1, min(r+1, i+2020)):
                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 numpy as np
L,R = map(int,input().split())

np1 = np.array(range(L,R+1))
print(np1)
#np2 = np.multiply.outer(np1,np1)
#print(np2)

#np3 = np2%2019
#np3[0,0] = 2019
#np3[R-L,R-L]=2019
np2 = (np1*np1)%2019
np2[0] =2019
np2[R-L]=2019
print(np2)
print(np.amin(np2))

L,R = map(int,input().split())
ans = (L*(L+1))%2019
if R-L >= 2019:
    print(0)
    exit()
else:
    for i in range(L,R):
        for j in range(L+1,R+1):
            if ans > (i*j)%2019:
                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):
import numpy as np

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

import numpy as np

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

print(min)

import numpy as np

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

import numpy as np

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

print(min)

import numpy as np

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

import numpy as np

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

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 = map(int, input().split())
x = []

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

l, r = map(int, input().split())
x = []
y = []
 
for i in range(l, r):
  for j in range(i+1, r+1):
    m = i * j % 2019
    x.append(m)
    y.append(i*j)
print(y[x.index(min(x))])

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

for i in range(l, r+1):
  for j in range(i+1, r+1):
    m = i * j % 2019
    x.append(m)
    y.append(i*j)
print(y[x.index(min(x))])
    

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

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

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

L, R = map(int, sys.stdin.readline().split())
mod = 2019

mod_L = L%2019
mod_R = R%2019

if R - L > 2019:
    temp_i = mod_L
    temp_j = 2018
else:
    temp_i = mod_L
    temp_j = mod_R

min_mod = 9999
for i in range(mod_L, mod_R):
    print(i + 2019)
    for j in range(i + 1, mod_R + 1):
        if ((i*j)%mod) < min_mod:
            min_mod = (i*j)%mod
print(min_mod)

import sys

L, R = map(int, sys.stdin.readline().split())
mod = 2019

mod_L = L%2019
mod_R = R%2019

for i in range(L + 1, R + 1):
    if i % mod == 0:
        print(0)
        sys.exit()

if R - L >= 2019:
    temp_i = mod_L
    temp_j = 2018
else:
    temp_i = mod_L
    temp_j = mod_R

min_mod = 2019
for i in range(mod_L, mod_R):
    for j in range(i + 1, mod_R + 1):
        if ((i*j)%mod) < min_mod:
            min_mod = (i*j)%mod
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):
N = R - L
A = []
A.append(10000)
if(L >= R):
    print(0)
elif(L == 0):
    print(0)
else:
    if(N = 1):
        print((L * R) % 2019)
    else:
        for i in range(L, R + 1):
            for j in range(i + 1, R + 1):
                A.append((i * j) % 2019)
        print(min(A))

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

L, R = map(int, input().split())
ans = 10000
 
for i in range(L, min(R + 1, L + 2020)):
  for j in range(i,  min(R + 1, L + 2020)):
    if i < j:
      ans = min(ans, (i * j)%2019)
 
print(ans)

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

if r - l == 1:
    print(r * l % 2019)
    exit()
    
ans = 10 ** 5
for i in range(l, r - 1):
    for j in range(i + 1, r):
        print(i, j)
        n = (i * j) % 2019
        ans = min(ans, n)
        if n == 0:
            print(0)
            exit()
print(ans)


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

ans = 10 ** 5
for i in range(l, r):
    for j in range(i + 1, r+1):
        n = (i * j) % 2019
        ans = min(ans, n)
        if n == 0:
            print(0)
            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=(int(x) for x in input().split())
L_mod=L%2019
R_mod=R%2019
if L_mod>=R_mod:
    print(0)
else:
    print(L_mod*(L_mod+1s))


L,R=(int(x) for x in input().split())
print(0)

L,R=(int(x) for x in input().split())
ans=[]
for n in range(2019):
    if L+n>=R:
        break
    for l in range(n+1,2019):
        if L+l>R:
            break
        a=(L+n)%2019
        b=(L+l)%2019
        c=a*b%2019
        ans.append(c)
print(min(ans))


Verdicts: 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())
li = []
if r-l>=2019:
    print(0)
elif r-l<2019:
    for i in range(l,r):
        for j in range(i+1,r+1):
            li.append(i*j%2019)
            if i*j$2019 == 0:
                break
        if i*j$2019 == 0:
            break
                
print(min(li))

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

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

Verdicts: Runtime Error

Wrong Answer

Accepted