Problem:


Score : 100 points

Problem Statement

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?

Constraints

All values in input are integers.

1 \leq N \leq 20

1 \leq A \leq 50

1 \leq B \leq 50

Input

Input is given from Standard Input in the following format:

N A B

Output

Print an integer representing the minimum total travel expense.

Sample Input 1

4 2 9

Sample Output 1

8

The train will cost us 4 \times 2 = 8 yen, and the taxi will cost us 9 yen, so the minimum total travel expense is 8 yen.

Sample Input 2

4 2 7

Sample Output 2

7

Sample Input 3

4 2 8

Sample Output 3

8



Sample input:
4 2 9


Sample output:
8

Submission status: Runtime Error

Solution code:
L, R = map(int, input().split())

mod = []
if R+1-L<=2019:
    for i in range(L,R):
        for j in range(i+1,R+1):
            mod.append((i*j)%2019)

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


if len(mod)==0:
    print((L*R)%2019)
else:
    print(min(mod))

Submission status: Runtime Error

Solution code:
L, R = map(int, input().split())



#print(L%2019, R%2019)

#print((L + 2019 - L%2019))

tmp = 0
"""
if L * R < 2019:
	i = L
	j = R

elif (L + 2019 - L%2019) + 1 <= R:
	if L < L + 2019 - L % 2019 and L + 2019 - L % 2019 + 1 < R:
		i =  L + 2019 - L % 2019
		j = i+1

elif L % 2019 < R % 2019:
	i = L
	j = i+1

elif R % 2019 > L % 2019:
	j = R
	i = j-1

else:
	i = L
	j = R
"""

i = 2019 - np.abs(L-R)
j = i+1

ans = i * j % 2019

print(ans)

Submission status: Runtime Error

Solution code:
n = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]

for N in n:
  int(A)
  A+=1
  int(B)
  B+=1

x=A.Min():
y=B.Min():
print(n,A,B)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
A,B=map(int,iput(),split())
if A*N<B :
  print"A*N"
  else:
    print"B"

Submission status: Runtime Error

Solution code:
n, a, b = map(int,input().split())
if n＊a < b:
  print(int(n＊a))
elif n＊a >= b:
  print(int(b))

Submission status: Runtime Error

Solution code:
l, r = map(int, input().split())
l, r = l%2019, r%2019
mi = 9999
if r*(r-1)<2019:
    print(l*(l+1))
elif r==0 or l==0:
    print(0)
else:
    for i in range(l, r-1):
        for j in range(i+1, r):
            if (i/3).is_integer() and (j/673).is_integer():
                mi = (i/3)*((i/3)+1)
            elif (i/673).is_integer() and (j/3).is_integer():
                mi = (i/673)*((i/673)+1)
            else:
                mi = min(mi, (i*j)%2019)
    print(mi)

Submission status: Runtime Error

Solution code:
l, r = map(int, input().split())
l, r = l%2019, r%2019
mi = 9999
if r*(r-1)<2019:
    print(l*(l+1))
elif r==0 or l==0:
    print(0)
else:
    for i in range(l, r-1):
        for j in range(i+1, r):
            if (i/3).is_integer() and (j/673).is_integer():
                print((i/3)*((i/3)+1))
            elif (i/673).is_integer() and (j/3).is_integer():
                print((i/673)*((i/673)+1))
            else:
                mi = min(mi, (i*j)%2019)
    print(mi)

Submission status: Runtime Error

Solution code:
n, a, b = map(int,input().split())
if n＊a < b:
  print(n＊a)
elif n＊a >= b:
  print(b)

Submission status: Runtime Error

Solution code:
def main():
    l,r = map(int,input().split(' '))
    tmp = 2019
    if l//2019 < r//2019:
        print(0)
    else:
        for i in range(l,r):
            if tmp > (i*(i+1))%2019:
                tmp = (i*(i+1))%2019
                if tmp == 0:
                    print(i,i+1)
        print(tmp)

if __name__ == '__main__':
    main()

Submission status: Runtime Error

Solution code:
L,R=map(int,input().split())
l=L//2019
ll=L%2019
r=R//2019
if l<r or ll==0:
  print(0)
else:
  print(ll*(ll+1))

Submission status: Runtime Error

Solution code:
L, R = map(int, input().split())

Lmod = L%2019
Rmod = R%2019

i = Lmod
j = i + 1

for k in range(L, R+1):
  if (k%2019) == 0:
    print(0)
    break
  elif k < R:
	continue
  else:
	print((i*j)%2019)

Submission status: Runtime Error

Solution code:
L, R = map(int, input().split())

Lmod = L%2019
Rmod = R%2019

i = Lmod
j = i + 1

for k in range(L, R+1):
  if (k%2019) == 0:
    print(0)
    break
  elif (k < R):
  	continue
  else:
    print((i*j)%2019)

Submission status: Runtime Error

Solution code:
N=int(input("enter number of people"))
A=int(input("enter the cost of train"))
B=int(input("enter the cost of taxi"))
t1=N*A
t2=N*B
if t1<t2:
      tmin=t1
      print("minimum total travel expense",tmin)
else:
      tmin=t2
      print("minimum total travel expense",tmin)

Submission status: Runtime Error

Solution code:
import sys

args = sys.argv

n = int(args[1])
a = int(args[2])
b = int(args[3])

train = n * a
bus = b

if(train < bus):
  train
else:
  bus

Submission status: Runtime Error

Solution code:
import numpy as np

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

listA=[] #appendのために宣言が必要
while True:
    try:
        listA.append(list(map(int,input().split())))

    except:
        break;
        #または、quit(),os.exit()をして止める。

count = 0
for i in range(n):
    for j in range(n):
        if(i < j):
            dis = 0
            for k in range(d):
                dis += (listA[i][k]-listA[j][k]) ** 2
            dis = np.sqrt(dis)
            if(dis.is_integer()):
                count += 1


print(count)

Submission status: Runtime Error

Solution code:
import sys

args = sys.argv

n = int(args[1])
a = int(args[2])
b = int(args[3])

train = n * a
bus = b

if(train < bus):
  print(train)
else:
  print(bus)

Submission status: Runtime Error

Solution code:
n,a,b=int(input()).split()
c=n*a
if c<b:
  print(c)
elif c>b:
  print(b)
elif c==b:
  print(c)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import sys

args = sys.argv

n = args[1]
a = args[2]
b = args[3]

train = n * a
bus = b

if(train < bus):
  print(train)
else:
  print(bus)

Submission status: Runtime Error

Solution code:
L, R = map(int,input().split())
L_mod = L%2019
if L_mod ==0:
  print(0)
else:
  R_mod = R%2019
  if R_mod ==0:
    print(0)
  else:
    if L_mod<R_mod:
      list =[]
      for i in range(L_mod,R_mod,1):
        mod_i = i%2019
        for j in range(i+1,R_mod+1,1):
          mod_j = j%2019
          mod = (mod_i *mod_j)%2019
          list.append(mod)

      print(min(list))
      
    else:
      print(0)

Submission status: Runtime Error

Solution code:
str = input()

L, R = map(int, str.split(" "))

min = 2019

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

print(min)

Submission status: Runtime Error

Solution code:
def main():
    (N, A, B) = [int(input()) for i in range(3)]
    ans = 0
    if N*A > B:
        ans = B
    else:
        ans = N*A
	print(ans)

Submission status: Runtime Error

Solution code:
import math
import numpy as np
N, D = map(int, input().split())
times = int(input())  
n = [list(map(int, input().split())) for i in range(times)]
n = np.array(n)
ans = 0
for j in range(n.shape[0]):
  for i in range(n.shape[0]):
    length = np.linalg.norm(n[i]-n[j])
    aaa = math.modf(length)[0]
    if aaa < 0.00001:
      ans +=1
ans = ans - n.shape[0]
ans = int(ans/2)
print(ans)

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <sstream>
#include <iomanip>
#include <cstring>
#include <string>
#include <vector>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cmath>
#include <queue>
#include <stack>
#include <map>

#define repd(i,a,b) for (int i=(a);i<(b);i++)
#define rep(i,n) repd(i,0,n)
typedef long long ll;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }

using namespace std;

const ll BIG = 1000000007LL;

int inputValue(){
    int a;
    cin >> a;
    return a;
};

template<typename T>
void inputArray(T* p, int a){
    rep(i, a){
        cin >> p[i];
    }
};

template<typename T>
void inputVector(vector<T> * p, int a){
    rep(i, a){
        T input;
        cin >> input;
        p -> push_back(input);
    }
}

template <typename T>
void output(T a, int precision = 0) {
    if(precision > 0){
        cout << setprecision(precision)  << a << "\n";
    }
    else{
        cout << a << "\n";
    }
}

const int Max = 110;
int N, A, B;

int main(int argc, const char * argv[]) {
    cin >> N >> A >> B;
    output(min(A*N, B));

    return 0;
}

Submission status: Runtime Error

Solution code:
l,r=map(int,input().split())
L=l%2019
R=r%2019
min=2020
if L>R:
    R=R+2019
for j in range(L+1,R+1):
    for i in range(L,j):
        if min > i*j%2019:
            min = i*j%2019
print("{}".format(min))

Submission status: Runtime Error

Solution code:
l,r = map(int,input().split())
diff = r - l

if(diff >= 2019):
  print(0)
else:
  lmod = l % 2019
  rmod = r % 2019
  if(rmod  < lmod):
    print(0)
  else:
    ans =2020
    for i in range(l,r+1):
      for j in range(i+1,r+1):
        print("{} {}".format(i,j))
        if((i*j) % 2019 < ans):
          ans = (i*j) % 2019
    print(ans)

Submission status: Runtime Error

Solution code:
from sys import stdin
import numpy as np
import itertools
N,D = [int(x) for x in stdin.readline().rstrip().split()]
data = []
for _ in range(N):
    data.append([int(x) for x in stdin.readline().rstrip().split()] + [_])

ans = 0
for j in list(itertools.product(data,repeat=2)):
    tot = 0
    #print(j)
    for k,l in zip(j[0][:D] , j[1][:D]):
        tot += abs(k-l)**2
        #print(tot)
    if j[0][-1] < j[1][-1]:
        if np.sqrt(tot).is_integer():
            ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
x,y,z = map(int,input().stlip())
x = int(x)
y = int(y)
z = int(z)
if x*y > z:
  print(x*y)
else:
  print(z)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x,y,z = map(int,input().stlip())
x = int(x)
y = int(y)
z = int(z)
if x＊y > z:
  print(x＊y)
else:
  print(z)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
x,y,z = input().split()
x = int(x)
y = int(y)
z = int(z)
if x＊y > z:
  print(x＊y)
else:
  print(z)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N=int(input("enter number of people")
A=int(input("enter the cost of train")
B=int(input("enter the cost of taxi")
t1=N*A
t2=N*B
if t1<t2:
      tmin=t1
      print("minimum total travel expense",tmin)
else:
      tmin=t2
      print("minimum total travel expense",tmin)

Submission status: Runtime Error

Solution code:
def main():
    (N, A, B) = [int(input()) for i in range(3)]
    ans = 0
    if N*A > B:
        ans = B
    else:
        ans = N*A
       
	print(ans)

Submission status: Runtime Error

Solution code:
input.split() = list
densya = list[1] * list[2]
if densya >= list[3]:
	print(list[3])
else:
	print(densya)

Submission status: Runtime Error

Solution code:
x,y,z = input().stlip()
x = int(x)
y = int(y)
z = int(z)
if x＊y > z:
  print(x＊y)
else:
  print(z)

Submission status: Runtime Error

Solution code:
N = int(input('人数：'))
A = int(input('電車賃：'))
B = int(input('タクシー代：'))
l=N*A
if l>B:
    print(B)
else:
    print(l)

Submission status: Runtime Error

Solution code:
def main():
    (N, A, B) = [int(input()) for i in range(3)]
    ans = 0
    if N*A > B:
        ans = B
    else:
        ans = N*A
       
	print(ans)

        
if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
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))

Submission status: Runtime Error

Solution code:
l, r = map(int, input().split())
# 2019 = 3 * 673

rr = min(r, l + 2020)

res = 1000000
for i in range(l, rr+1):
    for j in range(l + 1, rr + 1):
        #print("{0}, {1}".format(i, j))
        if i >= j:
            #print("skip")
            continue

        if res > i*j % 2019:
            #print("{0}, {1}".format(i, j))
            res = i*j % 2019
print(res)

Submission status: Runtime Error

Solution code:
# coding:utf-8

line = input()
ls = line.split(" ")
n = ls[0]
a = ls[1]
b = ls[2]

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

Submission status: Runtime Error

Solution code:
def main():
    (N, A, B) = [int(input()) for i in range(3)]
    if N*A > B:
        print(B)
    else:
        print(N*A)

        
if __name__ == "__main__":
    main()

Submission status: Runtime Error

Solution code:
T = N * A

L = [T, B]
min(L)

Submission status: Runtime Error

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

total_cost = N * A

if total_cost > B:
  total_cost = B
  
print(total_cost)

Submission status: Runtime Error

Solution code:
N,A,B=input(),input(),input()

if(N*A<B):
    print(N*A)
elif N*B<N*A:
    print(N*B)
elif N*A==N*B:
    print(N*A)

Submission status: Runtime Error

Solution code:
N = int(input())
A = int(input())
B = int(input())

def kansuu(N,A,B):
	if N*A>B:
	  return B
	else:
 	  return NA

Submission status: Runtime Error

Solution code:
input(taxi)
input(train)
print(train+taxi)

Submission status: Runtime Error

Solution code:
s = input()
s.split(' ')

n = int(s[0])
a = int(s[2])
b = int(s[4])

train = n * a
taxi = b

if(taxi < train):
    print(taxi)
else:
    print(train)

Submission status: Runtime Error

Solution code:
def main():
    N=int(input())
    A=int(input())
    B=int(input())

    if(N*A<B):
        return N*A
    elif N*B<N*A:
        return N*B
    elif N*A==N*B:
        return N*A
        
print(main())

Submission status: Runtime Error

Solution code:
n,a,b = map(int,input.split())
return(min(n*a,b))

Submission status: Runtime Error

Solution code:
N=int(input())
A=int(input())
B=int(input())

if(N*A<B):
	print(N*A)
elif:
	print(N*B)
elif N*A==N*B:
    print(N*A)

Submission status: Runtime Error

Solution code:
n=input()
n.split(" ")
if int(n[0])*int(n[1]) < int(n[2]):
  print(int(n[0])*int(n[1]))
else:
  print(int(n[2]))

Submission status: Runtime Error

Solution code:

s=inp()
#s = ("4 2 9")
#print(s) 
s = s.split(" ")


densya = int(s[0])*int(s[1])
taxi   = int( s[2] )

if ( densya < taxi):
    print(densya)
else:
    print(taxi)

Submission status: Runtime Error

Solution code:
import sys

readline = sys.stdin.readline

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

print(min(N * A), B)

Submission status: Runtime Error

Solution code:
L, R = map(int, input().split())

Lmod = L%2019
Rmod = R%2019

i = Lmod
j = i + 1

print((i*j)%2019)

Submission status: Runtime Error

Solution code:
n, a, b = map(int, input().split())
if 3 * A < B:
    print(3 * A)
else:
    print(B)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
# 整数Nの入力
N = int(input())

# 整数Aの入力
A = int(input())

# 整数Bの入力
B = int(input())

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys


def answer(N, A, B):
    rail = N * A
    taxi = B

    return min(rail, taxi)


if __name__ == '__main__':
    args = sys.stdin.read().split(' ')
    answer(args[0], args[1], args[2])

Submission status: Runtime Error

Solution code:
N=int(input())
A=int(input())
B=int(input())

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

Submission status: Runtime Error

Solution code:

s=inp()
#s = (1 2 2) 
s = s.split(" ")


densya = int(s[0])*int(s[1])
taxi   = int( s[3] )

if ( densya < taxi):
    print(densya)
else:
    print(taxi)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
s=inp()
#s = (1 2 2) 
s = s.split(" ")


densya = s[0]*s[1]
taxi   = s[3]

if ( densya < taxi):
    print(densya)
else:
    print(taxi)

Submission status: Runtime Error

Solution code:
N, A, B = int(raw_input().split(' '))

print(min(int(A) * int(N), int(B)))

Submission status: Runtime Error

Solution code:
N,A,B=int(input(),input(),input())
if(N*A<N*B):
	print(N*A)
else:
	print(N*B)

Submission status: Runtime Error

Solution code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace AtCoder
{
    partial class Program
    {
       
            var input = Console.ReadLine().Split(' ').Select(int.Parse).ToArray();
            var n = input[0];
            var a = input[1];
            var b = input[2];

            Console.WriteLine(Math.Min(n * a, b));

    }
}

Submission status: Runtime Error

Solution code:
N,A,B=mnap(int,input().split())

C=A*N
if C<B:
  print(B)
elif C>B:
  print(C)

Submission status: Runtime Error

Solution code:
N = input()
A = input()
B = input()
if NA > B:
  return B
else:
  return NA

Submission status: Runtime Error

Solution code:
numbers = input().split()
if(numbers[0]*numbers[1] < numbers[2]):
  ans = numbers[0]*numbers[1]
else:
  ans = number[2]

print(ans)

Submission status: Runtime Error

Solution code:
# -*- coding: utf-8 -*-
import sys


def answer(N, A, B):
    rail = N * A
    taxi = B

    return min(rail, taxi)


if __name__ == '__main__':
    args = sys.stdin
    answer(args[0], args[1], args[2])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, a, b=list(input().sprit())
res=min(n*a,b)
print(res)

Submission status: Runtime Error

Solution code:
d = list(map(int, input().split()))
N = d[0]
A = d[1]
B = d[2]

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
nab = input().split()
n = nab[0]
a = nab[1]
b = nab[2]

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys

N, A, B = sys.argv[1:]

print min(N*A, B)

Submission status: Runtime Error

Solution code:
d = list(map(int, input().split()))
N = d[0]
A = d[1]
B = d[2]

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys

N, A, B = map(int, sys.argv[1:])
return min(N*A, B)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
price = list(map(int, input().rstrip().split()))
print(min(price[0]*price[1], price[2])

Submission status: Runtime Error

Solution code:
n, a, b = map(int, input().spalit())
pa = n * a
print(min(pa, b))

Submission status: Runtime Error

Solution code:
n, a, b = map(int, input().split())
print(min(m * a, b))

Submission status: Runtime Error

Solution code:
import sys

N, A, V = map(int, sys.argv[1:])
return (N*A) + V

Submission status: Runtime Error

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

print(min(n*a,b))

Submission status: Runtime Error

Solution code:
n,a,b = map(nt,input().split())
print(min(a*n,b))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy,copy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

if  __name__=='__main__':
    main()