TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: You are given a sequence with N integers: A = \\{ A_1, A_2, \cdots, A_N \\}. For each of these N integers, we will choose a color and paint the integer with that color. Here the following condition must be satisfied:    * If A_i and A_j (i < j) are painted with the same color, A_i < A_j.  Find the minimum number of colors required to satisfy the condition.

Submission attempts (in order):
import bisect
def LIS(a):
    lis = [a[0]]
    for i in range(len(a)):
        if i != 0 and a[i] >= lis[-1]:
            lis.append(a[i])
        else:
            index = bisect.bisect_right(lis,a[i])
            lis[index] = a[i]
    return len(lis)

def main():
    n = int(input())
    a = [-int(input()) for _ in range(n)]
    print(LIS(a))

if __name__ == "__main__":
    main()

import bisect
from collections import deque
def LIS(a):
    lis = deque()
    lis.append(-1)
    for i in range(len(a)):
        index = bisect.bisect_left(lis,a[i])
        if index == 0:
            lis.appendleft(a[i])
        else:
            lis[index-1] = a[i]
    return len(lis)

def main():
    n = int(input())
    a = [int(input()) for _ in range(n)]
    print(LIS(a))

if __name__ == "__main__":
    main()

Verdicts: Runtime Error

Accepted
Problem: You are given a sequence with N integers: A = \\{ A_1, A_2, \cdots, A_N \\}. For each of these N integers, we will choose a color and paint the integer with that color. Here the following condition must be satisfied:    * If A_i and A_j (i < j) are painted with the same color, A_i < A_j.  Find the minimum number of colors required to satisfy the condition.

Submission attempts (in order):


import bisect


def solve():
    N = int(input())
    A = [int(input()) for _ in range(N)]
    color_list = [A[-1]]
    for a in reversed(A[:-1]):
        
        c = bisect.bisect_left(color_list, a + 1)  
        print(c)
        if c == len(color_list):
            color_list.append(a)
        else:
            color_list[c] = a
    print(len(color_list))


if __name__ == '__main__':
    solve()




import bisect


def solve():
    N = int(input())
    A = [int(input()) for _ in range(N)]
    color_list = [A[-1]]
    for a in reversed(A[:-1]):
        
        c = bisect.bisect_left(color_list, a + 1)
        if c == len(color_list):
            color_list.append(a)
        else:
            color_list[c] = a
    print(len(color_list))


if __name__ == '__main__':
    solve()


Verdicts: Wrong Answer

Accepted
Problem: You are given a sequence with N integers: A = \\{ A_1, A_2, \cdots, A_N \\}. For each of these N integers, we will choose a color and paint the integer with that color. Here the following condition must be satisfied:    * If A_i and A_j (i < j) are painted with the same color, A_i < A_j.  Find the minimum number of colors required to satisfy the condition.

Submission attempts (in order):
N = int(input())
A = [int(input()) for _ in range(N)]

if N == 1:
    print(1)
    exit()

if A[0] < A[1]:
    ans = 1
    m = A[0]
    M = A[1]
elif A[0] >= A[1]:
    ans = 2
    m = A[1]
    M = A[0]

for a in A[2:]:
    print(m,M)
    if a <= m:
        ans += 1
        m = a
    elif m < a <= M:
        m = a
    elif M < a:
        M = a

print(ans)

from bisect import bisect
inf = float('inf')


def LIS(arr):
    N = len(arr)
    dp = [inf] * N
    res = 0
    for a in arr:
        pos = bisect(dp,a)
        dp[pos] = a
        res = max(res, pos + 1)
    return res

N = int(input())
A = [int(input()) for _ in range(N)]

ans = LIS(A[::-1])
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: You are given a sequence with N integers: A = \\{ A_1, A_2, \cdots, A_N \\}. For each of these N integers, we will choose a color and paint the integer with that color. Here the following condition must be satisfied:    * If A_i and A_j (i < j) are painted with the same color, A_i < A_j.  Find the minimum number of colors required to satisfy the condition.

Submission attempts (in order):
from bisect import bisect
n = int(input())
a = [int(input()) for _ in range(n)]
update_list=[11 for _ in range(n+1)]
for old_element in range(n):
    update_position=bisect(update_list,-a[old_element])
    update_list[update_position]=-a[old_element]

counter=1
for sign in update_list:
    if sign>0:
        counter+=1
print(counter)

from bisect import bisect
n = int(input())
a = [int(input()) for _ in range(n)]
update_list=[11 for _ in range(n+1)]
for old_element in range(n):
    update_position=bisect(update_list,-a[old_element])
    update_list[update_position]=-a[old_element]

ans=0
while update_list[ans] <= 0:
	ans += 1
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: You are given a sequence with N integers: A = \\{ A_1, A_2, \cdots, A_N \\}. For each of these N integers, we will choose a color and paint the integer with that color. Here the following condition must be satisfied:    * If A_i and A_j (i < j) are painted with the same color, A_i < A_j.  Find the minimum number of colors required to satisfy the condition.

Submission attempts (in order):
N=int(input())

lasts=[int(input())]
for _ in range(N-1):
    a=int(input())
    
    if a<=lasts[0]:
        lasts.insert(0, a)
    else:
        for i,val in enumerate(lasts[::-1]):
            if val<a:
                lasts[len(lasts)-1-i]=a
                break

print(len(lasts)

from collections import deque
import bisect
import sys

input = sys.stdin.readline
N = int(input())
A = [int(input()) for _ in range(N)]
A = A[::-1]

col = [A.pop()]
col = deque(col)

while A:
    a = A.pop()
    if a <= col[0]:
        col.appendleft(a)
    else:
        x = bisect.bisect_left(col, a)
        col[x - 1] = a

ans = len(col)
print(ans)


Verdicts: Runtime Error

Accepted
Problem: You are given a sequence with N integers: A = \\{ A_1, A_2, \cdots, A_N \\}. For each of these N integers, we will choose a color and paint the integer with that color. Here the following condition must be satisfied:    * If A_i and A_j (i < j) are painted with the same color, A_i < A_j.  Find the minimum number of colors required to satisfy the condition.

Submission attempts (in order):
import bisect
N = int(input())
A = [0 for i in range(N)]
for i in range(N):
    A[i] = int(input())
now = [-A[0]]
 
for i in range(1, N):
 
    index = bisect.insort_right(now, -A[i])
    if index == len(now):
        now.append(-A[i])
    else:
        now[index] = -A[i]
 
print(len(now))

import bisect
N = int(input())
A = [0 for i in range(N)]
for i in range(N):
    A[i] = int(input())
now = [-A[0]]
 
for i in range(1, N):
 
    index = bisect.bisect_right(now, -A[i])
    if index == len(now):
        now.append(-A[i])
    else:
        now[index] = -A[i]
print(len(now))

Verdicts: Runtime Error

Accepted
Problem: You are given a sequence with N integers: A = \\{ A_1, A_2, \cdots, A_N \\}. For each of these N integers, we will choose a color and paint the integer with that color. Here the following condition must be satisfied:    * If A_i and A_j (i < j) are painted with the same color, A_i < A_j.  Find the minimum number of colors required to satisfy the condition.

Submission attempts (in order):
n = int(input())
A = [int(input()) for i in range(n)]
m = 10**9
c = 0
for a in A:
    if a <= m:
        c += 1
print(c)


import bisect
n = int(input())
A = [int(input()) for i in range(n)]
m = 10**9
X = []
for a in A:
    i = bisect.bisect_right(X, -a)
    if i == len(X):
        X.append(-a)
    else:
        X[i] = -a
print(len(X))


Verdicts: Wrong Answer

Accepted
Problem: Let us define the _oddness_ of a permutation p = {p_1,\ p_2,\ ...,\ p_n} of {1,\ 2,\ ...,\ n} as \sum_{i = 1}^n |i - p_i|.  Find the number of permutations of {1,\ 2,\ ...,\ n} of oddness k, modulo 10^9+7.

Submission attempts (in order):
MOD = 10**9 + 7
n, oddness = [int(item) for item in input().split()]
# Oddness must be even
if oddness % 2 ==  1:
    print(0)
    exit()
oddness //= 2
max_oddness = 1300 + n
max_pending = n//2 + 2

dp = [[[0] * (max_oddness) for _ in range(max_pending)] for _ in range(n)]
dp[0][0][0] = 1
dp[0][1][1] = 1
k_itr = [item for item in range(1300)]
for i in range(1, n):
    for j in range(min(i+1, n//2)):
        for k in range(min(n*n, oddness+1)):
            dp_ijk = dp[i-1][j][k]
            # Oddness increase by num of pending item
            # Connect in line or Choose 1 from pending items
            dp[i][j][k+j] += dp_ijk * (1 + j*2)
            # dp[i][j][k+j] %= MOD
            # Choose 2 from pending items
            if j > 0:
                dp[i][j-1][k+j-1] += dp_ijk * j*j
                dp[i][j-1][k+j-1] %= MOD 
            # Do nothing 
            dp[i][j+1][k+j+1] += dp_ijk 
            # dp[i][j+1][k+j+1] %= MOD 

print(dp[n-1][0][oddness] % MOD)

MOD = 10**9 + 7
n, oddness = [int(item) for item in input().split()]
# Oddness must be even
if oddness % 2 ==  1:
    print(0)
    exit()
oddness //= 2
max_oddness = 1250 + n
max_pending = n//2 + 2

dp = [[[0] * (max_oddness) for _ in range(max_pending)] for _ in range(n)]
dp[0][0][0] = 1
dp[0][1][1] = 1
for i in range(1, n):
    for j in range(min(i+1, n//2+1)):
        for k in range(oddness+1):
            dp_ijk_prev = dp[i-1][j][k]
            # Oddness increase by num of pending item
            # Do not connect
            dp[i][j+1][k+j+1] += dp_ijk_prev 
            # Choose 2 from pending items
            if j > 0:
                dp[i][j-1][k+j-1] += dp_ijk_prev * j*j
            # Connect in line 
            dp[i][j][k+j] += dp_ijk_prev
            # Choose 1 from pending items
            dp[i][j][k+j] += dp_ijk_prev * j * 2
            dp[i][j][k+j] %= MOD

print(dp[n-1][0][oddness] % MOD)

Verdicts: Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
list=list(map(int,input().split()))
print(min(list[1]*N, list[2]*N))

N,A,B=map(int,input().split())
A=N*A
if A>=B:
    print(B)
else:
    print(A)

Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

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

ans = 0
min_mod = 2019

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

    ans = min_mod
    
print(ans)

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

ans = 0
min_mod = 2019

if R-L+1<2019 :
  if R % 2019 > 0:
    for i in range(L,R) :
      if L+1 == R :
        min_mod = (L*R) % 2019
      else :
        for j in range(L+1,R):
          if min_mod > (i*j) % 2019:
            min_mod = (i*j) % 2019

    ans = min_mod
    
print(ans)

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

ans = 0
min_mod = 2019

if R-L<2019-1 :
  if R % 2019 > 0:
    for i in range(R-L) :
      if min_mod > (L + i) % 2019 :
        min_mod = (L + i) % 2019
    
    ans = min_mod * (min_mod + 1)

print(ans)

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

print(min(n*a,b))


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):

N, A, B = map(int, input().split())

print(max(N * A, B))

N, A, B = map(int, input().split())

print(min(N * A, B))


Verdicts: Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

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

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


N,A,B = map(int, input().split())
print(N*A if N*A <= B else B)

Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
a, b, c = map(int, input().split())
if a*b >= c:
  print(a*b)
else:
  print(c)

a, b, c = map(int, input().split())
if a*b > c:
  print(a*b)
else:
  print(c)

a, b, c = map(int, input().split())
if a*b >= c:
  print(c)
elif a*b == c:
  print(c)
else:
  print(a*b)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
import numpy

n, d = map(int, input().split())

l = []
for v in range(n):
    l.append(list(map(int, input().split())))

ans = 0

for i in range(n - 1):
    for j in range(i + 1, n):
        if i == j:
            continue
        a = numpy.array(l[i])
        b = numpy.array(l[j])
        c = numpy.linalg.norm(b - a)
        if (c.is_integer()):
            ans += 1

print(ans)


n, a, b = map(int, input().split())
ans = 0

if (n * a > b):
    ans = b
else:
    ans = n * a

print(ans)


Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
n, a, b = int(input().split())
if a*n > b:
  print(a*n)
else:
  print(b)


n, a, b = int(input())
if a*n > b:
  print(a*n)
else:
  print(b)

n, a, b = map(int, input().split())
if a*n > b:
  print(a*n)
else:
  print(b)


n, a, b = map(int, input().split())
if a*n < b:
  print(a*n)
else:
  print(b)


Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
n, a, b = [int(s) for in input().split(" ")]

print("%d" % min(n * a, b))

n, a, b = [int(s) for s in input().split(" ")]

print("%d" % min(n * a, b))

Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
N,A,B = map(int,input().split())
print(min(S*N,B))

N,A,B = map(int,input().split())
print(min(A*N,B))

Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
n,a,b = map(int, input().split())
ans=b
tr = n*a
if tr < b
	ans=tr
print(ans)

n,a,b = map(int, input().split())
ans=b
tr = n*a
if tr < b:
	ans=tr
print(ans)

Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):


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

print(min(b,a*n))



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

print(min(b,a*n))

Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
n,a,b=map(int,input().split())
print(b if a*n>b else a*b)

n,a,b=map(int,input().split())
print(b if a*n>b else a*n)

Verdicts: Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
N,A,B = map(int,input().split())

Aans = A*B

if Aans > B:
    print(B)
else:
    print(Aans)

N,A,B = map(int,input().split())

Aans = A*N

if Aans > B:
    print(B)
else:
    print(Aans)

Verdicts: Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
n = int(input())
_a = input().split()

a = []

x = []

for i in range(n):
  a.append(2*int(_a[i]))
  x.append(0)
  
for i in range(1, n):
  a[i] -= a[i-1]

x[n-1] = a[n-1] // 2

for i in range(n-2, -1, -1):
  if i%2==0:
    x[i] = a[i] - x[n-1]
  else:
    x[i] = a[i] + x[n-1]
    
ans = str(x[n-1]) + ' '
for i in range(n-1):
  ans += str(x[i]) + ' '
  

print(ans[:-1])


nab = input().split()

n = int(nab[0])
a = int(nab[1])
b = int(nab[2])

print(min(a*n, b))

Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
n,a,b=map(int,input().split())
print(max([a*n,b]))

n,a,b=map(int,input().split())
print(min(n*a,b))

Verdicts: Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

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):
		a.append((i*j)%2019)
		if 0 in a:
			print(0)
			sys.exit()
print(min(a))

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

if n*a<b:
      print(n*a)
else:
      print(b)

Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
n, a, b = map(int, input().split())
print(max(b,a*n))

n, a, b = map(int, input().split())
print(min(b,a*n))

Verdicts: Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

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)

N, A, B = list(map(int, input().split()))

tac = N * A
train = B

if tac > train:
    print(tac)

else:
    print(train)

N, A, B = list(map(int, input().split()))

tac = N * A
train = B

if tac < train:
    print(tac)

else:
    print(train)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
print((lambda n,a,b:max(n*a, b))(*[int(x) for x in input().split()]))

print((lambda n,a,b:max(n*a, b))(*[int(x) for x in input().split()])

print((lambda n,a,b:min(n*a, b))(*[int(x) for x in input().split()]))

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
N, A, B = map(int, input().split())

if B >= N*A:
  print(B)
else:
  print(N*A)

N, A, B = map(int, input().split())

if N * A >= B:
  print(N*A)
else:
  print(B)

N, A, B = map(int, input().split())

if B >= N*A:
  print(N*A)
else:
  print(B)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
n,a,b=map(int,input().split())
s=[a,b/n]
print(min(s))

n,a,b=map(int,input().split())
s=[a*n,b]
print(min(s))

Verdicts: Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
N,A,B = map(int,input().split())

answer = 0
if A * N >= B:
	answer = B
else:
	answer = A
print(answer)

N,A,B = map(int,input().split())

answer = 0
if A * N >= B:
	answer = B
else:
	answer = A * N
print(answer)

Verdicts: Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
n,a,b = map(int,input().split())
if n*a <= b:
    print(b)
else:
    print(n*a)

n,a,b = map(int,input().split())
if n*a >= b:
    print(b)
else:
    print(n*a)

Verdicts: Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
n,a,b = map(int, input().split())
print(max(n*a,b))

n,a,b = map(int, input().split())
print(min(n*a,b))

Verdicts: Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
n,a,b = map(input().split())
ans = 0
if n * a > b:
  ans += b
else:
  ans += n * a
print(ans)

n,a,b = map(int,input().split())
ans = 0
if n * a > b:
  ans = b
else:
  ans = n * a
print(ans)

Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
N, A, B = map(int, input().split())
if N*A > B:
  print(B)
else:
  print(N*A

N, A, B = map(int, input().split())
if N*A > B:
  print(B)
else:
  print(N*A)

Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
x = 1
for i in range(10 ** 8):
    x *= i
print(x)

# ABC133A - T or T
def main():
    N, A, B = map(int, input().split())
    ans = min(N * A, B)
    print(ans)


if __name__ == "__main__":
    main()

Verdicts: Time Limit Exceeded

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
def main():
  n, a, b  = map(int, input().split())
  print(a*n, b)


if __name__ == '__main__':
  main()


def main():
  n, a, b  = map(int, input().split())
  print(min(a*n, b))


if __name__ == '__main__':
  main()


Verdicts: Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
n, train, taxi = map(int, input().split(' '))
if n * train >= taxi:
  print(int(n*train))
else:
  print(int(taxi))

n, train, taxi = map(int, input().split(' '))
if n * train <= taxi:
  print(int(n*train))
else:
  print(int(taxi))

Verdicts: Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
n,a,b=map(int,input().split())
print(max(n*a,b))

n,a,b=map(int,input().split())
print(min(n*a,b))

Verdicts: Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
a,b,c=int(input().split())
print(min(a*n,b))

n,a,b=int(input().split())
print(min(a*n,b))

n,a,b=map(int,input().split())
print(min(b,a*n))


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
N,A,B = map(int,input().split())
train_tax = N * A
total_tax = train_tax + B
print(total_tax)

N, A, B = map(int, input().split())

if n * a < b:
	print(n*a)
else:
	print(b)


N, A, B = map(int, input().split())

if N * A < B:
	print(N*A)
else:
	print(B)


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
N,A,B = map(int, input().split())
if N*A >= B:
  print(B)
else:
  print(A)

N,A,B = map(int, input().split())
if N*A <= B:
  print(A)
else:
  print(B)


N,A,B = map(int, input().split())
if N*A >= B:
  print(B)
else:
  print(N*A)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
x, y, z = input().split()
N = int(x)
A = int(y)
B = int(z)

answer = A + (N * B)
print(answer)


x, y, z = input().split()
N = int(x)
A = int(y)
B = int(z)

if A < (N * B):
    print(A)
else:
    print(N * B)



x, y, z = input().split()
N = int(x)
A = int(y)
B = int(z)

if A * N < B:
    print(A * N)
else:
    print(B)


Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
n,a,b=map(int,input().split()
print(n*min(a,b))

n,a,b=map(int,input())
print(n*min(a,b))

n,a,b=map(int,input().split())
print(min(n*a,b))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
a = list(map(int,input().split()))
if a[0]*a[1]<=a[2]:
  prnit(a[0]*a[1])
else:
  print(a[2])


a = list(map(int,input().split()))
if a[0]*a[1]<=a[2]:
  print(a[0]*a[1])
else:
  print(a[2])


Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
N, A, B=map(int, input().split())
print(N)
print(A)
print(B)

N, A, B=map(int, input().split())
print(min(A*N, B))

Verdicts: Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
N = int(input())
A = list(map(int, input().split()))
rain = []
S = sum(A)
sub = sum(A[1:N:2])
rain.append(S - sub * 2)
while len(rain) != N:
    rain.append(A[len(rain) - 1] * 2 - rain[-1])
for _ in rain:
    print(_)

A = list(map(int,input().split()))
if A[0] * A[1] <= A[2]:
    print(A[0] * A[1])
else:
    print(A[2])

Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
print(min(int(input())*int(input()),int(input())))

N,D=map(int,input().split())
c=0
X=[[0]*D]*N
for l in range(N):
    X[l]=list(map(int,input().split()))
for i in range(N-1):
    l=0
    for j in range(i+1,N):
        for k in range(D):
            l+=(X[i][k]-X[j][k])**2
        if pow(l,0.5).is_integer() == True:
            c+=1
print(c)


#133 T or T
N,A,B = map(int,input().split())
print(min(N*A,B))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
a, b, c = map(int, input().split())

tak = int(a) * int(b)
rail = int(c)

if tak > rail: 
	print( "%d" % tak )
else :
  	print( "%d" % rail )

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

tak = int(a) * int(b)
rail = int(c)

if tak < rail: 
	print( "%d" % tak )
else :
  	print( "%d" % rail )

Verdicts: Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
n,a,b = map(int,input().split())
print(a if a<b*n else n*b)

n,a,b =map(int,input().split())
print(b if b< n*a else n*a)

Verdicts: Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

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

i_rest = l % 2019
count_i
for i in range(l, r):
  i_rest_next = i % 2019
  if i_rest_next < i_rest:
    i_rest = i_rest_next
    count_i = i
    
min_i = i_rest

i_rest = (count_i+1) % 2019
for i in range(count_i+1, r+1):
  i_rest_next = i % 2019
  if i_rest_next < i_rest:
    i_rest = i_rest_next

min_j = i_rest

print(min_i * min_j % 2019)

l, r = map(int, input().split())
 
i_rest = l % 2019
for i in range(l, r):
  i_rest_next = i % 2019
  if i_rest_next <= i_rest:
    i_rest = i_rest_next
    count_i = i
min_i = i_rest

i_rest = (count_i+1) % 2019
for i in range(count_i+1, r+1):
  i_rest_next = i % 2019
  if i_rest_next <= i_rest:
    i_rest = i_rest_next
min_j = i_rest
 
print(min_i * min_j)

num = [int(i) for i in input().split()]
print(min(num[0]*num[1], num[2]))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
n,a,b=map(int,input()split())

if n*a>b:
  return b

else:
  return n*a

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

if li[0]*li[1]>li[2]:
  print(li[0]*li[1])
else:
  print(li[2])

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

if n*a>b:
  print(b)

else:
  print(n*a)


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
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)

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

if n * a < b:
  print(n * a)
else:
  print(b)

Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
from math import sqrt
n,d=map(int, input().split())
x=[list(map(int, input().split())) for i in range(n)]

ans=0
tmp = 0

for i in range(n):
  for j in range(i+1, n):
    xi,xj = x[i],x[j]
    for k in range(d):
      tmp += (xi[k]-xj[k]) ** 2
      
    if sqrt(tmp)%1==0:
      ans += 1

print(ans)



N, A, B = map(int, input().split())
if N*A<=B:
  print(N*A)
else:
  print(B)

Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
a,b,c = map(int,input().split)
 
if a*b <= c:
  print(a:b)
else:
  print(c)

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

if a*b < c:
  print(a:b)
else:
  print(c)

a,b,c = map(int,input().split())
 
if a*b < c:
  print(a:b)
else:
  print(c)

a,b,c = map(int,input().split())
if a*b < c:
  print(a*b)
else:
  print(c)

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
n,a,b = map(int,input().split())
print(min(a,n*b))

n,a,b = map(int,input().split())
print(min(b,n*a))

Verdicts: Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
n,a,b = map(int,input().split())

c = n*a
if c >= b:
print(b)
else:
print(c)

N, A, B = map(int, input().split())
print(min(N * A, B))

Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
n,d=map(int,input().split())
x=[]
for i in range(n):
    a=list(map(int,input().split()))
    x.append(a)
import math
c=0
d=0
e=0
for j in range (n-1):
    for k in range(j+1,n):
        for m in range(d):
            d+=float((x[j][m]-x[k][m])*(x[j][m]-x[k][m]))
        c=float(math.sqrt(d))
        if(c.is_integer()=1):
            e+=1
        d=0
print('{0}'.format(e))
        
        

n,a,b=map(int,input().split())
print('{0}'.format(min(b,n*a)))

Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
L, R = map(int, input().split())
m = 673
if R // m - (L - 1) // m != 0:
    print(0)
else:
    minnum = 1000
    Lmod = L % m
    Rmod = R % m
    for i in range(Lmod, Rmod+1):
        for j in range(i + 1, Rmod+1):
            #print(i, j, (i * j) % 2019)
            minnum = min(minnum, (i * j) % 2019)
    print(minnum)


N, A, B = map(int, input().split())
sume = N * A
print(min(B, sume))

Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
L, R = map(int, input().split())
mod = 2019
ans = mod + 100

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


N, A, B = map(int, input().split())
print(min(A * N, B))


Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
def Input():
    return mapt(int, input().split(" "))


def main():
    n, a, b = Input()
    ans = min(n*a, b)
    print(ans)


main()

def mapt(fn, *args):
    return list(map(fn, *args))


def Input():
    return mapt(int, input().split(" "))


def main():
    n, a, b = Input()
    ans = min(n*a, b)
    print(ans)


main()

Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

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

all_mod =[]

cnt1 = 0
for i in range(l, r, 1):
    cnt = 0
    for j in range(l + 1, r + 1, 1):
        mod = (i * j) % 2019
        all_mod.append(mod)

        cnt += 1

        if cnt > 2019:
            break

    cnt1 += 1
    if cnt1 > 2019:
        break

print(min(all_mod))

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

all_mod =[]

cnt1 = 0
for i in range(l, r, 1):
    cnt = 0
    for j in range(l + 1, r + 1, 1):
        mod = (i * j) % 2019
        all_mod.append(mod)

        cnt += 1

        if cnt > 2019:
            break

    cnt1 += 1
    if cnt1 > 2019:
        break

print(min(all_mod))


x, y, z = input().split()

n = int(x)
a = int(y)
b = int(z)

sum = n * a
print(min(sum, b))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
l, r = map(int, input().split())
 
v = []
 
if l*r < 2019:
    print(l*r)
else:
    for a, i in enumerate(range(l, r+1)):
        for j in range(l+a+1, r+1):
            if i*j%2019 in v:
                print(min(v))
                exit()
            else:
                v.append(i*j%2019)
                
    print(min(v))

l, r = map(int, input().split())
 
v = []
 
if l*r < 2019:
    print(l*r)
else:
    flag = True
    for a, i in enumerate(range(l, r+1)):
        for j in range(l+a+1, r+1):
            if i*j%2019 in v:
                break
            else:
                v.append(i*j%2019)
        else:
            continue
        break

    print(min(v))

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

if l == 0:
    print(0)
if l*r < 2019:
    print(l*r)
else:
    for a, i in enumerate(range(l, r+1)):
        for j in range(i+1, r+1):
            if i*j%2019 in v:
                break
            else:
                v.append(i*j%2019)
        else:
            continue
        break

    print(min(v))

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

print(min(n*a, b))

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
N,A,B = map(int,input.split())
print(min(B,N*A))

N,A,B = map(int,input().split())
print(min(B,N*A))

Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
if __name__ == "__main__":
    n,a,b = input(),input(),input()
    print (max(n*a,b))


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

print(max(n*a,b))

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

print(min(n*a,b))

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
N,A,B = map(int,input().slit())
if N*A<B:
  print(N*A)
elif N*A>B:
  print(B)
else:
  print()

N,A,B = map(int,input().slit())
if N*A<=B:
  print(N*A)
else N*A>=B:
  print(B)

N,A,B = map(int,input().split())
if N*A<=B:
  print(N*A)
else:
  print(B)

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
n, a, b = map(int, input().split( ))
print(max(a * n, b))

n, a, b = map(int, input().split( ))
print(min(a * n, b))

Verdicts: Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
n,a,b=amap(int,input().split())
print(min(b,a*n))

n,a,b=map(int,input().split())
print(min(b,a*n))

Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

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


if R < 2019 :
    print((L * (L + 1)) % 2019)

elif L <= 2019 and R >= 2019 :
    print(0)

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


N,A,B = map(int,input().split())
if N * A < B :
    print(N * A)
else :
    print(B)


Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
import numpy as np

if __name__ == '__main__':
	N = int(input())
	dam = np.array(list(map(int, input().split())))

	index_ = np.array([1 if i % 2 == 0 else -1 for i in range(N)])
	ans = np.array([])
	for i in range(N):
		ans = np.append(ans, np.dot(dam, index_))
		index_ = np.roll(index_, 1)
	ans = [str(int(i)) for i in ans]

	print(' '.join(ans))

N, A, B = map(int, input().split())
if N*A < B:
	print(N*A)
else :
	print(B)

Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
n, a, b = map(int, input().split())
if n*a >= b:
    print(n*a)
else:
    print(b)


n, a, b = map(int, input().split())
if n*a <= b:
    print(n*a)
else:
    print(b)


Verdicts: Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
i = input().spli(" ")
people = int(i[0])
train_fee = int(i[1])
taxi_fee = int(i[2])

train_sum = people * train_fee
if train_sum > taxi_fee:
    print(train_sum)
else:
    print(taxi_fee)


i = input().split(" ")
people = int(i[0])
train_fee = int(i[1])
taxi_fee = int(i[2])

train_sum = people * train_fee
if train_sum > taxi_fee:
    print(train_sum)
else:
    print(taxi_fee)


i = input().split(" ")
people = int(i[0])
train_fee = int(i[1])
taxi_fee = int(i[2])

train_sum = people * train_fee
if train_sum > taxi_fee:
    print(taxi_fee)
else:
    print(train_sum)


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
numbers = input().split()
if(numbers[0]*numbers[1] < numbers[2]):
  ans = numbers[0]*numbers[1]
else:
  ans = number[2]

print(ans)

numbers = input().split()
if(int(numbers[0])*int(numbers[1]) < int(numbers[2])):
  ans = int(numbers[0])*int(numbers[1]) 
else:
  ans = int(numbers[2])
 
print(ans)

Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

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 math

n,D = map(int,input().split())

point = []
for _ in range(n):
  x = list(map(int, input().split()))
  point.append(x)

cnt = 0
for i in range(n-1):
  for j in range(i+1, n):
    dist = 0
    for d in range(D):
      dist += (point[i][d] - point[j][d])**2
    dist = math.sqrt(dist)
    if int(dist) == dist:
      cnt += 1
print(cnt)

N, A, B = map(int, input().split())
print(min(A*N, B))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
n,a,b=map(int,input().split())
print(min(a,n*b))

n,a,b=map(int,input().split())
print(min(b,n*a))


Verdicts: Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
a, b, c = list(map(intl, input().split()))
if a * b >= c:
  print(c)
else:
  print(a * b)

a, b, c = list(map(int, input().split()))
if a * b >= c:
  print(c)
else:
  print(a * b)

Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
n,a,b = map(int,input().split())
c = n*a
if c >= b:
  print(c)
else:
  print(b)

n,a,b = map(int,input().split())
c = n*a
if n*a > b:
  print(n*a)
else:
  print(b)

n,a,b = map(int,input().split())
print(min(n*a,b))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

Submission attempts (in order):
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):
            ans = min(ans, (i * j) % 2019)
    print(ans)


N, A, B = map(int, input().split())
print(min(N*A, B))


Verdicts: Runtime Error

Accepted
Problem: N of us are going on a trip, by train or taxi.  The train will cost each of us A yen (the currency of Japan).  The taxi will cost us a total of B yen.  How much is our minimum total travel expense?

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

n, a, b = map(int, input().split())
print(min(a * n, b))

Verdicts: Runtime Error

Accepted