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:
a,b,c = map(int,input().split())
d = a*b
if d>c:
print("{}".format(c))
else:
print("{}".format(d))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

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(int,input().split()
print(n*min(a,b))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
_input = [i for i in open(0).read().split('\n') if i]
n, k = [int(i) for i in _input[0].split()]
edge = tuple([tuple([int(p) for p in i.split()]) for i in _input[1:n]])

factorial = [0] * (k + 1)
inverse = [0] * (k + 1)
MOD = 1000000007

# Ref: http://keita-matsushita.hatenablog.com/entry/2016/12/05/175024
def mod_pow1(n, k, mod):
    a = 1
    while k:
        if (k & 1) == 1:
            a = (a * n) % mod
        n = (n * n) % mod
        k >>= 1
    return a

# Ref: https://www.smartbowwow.com/2018/10/mod1097.html
def mod_pow2(n, k, mod):
    if k == 0:
        return 1
    if k % 2 == 0:
        a = mod_pow2(n, k // 2, mod)
        return (a * a) % mod
    else:
        return (n * mod_pow2(n, k - 1, mod)) % mod

mod_pow = pow

def mod_factorial_inverse(k, mod):
    factorial[0] = 1
    inverse[0] = 1

    # Ref: http://keita-matsushita.hatenablog.com/entry/2016/12/05/184011
    for i in range(1, k + 1):
        factorial[i] = ((i * factorial[i - 1]) % mod) # factrial[i]
        inverse[i] = mod_pow(factorial[i], mod - 2, mod) # inverse[i]

if not edge:
    print(k)
else:
    all_edge = tuple([[] for _ in range(n + 1)])
    for e in edge:
        all_edge[e[0]].append(e[1])
        all_edge[e[1]].append(e[0])

    if [v for v in all_edge if len(v) >= k]:
        print(0)
    else:
        mod_factorial_inverse(k, MOD)

Submission status: Runtime Error

Solution code:
a,b=map(int,input().split())
if a>13:
  print(b)
elif 6<=a<=12:
  print(b/2)
else :
  print(0)

Submission status: Runtime Error

Solution code:
L, R = map(int, input().split())
import numpy as np
LL = L%2019
RR = R%2019
min = 2019


for i in range(LL, RR+1):
    for j in range(i+1, RR+1):
        if (i*j)%2019 < min:
            min= (i*j)%2019

        if (i*j)%2019 == 0:
            min = 0
            break
    else:
        continue
    break
        

print(min)

Submission status: Runtime Error

Solution code:
L, R = map(int, input().split())
import numpy as np
LL = L%2019
RR = R%2019
min = 2019


for i in range(LL, RR+1):
  for j in range(i+1, RR+1):
    if (i*j)%2019 == 0:
      min = 0
      break
    elif (i*j)%2019 < min:
      min= (i*j)%2019


print(min)

Submission status: Runtime Error

Solution code:
L, R = map(int, input().split())
import numpy as np
min = 2019
for i in range(L, R+1):
    for j in range(i+1, R+1):
        if (i*j)%2019 < min:
            min = (i*j)%2019

print(min)

Submission status: Runtime Error

Solution code:
S = input().sprit()
N = int(S[0])
A = int(S[1])
B = int(S[2])
if B > A*N:
  print(A*N)
else:
  print(B)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
L,R = map(int,input().split())
l = L
m = (L *(L + 1)) % 2019
while l < min (R, L + 2019):
  r = l + 1
  while r <= min (R, L + 2019):
  	n = (l * r) % 2019 
  	m = min(m,n)
  	r = r + 1
  l = l + 1
print(m)

Submission status: Runtime Error

Solution code:
n,a,b =open(0)


c = int(int(a) * int(n))
b = int(b)

if c > b:
  print(b)
  
else:
  print(c)

Submission status: Runtime Error

Solution code:
n = input()
a = input()
b = input()
if n * a > b:
    print(b)
else:
    print(a*b)

Submission status: Runtime Error

Solution code:
import sys
sys.setrecursionlimit(10000000)
n,k=map(int,input().split())
graph=[[] for i in range(n)]
for i in range(n-1):
  a,b=map(int,input().split())
  graph[a-1].append(b-1)
  graph[b-1].append(a-1)
MOD=10**9+7
def coloring(node,pre):
  if len(graph[node])>k:
    return 0
  if pre==-1:
    color=k-1
  else:
    color=k-2
  ans=1
  for i in graph[node]:
    if i==pre:continue
    ans*=color
    ans%=MOD
    color-=1
  for i in graph[node]:
    if i==pre:continue
    ans*=coloring(i,node)
    ans%=MOD
  return ans
print((k*coloring(0,-1))%MOD)

Submission status: Runtime Error

Solution code:
import queue

n, k = map(int, input().split())
edges = []
for _ in range(n-1):
  edges.append(list(map(int, input().split())))

mod = 10**9+7
edge_dict = {}
for i in range(1, n+1):
  edge_dict[i] = set()

for edge in edges:
  edge_dict[edge[0]].add(edge[1])
  edge_dict[edge[1]].add(edge[0])

visited = set()
q = queue.LifoQueue()
q.put(1)

while not q.empty():
  node = q.get()
  visited.add(node)
  print("Visit %d"%node)
  
  for child in (edge_dict[node] - visited):
    q.put(child)

Submission status: Runtime Error

Solution code:
n, k = map(int, input().split())
edges = []
for _ in range(n-1):
  edges.append(list(map(int, input().split())))

mod = 10**9+7
edge_dict = {}
for i in range(1, n+1):
  edge_dict[i] = set()

for edge in edges:
  edge_dict[edge[0]].add(edge[1])
  edge_dict[edge[1]].add(edge[0])

visited = set()

def visit(node, parent):
  num_children = len(edge_dict[node])
  num_available_colors = k-2 if parent is not None else k-1
  
  if num_available_colors < num_children:
    return 0
  
  ans = 1
  
#   print("VISIT {} {} {}".format(node, ans, num_available_colors))
  for child in edge_dict[node]:
    if child is parent:
      continue
    
    ans *= num_available_colors
    num_available_colors -= 1
    ans %= mod
  
#   print("VISIT {} {} {}".format(node, ans, num_available_colors))
  
  for child in edge_dict[node]:
    if child is parent:
      continue
    
    ans *= visit(child, node)
    ans %= mod
  
#   print("VISIT {} from {}, {}, {}".format(node, parent, ans, num_children))
  return ans

print((k*visit(1, None))%mod)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import numpy as np
N,D = map(int,input().split())
X =[]
cnt = 0
for i in range(N):
  X = np.vstack(X,list(map(int,input().split())))

for i in range(N-1):
    c = X[i]
    for j in range(i+1,N):
        d = X[j]
        e = c-d
        f = np.square(e)
        g = sum(f)
        h = np.sqrt(g)
        l = int(h**.5)
        if abs(l*l-h) <1e-6:
            cnt +=1

Submission status: Runtime Error

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

if D>B:
    print(D)
else: 
    print(G)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
in = input()

in = in.split()

N = in[0]
A = in[1]
B = in[2]


train_cost = N*A
taxi_cost  = B

if N*A > B:
    print(B)
elif:
    print(N*A)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N, A, B = (int(x) for x in 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())
sum=min(N*A,B)
print(sum)

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python

def main():
    N, A, B = list(map(int, input().strip().split()))
    if N * A < B:
        return N * A
    else:
        return B

 print(main())

Submission status: Runtime Error

Solution code:
N,A,B=int(input())
a =int( A　* N)
c=min(a,B)
print(c)

Submission status: Runtime Error

Solution code:
N,A,B=int(input())
a = A　* N
c=min(a,B)
print(c)

Submission status: Runtime Error

Solution code:
A=int(input())
B=int(input())
N=int(input())
a=A * N
c=min(a,B)
print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def main(n,a,b):
    if 1 <= n <= 20 and 1 <= a <= 50 and 1 <= b <= 50 :
        sum_list = [(n-x)*b + x * a for x in range(1,n)]
    return min(sum_list)

if __name__ == '__main__':
    s = list(map(int, input().split()))
    huga = main(s[0],s[1],s[2])
    print(huga)

Submission status: Runtime Error

Solution code:
import sys

args = sys.argv

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

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

Submission status: Runtime Error

Solution code:
import sys
print('python-izm')

args = sys.argv

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

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

Submission status: Runtime Error

Solution code:
import sys
print('python-izm')

args = sys.argv

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

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

Submission status: Runtime Error

Solution code:
if __name__ == "__main__":
    n,a,b = input(),input(),input()
    print (max(n*a,b))

Submission status: Runtime Error

Solution code:
// https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}

fn main() {
    input! {
        n: usize,
        a: usize,
        b: usize
    }

    println!("{}", std::cmp::min(n * a, b))
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N,A,B = map(int, input().split(","))
list=[N*A,B]
min(list)

Submission status: Runtime Error

Solution code:
import math

n,d = map(int,input().split())
xy = [list(map(float,input().split())) for i in range(n)]
count = 0
for i in range(n):
  for j in range(i+1,n):
    dis=0
    for k in range(d):
      dis += (xy[i][k]-xy[j][k])**2
    dis = math.sqrt(dis)
    if dis.is_integer():
      count +=1
      
print(count)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def main01():
    data = input().split()
    nums = []

    for i in range(3):
        nums.append(int(data))
    densya = num[0] * num[1]
    if densya > num[2]:
        print(num[2])
    else:
        print(densya)


if __name__ == "__main__":
    main01()

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

if na < b:
  print(na)
  else:
    print(b)

Submission status: Runtime Error

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

print(na if na< b else: b)

Submission status: Runtime Error

Solution code:
n=int(input())
a=int(input())
b=int(input())
densha=n*a
taxi=b
if densha>taxi:
    print(taxi)
elif densha<taxi:
    print(densha)
else:
    print(densha)

Submission status: Runtime Error

Solution code:
n=int(input())
a=int(input())
b=int(input())
densha=n*a
taxi=b
if densha>taxi:
    print(taxi)
elif densha<taxi:
    print(densha)
else :
    print(densha)

Submission status: Runtime Error

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

if a*n <= b:
  return a*n
else:
  return b

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
cat ./atcoder/ABC133A.py
n,a,b = map(int,raw_input().split())
print (min(a*n,b))

Submission status: Runtime Error

Solution code:
N,D = map(int,input().split())

X = [list(map(int,input().split())) for _ in range(N)]

ans = 0
for i in range(N):
  for j in range(i):
    tmp = 0
    for k in range(D):
      tmp += (X[i][k] - X[j][k]) ** 2
    tmp = tmp ** 0.5
    if tmp % 1 == 0:
      ans += 1
      
print(ans)

Submission status: Runtime Error

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

if A*N<B:
    ans=a*N
else:
    ans=B

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
l,r=map(int,sys.stdin.readline().split())
r_m=r%2019
l_m=l%2019
min=2019
if r-l>2019-r_m:
    print(0)
else:
    retu=range(l_m,r_m+1)

    for i in range(len(retu)):
        for j in range(i+1,len(retu)):
            s=retu[i]*retu[j]%2019
            if s<min:
                min=s
print(min)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
import numpy as np

N, D = map(int, input().split())
X = [[int(i) for i in input().split()] for i in range(N)]

is_int = 0
for i in range(N-1):
  for j in range(i+1, N-i):
    l1 = np.array(X[i])
    l2 = np.array(X[j])
    d = math.sqrt(sum((l1-l2)**2))
    if isinstance(d, int):
      is_int += 1
      print(is_int)

Submission status: Runtime Error

Solution code:
N = 4
A = 2 
B = 9
N * A = 8
8 < 9
true

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
a=list(map(int,input()))
if a[0]*a[1]>a[2]:
  print(a[2])
else:
  print(a[0]*a[1])

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = int(input("N = "))
A = int(input("A = "))
B = int(input("B = "))
train = N * A
taxi = B
if train >= taxi:
    print(taxi)
else:
    print(train)

Submission status: Runtime Error

Solution code:
L,R=map(int,input().split())
R=min(R, L+673)
li=[]
for i in range(L,R):
  for j in range(i+1,R+1):
      mod=(i*j)%2019
      li.append(mod)
      if mod==0:
        break
print(min(li))

Submission status: Runtime Error

Solution code:
L,R=map(int,input().split())
li=[]
for i in range(L,R):
  for j in range(i+1,R+1):
    mod=(i*j)%2019
    if mod==0:
      break
    li.append(mod)
print(min(li))

Submission status: Runtime Error

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

if R-L+1>=2019:
    print(0)
else:
    L %= 2019
    R %= 2019
    if L<R:
        k=L*(L+1)
        print(k)
    else:
        print(0)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

train=n*a
taxi=b

fare=min(taxi,train)

print(str(fare))

Submission status: Runtime Error

Solution code:
alpha = N * A
if B <= alpha:
  print(B)
  
elif B > alpha:
  prihnt(alpha)

Submission status: Runtime Error

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

Submission status: Runtime Error

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


li = [N*A,B]
print(min(li()))

Submission status: Runtime Error

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

x = N*A
y = B
li = [x,y]
print(min(li()))

Submission status: Runtime Error

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

li = [x,y]
print(min(li()))

Submission status: Runtime Error

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

li = [N , A , B]
print(min(li()))

Submission status: Runtime Error

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

li[N*A,B]
print(str(min(li())))

Submission status: Runtime Error

Solution code:
x = N * A
y = B

li = [x,y]
print(min(li))

Submission status: Runtime Error

Solution code:
n=int(input())
x=list(map(int, input().split()))
import numpy as np

y=np.repeat([1,-1]*(n-1))
y.append([1])
print(y)

for i in range(n):
	if i%2!=0:
		y[i]=-1

x2=np.array(x).T

for i in range(n):
	y2=np.roll(y,i)
	res=np.dot(y2,x2)
	print(res)

Submission status: Runtime Error

Solution code:
l, r = list(map(int, input().split()))
# if r-l >=2019:
# 	print(0)
# else:
x= [i*j%2019 for i in range(l,r) for j in range (i+1,r+1)]
x.sort()
print(x[0])

Submission status: Runtime Error

Solution code:
import math
n,d=input().split()
n=int(n)
d=int(d)
def combinations(n, r):
    return math.factorial(n)/(math.factorial(n-r)*math.factorial(r))
x=[]
if d==1:
  count=combinations(n,2)
  count=int(count)
else:
  for i in range(n):
    xa=[int(s) for s in input().split()]
    x.append(xa)
  a=[]
  for i in range(n-1):
    for j in range(i+1,n):
      t=[]
      for k in range(d):
        c=(x[i][k]-x[j][k])*(x[i][k]-x[j][k])
        t.append(c)
        if k==d-1:
          a.append(sum(t))
  answer=list(map(lambda x:pow(x,1/2),a))
  count=0
  for l in range(n):
    if answer[l].is_integer()==True:
      count=count+1
print(count)

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 math
import itertools

a,b=map(int,input().split())
X = [[int(i) for i in input().split()] for i in range(a)] 
#for i in range():
c = list(itertools.combinations(X, 2))


ans = 0

for i in range(len(c)):
  d = 0
  for j in range(b):
    d += (c[i][0][j]-c[i][1][j])**2
    if j == b-1:
      d = math.sqrt(d)
      if d.is_integer():
        ans = ans+1

print(ans)

Submission status: Runtime Error

Solution code:
x = raw_input().split()
if(x[0] * x[1] < x[2]):
  print(x[0] * x[1])
  elif:
    print(x[2])

Submission status: Runtime Error

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

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:
a,b,c=input().split()
d=a*b
if d<=c:
  print(d)
else:
  print(c)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n = int(input())
a = int(input())
b = int(input())

print("{}".format(min(n*a, b)))

Submission status: Runtime Error

Solution code:
n = int(input())
a = int(input())
b = int(input())

print("".format(min(n*a, b)))

Submission status: Runtime Error

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

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
try:
    while True:
        n = input()
        a=input()
		b=input()
		nn=int(n)
		aa=int(a)
		bb=int(b)
        if n == '':
            break
        if a == '':
            break
        if b == '':
            break
except EOFError:
    pass

train=nn*aa
taxi=bb
if train>=taxi:
  print(train)
else:
  print(taxi)

Submission status: Runtime Error

Solution code:
import sys
n=input()
a=input()
b=input()
nn=int(n)
aa=int(a)
bb=int(b)

train=nn*aa
taxi=bb
if train>=taxi:
  print(train)
else:
  print(taxi)

Submission status: Runtime Error

Solution code:
import sys
n=input()
a=input()
b=input()
train=int(n)*int(a)
taxi=int(b)
if train>=taxi:
  print(train)
else:
  print(taxi)

Submission status: Runtime Error

Solution code:
import sys
n=input()
a=input()
b=input()
train=n*a
taxi=b
if train>=taxi:
  print(train)
else:
  print(taxi)

Submission status: Runtime Error

Solution code:
input(N, A, B)

print(min(N*A, B))

Submission status: Runtime Error

Solution code:
a = [int(i) for i in input().split()]

if a[0]*a[1]<=a[2]:
  return a[0]*a[1]

else:
  return a[2]

Submission status: Runtime Error

Solution code:
a = [int(i) for i in range input().split()]

if a[0]*a[1]<=a[2]:
  return a[0]*a[1]

if a[0]*a[1]>a[2]:
  return a[2]

Submission status: Runtime Error

Solution code:
a = input().split()

if a[0]*a[1]<=a[2]:
  return a[0]*a[1]

if a[0]*a[1]>a[2]:
  return a[2]

Submission status: Runtime Error

Solution code:
a = list( input().split())

if a[0]*a[1]<=a[2]:
  return a[0]*a[1]

if a[0]*a[1]>a[2]:
  return a[2]

Submission status: Runtime Error

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

if a[0]*a[1]<=a[2]:
  return a[0]*a[1]

if a[0]*a[1]>a[2]:
  return a[2]

Submission status: Runtime Error

Solution code:
i = list( map( int, input().split()))
if i[0]*i[1]<=i[2]:
  return i[0]*i[1]
else:
  return i[2]

Submission status: Runtime Error

Solution code:
text = input()
N = text[0]
A = text[2]
B = text[4]

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

# Rが2019未満のとき
if R < 2019 :
    print((L * (L + 1)) % 2019)
# 範囲内に2019を含む時
elif L <= 2019 and R >= 2019 :
    print(0)
# LもRも2019より高い場合
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)

Submission status: Runtime Error

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

a=N*A
b=B
if N*A<=B:
	print(a)
else:
	print(b)

Submission status: Runtime Error

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

train=A*N
taxi=B
if (train<=taxi):
  print(train)
else:
  print(taxi)

Submission status: Runtime Error

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

int train=A*N
int taxi=B
if (train<=taxi):
  print(train)
else:
  print(taxi)

Submission status: Runtime Error

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

int train=A*N
int taxi=B
if (train<=taxi):
  print(train)
else:
  print(taxi)

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N= int(input('N='))
A= int(input('A='))
B= int(input('B='))
C= N*A
if C>B:
  print (B)
else: 
  print (C)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
n, a, b= int(input()), int(input()), int(input())
ans= min(n*a, b)
print(ans)

Submission status: Runtime Error

Solution code:
human_num, train_value, taxi_num = tuple(int(i) for i in input().split(""))
print(min(train_value * human_num, taxi_num))

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
sys.setrecursionlimit(10**6)

def perm(n, k):
    return fact[n] * ifact[n-k] % mod

def dfs(v, p):
    global ans
    for nv in link[v]:
        if nv == p:
            continue
        dfs(nv, v)
    # p = -1の時は根である。根も含めて塗り分け方を考えるので、
    # n = K、c = 子の数+根の数で塗り分け方を求める
    # 見るのが子の時はその上の頂点とその親が塗られているので、
    # n = K-2、c = 子の数となる
    if p == -1:
        n = K
    else:
        n = K - 2
    if p == -1:
        k = len(link[v]) + 1
    else:
        k = len(link[v]) - 1

    ans *= perm(n, k)
    ans %= mod

N, K = map(int, input().split())
link = [[] for _ in range(N)]
for i in range(N-1):
    a, b = map(int, input().split())
    link[a-1].append(b-1)
    link[b-1].append(a-1)

mod = 10 ** 9 + 7
ans = 1

fact = [0] * (10**5+1)
fact[0] = 1
fact[1] = 1
for i in range(2, 10**5+1):
    fact[i] = fact[i-1] * i
    fact[i] %= mod
ifact = [0] * (10**5+1)
for i in range(10**5+1):
    ifact[i] = pow(fact[i], mod-2, mod)
    ifact[i] %= mod

dfs(0, -1)

print(ans % mod)

Submission status: Runtime Error

Solution code:
N,D =map(int, input().split())
all_list = [list(map(int, input().split())) for i in range(N)]
count = 0
for n in range (N):
    for nn in range(n):
      distance == sum([all_list[n][d]-all_list[nn][d] for d in range(D)])
    for s in range(250):
      if distance == s**2:
        count += 1
print(count)

Submission status: Runtime Error

Solution code:
N,D =map(int, input().split())
all_list = [list(map(int, input().split())) for i in range(N)]
#>>>4
count = 0
for n in range (N):
    for nn in range(N):
        distance = 0
        for d in range(D):
            kou = (all_list[n][d] - all_list[nn][d])**2
            distance += kou
        for s in range(250):
            if distance == s**2:
                count += 1
                break
print(round((count - N) / 2))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
info = input().split(" ")
N = int(info[0])
A = int(info[1])
B = int(info[2])

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

Submission status: Runtime Error

Solution code:
info = input().split(" ")
N = int(info[0])
A = int(info[1])
B = int(info[2])

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

Submission status: Runtime Error

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

ans = N * A

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

Submission status: Runtime Error

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

ans = int(N) * int(A)

if (ans > int(B)):
	print(B)
else:
	print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N = input()
A = input()
B = input()
if ( N*A <= B ){
	print(N*A)
}
else print(B)

Submission status: Runtime Error

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

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

if L-R > 672:
    print(0)
else:
    minMod = 100000000
    for i in range(L,R):
        for j in range(i+1,R+1):
            tmp = (i*j)%2019
            if minMod > tmp:
                minMod = tmp
            elif tmp == 0:
                minMod = 0 
                break
    print(minMod)