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: Accepted

Solution code:
import sys
input = sys.stdin.readline

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

print(min(b, n*a))

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**6)
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

n,a,b = na()

print(min(n*a,b))

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()

mi = lambda: map(int, input().split())

N, A, B = mi()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

print ( min (A*N , B )  )

Submission status: Accepted

Solution code:
n, a, b = map(int, input().split())  # 複数数値入力
print(min(n*a, b))

Submission status: Accepted

Solution code:
N, A, B = [int(i) for i in input().split()]
print(min(B, N * A))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

print(
	min(N * A, B)
)

Submission status: Accepted

Solution code:
import sys
def input():
    return sys.stdin.readline()[:-1]

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

Submission status: Accepted

Solution code:
from bisect import bisect_left, bisect_right; from collections import Counter, defaultdict, deque, OrderedDict; from copy import deepcopy; from fractions import gcd; from functools import lru_cache, reduce; from math import ceil, floor; from sys import stdin, setrecursionlimit
import heapq as hq; import itertools as its; import operator as op


# globals
inf = float('inf')
input = stdin.readline


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


def get_int():
    return int(input())


def get_float():
    return float(input())


def get_str():
    return input().strip()


def get_li():
    return [int(i) for i in input().split()]


def get_lf():
    return [float(f) for f in input().split()]


def get_lc():
    return list(input().strip())


def gets(n, types, sep=None):
    if len(types) == 1:
        return [types[0](input().strip()) for _ in range(n)]
    return list(zip(*(
        [t(x) for t, x in zip(types, input().strip().split(sep=sep))]
        for _ in range(n)
    )))


if __name__ == '__main__':
    setrecursionlimit(4100000)
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#
# 　　  ⋀_⋀　 
#　　  (･ω･)  
# .／ Ｕ ∽ Ｕ＼
#  │＊　合　＊│
#  │＊　格　＊│ 
#  │＊　祈　＊│ 
#  │＊　願　＊│ 
#  │＊　　　＊│ 
#      ￣
#
import sys
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log #log2ないｙｐ
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
inf=float('inf')
mod = 10**9+7
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    N,A,B = MI()
    print(min(N*A, B))
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
# @author 

import sys

class ATOrT:
    def solve(self):
        n, a, b = [int(_) for _ in input().split()]
        print(min(b, n * a))

solver = ATOrT()
input = sys.stdin.readline

solver.solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
def prob_a():
    n, a, b = [int(a) for a in input().split()]
    print(str(int(min(n * a, b) + 0.1)))


prob_a()

Submission status: Accepted

Solution code:
n, a, b = (int(_) for _ in input().split())

train=a*n
taxi=b

print(min(train,taxi))

Submission status: Accepted

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

Submission status: Accepted

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

print(min(a*n, b))

Submission status: Accepted

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

Submission status: Accepted

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

ans1 = A * N
ans2 = B
print(min(ans1,ans2))

Submission status: Accepted

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

Submission status: Accepted

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

print(min(A * N, B))

Submission status: Accepted

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

ans = min(A*N,B)
print(ans)

Submission status: Accepted

Solution code:
#!/usr/bin/python3
# -*- coding: utf-8 -*-



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

Submission status: Accepted

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, accumulate
from operator import itemgetter, mul
from copy import deepcopy
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

N, A, B = MAP()

print(min(N*A, B))

Submission status: Accepted

Solution code:
N,A,B = (int(x) for x in input().split())

print(min(N*A, B))

Submission status: Accepted

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

Submission status: Accepted

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

ans = min(N * A, B)

print(ans)

Submission status: Accepted

Solution code:
import sys
s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in ss]
ss2nnn = lambda ss: [s2nn(s) for s in ss]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [sys.stdin.readline().rstrip() for _ in range(n)]
ii2sss = lambda n: [list(sys.stdin.readline().rstrip()) for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    N, A, B = i2nn()
    n = min(A * N, B)
    print(n)

main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#

import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import bisect
import heapq
import itertools
import math
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7




N, A, B = list(map(int, sys.stdin.readline().split()))
print(min(A*N, B))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(100000000)
input=lambda : sys.stdin.readline().rstrip()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import fractions
import copy
import numpy as np
def j(q):
    if q==1: print("Yes")
    elif q == 0:print("No")
    exit(0)
rem = pow(10,9)+7
"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
def printrow(a):
    for i in a:
        print(i)
def combinations(n,r):
    if n<r:return 0
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))
def permutations(n,r):
    if n<r:return 0
    return math.factorial(n) // math.factorial(n - r)
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
x,y,a, = ips()
print(min(x*y,a))

Submission status: Accepted

Solution code:
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

N, A, B = nl()

print(min(A * N, B))

Submission status: Accepted

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

print(min(b, a*n))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(min(n*a, b))

Submission status: Accepted

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

Submission status: Accepted

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

print(min(b,n*a))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import array
from bisect import *
from collections import *
import fractions
import heapq
from itertools import *
import math
import random
import re
import string
import sys

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
Max = sys.maxsize
def l(): #intのlist
	return list(map(int,input().split()))
def m(): #複数文字
	return map(int,input().split())
def onem(): #Nとかの取得
	return int(input())
def s(x): #圧縮
	a = []
	aa = x[0]
	su = 1
	for i in range(len(x)-1):
		if aa == x[i+1]:
			a.append([aa,su])
			aa = x[i+1]
			su = 1
		else:
			su += 1
	a.append([aa,su])
	return a
def jo(x): #listをスペースごとに分ける
	return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
	return max(map(max,x))

n,a,b = m()

print(min(n*a,b))

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin

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

n, a, b = na()

print(min(a*n, b))

Submission status: Accepted

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

print(min(N*A,B))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
INF = float("inf")


def solve(N: int, A: int, B: int):
    print(min(B, N*A))
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(N, A, B)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    return [I() for i in range(n)]
def LIR(n):
    return [LI() for i in range(n)]
def SR(n):
    return [S() for i in range(n)]
def LSR(n):
    return [LS() for i in range(n)]

sys.setrecursionlimit(1000000)
mod = 1000000007

#A
def A():
    n,a,b = LI()
    print(min(a*n,b))
    return

#B
def B():
    n = I()

    return

#C
def C():
    n = I()

    return

#D
def D():
    n = I()

    return

#E
def E():
    n = I()

    return

#F
def F():
    n = I()

    return


#Solve
if __name__ == "__main__":
    A()

Submission status: Accepted

Solution code:

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

print(min(a*b,c))

Submission status: Accepted

Solution code:
from collections import defaultdict,deque
import numpy as np
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(input())
def inpl(): return list(map(int, input().split()))
def inpl_str(): return list(input().split())

N,A,B = inpl()
print(min(A*N,B))

Submission status: Runtime Error

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

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

Submission status: Runtime Error

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

total_price = A + (N * B)

print(total_price - max(total_price))

Submission status: Runtime Error

Solution code:
N,A,B = (int(x) for x in input(),split())
print(min(N*A,B))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
l, r = map(int, input().split())
x = 2018

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

Submission status: Runtime Error

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

print(min(A*N, B))

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
using namespace std;

/*2進数配列+1*/
vector<int> twoadd(vector<int> v, int N){
    v[N-1]+=1;
    int ind = N-1;
    int j=N-1;
    for(j=N-1;j>=1;j--){
        if(v[j]>1){
            v[j-1]+=1;
            v[j]=0;
        }
    }
    return v;
}

/*フィボナッチ*/
long long fibonatti(long long d){
    long long count = 0;
    long long f1 = 1;
    long long f2 = 1;/*ここを変える*/
    long long temp;
    if(d == 1){
        count = f1;
    }else if(d == 2){
        count = f2;
    }else if(d==0){
        count = 1;
    }else{
        for(int i=0;i<d-2;i++){
            temp = f1+f2;
            f1 = f2;
            f2 = temp;
        }
        count = temp;
    }
    return count;
}

/*最大公約数*/
unsigned long long GCD(long long L,long long R){
    if(L>R){
        long long temp=R;
        R = L;
        L = temp;
    }
    unsigned long long pp=0,ppt=0;
    unsigned long long ans=0;
    if(R%L==0){
        ans = L;
    }else{
        while(true){
            ppt = pp;
            pp=R%L;
            if(pp == 0){
                ans = ppt;
                break;
            }
            R = L;
            L = pp;
        }
    }    
    return ans;    
}

/*最小公倍数*/
unsigned long long LCM(long long L,long long R){
    unsigned long long ans;
    unsigned long long gcd = GCD(L,R);
    ans = (L/gcd)*R;
    return ans;
}

/*Combination set*/
#define mod 1000000007
#define maxcomb 3000/*大きいものを求めるときはここを変える*/
vector<long long> fc(maxcomb+1);
vector<long long> ifc(maxcomb+1);
long long modpow(long long x,long long n){
    long long ans = 1;
    while(n > 0){
        if(n & 1) {
            ans = ans*x%mod;
        }
        x = x*x%mod;
        n >>= 1;
    }
    return ans;
}
void Conb(){
    fc[0]= 1;
    ifc[0]=1;
    for(long long i=0;i<maxcomb;i++){
        fc[i+1] = fc[i]*(i+1)%mod;//n!(mod)
        ifc[i+1] = ifc[i]*modpow(i+1,mod-2)%mod;//k!^{M-2} (mod)
    }
}
unsigned long long Combination(long long L,long long R){
    unsigned long long up=1,ans;
    Conb();
    if(L==0&&R==0){
        return 1;
    }else if(L<R||L<0){
        return 0;
    }else{
        long long t = ifc[L-R]*ifc[R]%mod;
        ans = t*fc[L]%mod;
    }
    return ans;
}
/*Combination set ここまで*/

/*ここから*/
int main() {
    int N,A,B;
    cin >> N >> A >> B;
    if(N*A>B){
        cout << B << endl;
    }else{
        cout << N*A << endl;
    }
}

Submission status: Runtime Error

Solution code:
import math

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
a = list(map(int,input().split()))
if a[0]*a[1]<=a[2]:
  prnit(a[0]*a[1])
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:
def Input():
    return mapt(int, input().split(" "))


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


main()

Submission status: Runtime Error

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

if R-L >= 2019:
    print(0)
    sys.exit()
elif R-L == 1:
    print((i*j)%2019)
    sys.exit()

ans = 4000

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

print(ans)

Submission status: Runtime Error

Solution code:
L,R=map(int,input().split())
A=[]
if R-L>=2019:
    print(0)
else:
    for i in range(L,R+1):
        A.append(i%2019)
    A=sorted(A)
    print(A[0]*A[1]%2019)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
use proconio::{input, fastout};

#[fastout]
fn main() {
    input!{
        n: i32,
        a: i32,
        b: i32,
    }
    let t = std::cmp::min(n * a, b);
    println!("{}", t);
}

Submission status: Runtime Error

Solution code:
u,d=map(int.input.split())

points = []

for _ in range(a)
	poins.append(list(map(map(int,intput().split()))))
  
  
  def distance(a, b):
    dist = 0
    	for a.b in zip(a,b):
        dist += (a - b) ** 2 == dist
        
        if dist == 0:
          	return tarse
        
        return dist ** 0.5

    for pa in poins:
      for pb in points
      print(distance(pa,pb))
      caunt += 1
      
      print(count// 2)

Submission status: Runtime Error

Solution code:
u,d=map(int.input.split())

points = []

for _ in range(a)
	poins.append(list(map(map(int,intput().split()))))
  
  
  def distance(a,b):
    dist = 0
    	for a.b in zip(a,b):
        dist += (a - b) ** 2
        
        return dist ** 0.5

    for pa in poins:
      for pb in points
      print(distance(pa,pb))

Submission status: Runtime Error

Solution code:
N0 = input()
N = int(N0)

A0 = input()
A = int(A0)

B0 = input()
B = int(B0)

C = N*A

if C >= B:
  print(C)
else:
  print(B)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
inport numpy as np

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

print(min(costs))

Submission status: Runtime Error

Solution code:
inport numpy as np

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

return np.min(costs)

Submission status: Runtime Error

Solution code:
inport numpy as np

N,A,B = map(int,input().split(" "))
i = np.arange(N+1)  # the number of people who use train
j = N-i  # the number pf people who use taxi
cost = A+i + B*j

return np.min(cost)

Submission status: Runtime Error

Solution code:
#include <iostream>
#include<string>
using namespace std;

int main()
{
    int n, a, b;
    cin >> n >> a >> b;
    if(n*a < b) {
        cout << n*a;
    } else {
        cout << b;
    }
}

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
l,r = map(int,input().split())
c=2019
for i in range(l,r+1):
  if i%2019==0:
    print(0)
    break
else:
  for j in range(l,r+1):
    for k in range(j+1,r+1):
      if c>(j*k%2019):
        c=(j*k%2019)
  print(c)

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
	n, a, b = LI()
    print(min(n*a, b))

Submission status: Runtime Error

Solution code:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools
from collections import deque

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
	n, a, b = LI()
    print(n*a, b)

Submission status: Runtime Error

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

print(min(n*a, b))

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

ans = 2019

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

print(ans)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
l,r = map(int,input().split())
ans = 2019

if l == 0:print(0);quit()

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

print(ans)

Submission status: Runtime Error

Solution code:
l=list(map(int, input().split())
n=l[0]
a, b = l[1], l[2]

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
mod = 10**9+7
sys.setrecursionlimit(4100000)
n,k = map(int,readline().split())
if n == 1:
  print(k%mod)
  exit()

g = [[] * n for i in range(n)]
for i in range(n-1):
    u, v = map(int,readline().split())
    u -= 1
    v -= 1
    g[u].append(v)
    g[v].append(u)

ans = 1
used = [False]*n
def dfs(now,prev,p):
    global ans
    if k <= p:
      ans = 0
    ans *= k-p
    ans %= mod
    used[now] == True
    if all(used):
      return ans
    cnt = 1
    new = []
    for next in g[now]:
      if next == prev:
        cnt += 1
      else:
        new.append(next)
    for i,next in enumerate(new):
      dfs(next,now,cnt+i)
      
dfs(0,-1,0)
print(ans)

Submission status: Runtime Error

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

z = 2019
if R-L>=L:
    print(0)
else:
    for l in range(L,R):
        for r in range(l+1, R+1):
            z = min(z, ((l % 2019) * (r % 2019)) % 2019)
    print(z)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys
def input(): return sys.stdin.readline().rstrip()
def main():
    n=int(input())
    A=list(map(int,input().split()))
    B=[0]*n
    B[0]=sum(A)-sum(A[1::2])*2
    for i in range(1,n):
        B[i]=(A[i-1]-B[i-1]//2)*2
    print(*B)
    
if __name__=='__main__':
    main()

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())
print(min(a*n, 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:
n ,a , b = map(int,input(),split())
t = n*a
if t>b:
    print(b)
else:
    print(t)

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
N, A, B = map(int, input())
T = N*A
print(max(T,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:
n,a,b=map(int, input().split())
print(max([a*n,b])

Submission status: Runtime Error

Solution code:
import math
import sys

def p(n, r):
	if n < r:
		return 1
	return math.factorial(n) // math.factorial(n - r)

def main():
	input = sys.stdin.readline
	N,K = map(int,input().split())
	E = [[] for _ in range(N)]
	MOD = 10**9+7
	#辺の定義
	for _ in range(N-1):
	  u,v = map(int,input().split())
	  u -= 1
	  v -= 1
	  E[u].append(v)
	  E[v].append(u)

	if N == 1:
		print(K)
		sys.exit()
	#colorが塗られたかどうか
	color = [-1 for _ in range(N)]
	dp = [-1 for _ in range(N)]
	#dfsで色を塗っていく
	stack = []
	color[u] = 1
	ans = K
	for i,v in enumerate(E[u]):
		stack.append(v)
		ans *= (K-i-1)
		ans %= MOD

	while stack:
		u = stack.pop()
		color[u] = 1
		length = 0
		for v in E[u]:
			if color[v] == -1:
				stack.append(v)
				length += 1
		if dp[length] == -1:
			tmp = 1
			for i in range(K-1-length,K-1):
				tmp *= i
				tmp %= MOD
			#tmp = p(K-2,length) % MOD
			ans *= tmp
			dp[length] = tmp
		else:
			ans *= dp[length]
		ans %= MOD

	#各頂点の色を出力
	print(ans%MOD)

if __name__ == '__main__':
	main()

Submission status: Runtime Error

Solution code:
#include <bits/stdc++.h>

#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n - 1; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i <= n; i++)
#define FORR(i, m, n) for(int i = m; i >= n; i--)
#define SORT(v, n) sort(v, v+n);
#define VSORT(v) sort(v.begin(), v.end());
#define VSORTR(v) sort(v.rbegin(), v.rend());
#define ALL(v) (v).begin(),(v).end()

using namespace std;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
using P = pair<ll, ll>;

const ll mod = 1e9+7;

int main(){
	
    cin.tie(0);
    cout.tie(0);
    ios::sync_with_stdio(false);

    ll n,a,b; cin>>n>>a>>b;
    cout << min(n*a,b);
    return 0;
}

Submission status: Runtime Error

Solution code:
N,A,B= list(map(int, 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())
print(min(n*a,b)

Submission status: Runtime Error

Solution code:
n,a,b = map(int,input().split())
if b > n*a:
  print(a*c)
elif b < a*a:
  print(b)
else:
  print(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
n, a, b = map(int, input().split())
print(min(n*a,b))A

Submission status: Runtime Error

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

Submission status: Runtime Error

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

Submission status: Runtime Error

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

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

Submission status: Runtime Error

Solution code:
n, d = map(int, input().split())
count = 0
x_list = (list(map(int, input().split())) for _ in range(n))

for i in range(n-1):
    for j in range(i+1, n):
        count += (sum((a-b)**2 for a,b in zip(x_list[i], x_list[j]))**0.5).is_integer
print(count)