problem_id
stringlengths
6
6
user_id
stringlengths
10
10
time_limit
float64
1k
8k
memory_limit
float64
262k
1.05M
problem_description
stringlengths
48
1.55k
codes
stringlengths
35
98.9k
status
stringlengths
28
1.7k
submission_ids
stringlengths
28
1.41k
memories
stringlengths
13
808
cpu_times
stringlengths
11
610
code_sizes
stringlengths
7
505
p02973
u994988729
2,000
1,048,576
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 col...
['N=int(input())\n\nlasts=[int(input())]\nfor _ in range(N-1):\n a=int(input())\n \n if a<=lasts[0]:\n lasts.insert(0, a)\n else:\n for i,val in enumerate(lasts[::-1]):\n if val<a:\n lasts[len(lasts)-1-i]=a\n break\n\nprint(len(lasts)', 'from collection...
['Runtime Error', 'Accepted']
['s123374272', 's984278317']
[3060.0, 8196.0]
[17.0, 160.0]
[285, 354]
p02973
u995861601
2,000
1,048,576
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 col...
['import bisect\nN = int(input())\nA = [0 for i in range(N)]\nfor i in range(N):\n A[i] = int(input())\nnow = [-A[0]]\n \nfor i in range(1, N):\n \n index = bisect.insort_right(now, -A[i])\n if index == len(now):\n now.append(-A[i])\n else:\n now[index] = -A[i]\n \nprint(len(now))', 'import bi...
['Runtime Error', 'Accepted']
['s544297155', 's306478145']
[7080.0, 11032.0]
[186.0, 262.0]
[290, 288]
p02973
u997641430
2,000
1,048,576
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 col...
['n = int(input())\nA = [int(input()) for i in range(n)]\nm = 10**9\nc = 0\nfor a in A:\n if a <= m:\n c += 1\nprint(c)\n', 'import bisect\nn = int(input())\nA = [int(input()) for i in range(n)]\nm = 10**9\nX = []\nfor a in A:\n i = bisect.bisect_right(X, -a)\n if i == len(X):\n X.append(-a)\n ...
['Wrong Answer', 'Accepted']
['s054260429', 's862336240']
[7072.0, 11036.0]
[181.0, 238.0]
[121, 215]
p02974
u052499405
2,000
1,048,576
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.
['MOD = 10**9 + 7\nn, oddness = [int(item) for item in input().split()]\n# Oddness must be even\nif oddness % 2 == 1:\n print(0)\n exit()\noddness //= 2\nmax_oddness = 1300 + n\nmax_pending = n//2 + 2\n\ndp = [[[0] * (max_oddness) for _ in range(max_pending)] for _ in range(n)]\ndp[0][0][0] = 1\ndp[0][1][1] = 1\...
['Wrong Answer', 'Accepted']
['s372459129', 's222372225']
[27232.0, 29928.0]
[1681.0, 1934.0]
[977, 918]
p02981
u000085263
2,000
1,048,576
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?
['list=list(map(int,input().split()))\nprint(min(list[1]*N, list[2]*N))', 'N,A,B=map(int,input().split())\nA=N*A\nif A>=B:\n print(B)\nelse:\n print(A)']
['Runtime Error', 'Accepted']
['s058362381', 's203798375']
[8768.0, 9092.0]
[22.0, 26.0]
[68, 77]
p02981
u003652013
2,000
1,048,576
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?
['L,R = map(int,input().split())\n\nans = 0\nmin_mod = 2019\n\nif R-L+1<2019 :\n if R % 2019 > 0:\n if R-L == 0:\n min_mod = (L*R) % 2019\n else :\n for i in range(L,R) :\n print(i)\n for j in range(i+1,R):\n if min_mod > (i*j) % 2019:\n min_mod = (i*j) % 2019\n\n a...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s770638814', 's860517474', 's985167581', 's896231424']
[3060.0, 3060.0, 3060.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[330, 318, 236, 52]
p02981
u006883624
2,000
1,048,576
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?
['\nN, A, B = map(int, input().split())\n\nprint(max(N * A, B))', 'N, A, B = map(int, input().split())\n\nprint(min(N * A, B))\n']
['Wrong Answer', 'Accepted']
['s328526688', 's261192296']
[2940.0, 2940.0]
[17.0, 17.0]
[58, 58]
p02981
u009219947
2,000
1,048,576
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?
['L,R = map(int, input().split())\n\nif R - L >= 2019:\n print(0)\nelse:\n m = 2020\n for i in range(L, R):\n m = min(m, i % 2019)\n print(m * (m+1))\n', 'N,A,B = map(int, input().split())\nprint(N*A if N*A <= B else B)']
['Runtime Error', 'Accepted']
['s288387006', 's628943269']
[3064.0, 3064.0]
[17.0, 18.0]
[159, 63]
p02981
u010520511
2,000
1,048,576
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?
['a, b, c = map(int, input().split())\nif a*b >= c:\n print(a*b)\nelse:\n print(c)', 'a, b, c = map(int, input().split())\nif a*b > c:\n print(a*b)\nelse:\n print(c)', 'a, b, c = map(int, input().split())\nif a*b >= c:\n print(c)\nelif a*b == c:\n print(c)\nelse:\n print(a*b)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s335250089', 's797546964', 's135606099']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[78, 77, 104]
p02981
u014724123
2,000
1,048,576
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?
['import numpy\n\nn, d = map(int, input().split())\n\nl = []\nfor v in range(n):\n l.append(list(map(int, input().split())))\n\nans = 0\n\nfor i in range(n - 1):\n for j in range(i + 1, n):\n if i == j:\n continue\n a = numpy.array(l[i])\n b = numpy.array(l[j])\n c = numpy.l...
['Runtime Error', 'Accepted']
['s349010046', 's186535516']
[21040.0, 2940.0]
[291.0, 17.0]
[382, 107]
p02981
u017064954
2,000
1,048,576
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?
['n, a, b = int(input().split())\nif a*n > b:\n print(a*n)\nelse:\n print(b)\n', 'n, a, b = int(input())\nif a*n > b:\n print(a*n)\nelse:\n print(b)', 'n, a, b = map(int, input().split())\nif a*n > b:\n print(a*n)\nelse:\n print(b)\n', 'n, a, b = map(int, input().split())\nif a*n < b:\n print(a*n)\nelse:\n prin...
['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s204760606', 's487087302', 's926174808', 's721733610']
[2940.0, 2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0, 17.0]
[73, 64, 78, 78]
p02981
u018776180
2,000
1,048,576
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?
['n, a, b = [int(s) for in input().split(" ")]\n\nprint("%d" % min(n * a, b))', 'n, a, b = [int(s) for s in input().split(" ")]\n\nprint("%d" % min(n * a, b))']
['Runtime Error', 'Accepted']
['s168244984', 's038577908']
[2940.0, 2940.0]
[17.0, 17.0]
[73, 75]
p02981
u027403702
2,000
1,048,576
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?
['N,A,B = map(int,input().split())\nprint(min(S*N,B))', 'N,A,B = map(int,input().split())\nprint(min(A*N,B))']
['Runtime Error', 'Accepted']
['s711131590', 's314736301']
[2940.0, 2940.0]
[17.0, 17.0]
[50, 50]
p02981
u027675217
2,000
1,048,576
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?
['n,a,b = map(int, input().split())\nans=b\ntr = n*a\nif tr < b\n\tans=tr\nprint(ans)', 'n,a,b = map(int, input().split())\nans=b\ntr = n*a\nif tr < b:\n\tans=tr\nprint(ans)']
['Runtime Error', 'Accepted']
['s239814559', 's519676886']
[2940.0, 2940.0]
[17.0, 17.0]
[77, 78]
p02981
u028413707
2,000
1,048,576
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?
['\n\nn, a, b = map(int, input().input())\n\nprint(min(b,a*n))', '\n\nn, a, b = map(int, input().split())\n\nprint(min(b,a*n))']
['Runtime Error', 'Accepted']
['s238577979', 's627840726']
[2940.0, 2940.0]
[17.0, 17.0]
[56, 56]
p02981
u033524082
2,000
1,048,576
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?
['n,a,b=map(int,input().split())\nprint(b if a*n>b else a*b)', 'n,a,b=map(int,input().split())\nprint(b if a*n>b else a*n)']
['Wrong Answer', 'Accepted']
['s752334555', 's285756904']
[2940.0, 3064.0]
[17.0, 18.0]
[57, 57]
p02981
u034777138
2,000
1,048,576
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?
['N,A,B = map(int,input().split())\n\nAans = A*B\n\nif Aans > B:\n print(B)\nelse:\n print(Aans)', 'N,A,B = map(int,input().split())\n\nAans = A*N\n\nif Aans > B:\n print(B)\nelse:\n print(Aans)']
['Wrong Answer', 'Accepted']
['s925526369', 's456993761']
[2940.0, 2940.0]
[17.0, 17.0]
[93, 93]
p02981
u036340997
2,000
1,048,576
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?
["n = int(input())\n_a = input().split()\n\na = []\n\nx = []\n\nfor i in range(n):\n a.append(2*int(_a[i]))\n x.append(0)\n \nfor i in range(1, n):\n a[i] -= a[i-1]\n\nx[n-1] = a[n-1] // 2\n\nfor i in range(n-2, -1, -1):\n if i%2==0:\n x[i] = a[i] - x[n-1]\n else:\n x[i] = a[i] + x[n-1]\n \nans = str(x[n...
['Runtime Error', 'Accepted']
['s838479730', 's608592186']
[3064.0, 2940.0]
[18.0, 17.0]
[373, 90]
p02981
u039189422
2,000
1,048,576
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?
['n,a,b=map(int,input().split())\nprint(max([a*n,b]))', 'n,a,b=map(int,input().split())\nprint(min(n*a,b))']
['Wrong Answer', 'Accepted']
['s875302776', 's557672969']
[2940.0, 2940.0]
[17.0, 17.0]
[50, 48]
p02981
u055941944
2,000
1,048,576
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?
['import sys\nL, R = map(int,input().split())\na=[]\n\nfor i in range(L, R):\n\tfor j in range(i+1,R+1):\n\t\ta.append((i*j)%2019)\n\t\tif 0 in a:\n\t\t\tprint(0)\n\t\t\tsys.exit()\nprint(min(a))', 'n,a,b=map(int,input().split())\n\nif n*a<b:\n print(n*a)\nelse:\n print(b)']
['Runtime Error', 'Accepted']
['s670600871', 's453172923']
[2940.0, 2940.0]
[17.0, 17.0]
[172, 79]
p02981
u056659569
2,000
1,048,576
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?
['n, a, b = map(int, input().split())\nprint(max(b,a*n))', 'n, a, b = map(int, input().split())\nprint(min(b,a*n))']
['Wrong Answer', 'Accepted']
['s323098535', 's005554061']
[2940.0, 2940.0]
[17.0, 17.0]
[53, 53]
p02981
u057993957
2,000
1,048,576
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?
['import numpy as np \n\nL, R = list(map(int, input().split()))\ndata = np.array([x for x in range(L, R+1)]) % 2019\n\nif np.where(data == 0):\n print(0)\n\nelse: \n data = np.sort(data)\n min_mod = (data[0] * data[1]) % 2019\n print(min_mod)', 'N, A, B = list(map(int, input().split()))\n\ntac = N * A\ntrai...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s474711127', 's799894521', 's619630366']
[14296.0, 2940.0, 2940.0]
[150.0, 17.0, 17.0]
[241, 120, 120]
p02981
u060770263
2,000
1,048,576
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?
['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()]))']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s453242926', 's569776194', 's186323541']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[69, 68, 69]
p02981
u062314674
2,000
1,048,576
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?
['N, A, B = map(int, input().split())\n\nif B >= N*A:\n print(B)\nelse:\n print(N*A)', 'N, A, B = map(int, input().split())\n\nif N * A >= B:\n print(N*A)\nelse:\n print(B)', 'N, A, B = map(int, input().split())\n\nif B >= N*A:\n print(N*A)\nelse:\n print(B)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s559837517', 's944242913', 's254734655']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 18.0]
[79, 81, 79]
p02981
u062604519
2,000
1,048,576
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?
['n,a,b=map(int,input().split())\ns=[a,b/n]\nprint(min(s))', 'n,a,b=map(int,input().split())\ns=[a*n,b]\nprint(min(s))']
['Wrong Answer', 'Accepted']
['s009446655', 's929404705']
[2940.0, 2940.0]
[17.0, 17.0]
[54, 54]
p02981
u063346608
2,000
1,048,576
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?
['N,A,B = map(int,input().split())\n\nanswer = 0\nif A * N >= B:\n\tanswer = B\nelse:\n\tanswer = A\nprint(answer)', 'N,A,B = map(int,input().split())\n\nanswer = 0\nif A * N >= B:\n\tanswer = B\nelse:\n\tanswer = A * N\nprint(answer)']
['Wrong Answer', 'Accepted']
['s591309656', 's314773562']
[2940.0, 2940.0]
[17.0, 17.0]
[103, 107]
p02981
u063703408
2,000
1,048,576
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?
['n,a,b = map(int,input().split())\nif n*a <= b:\n print(b)\nelse:\n print(n*a)', 'n,a,b = map(int,input().split())\nif n*a >= b:\n print(b)\nelse:\n print(n*a)']
['Wrong Answer', 'Accepted']
['s704451264', 's595288498']
[2940.0, 2940.0]
[17.0, 17.0]
[79, 79]
p02981
u072606168
2,000
1,048,576
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?
['n,a,b = map(int, input().split())\nprint(max(n*a,b))', 'n,a,b = map(int, input().split())\nprint(min(n*a,b))']
['Wrong Answer', 'Accepted']
['s525916125', 's542542749']
[2940.0, 2940.0]
[17.0, 17.0]
[51, 51]
p02981
u075303794
2,000
1,048,576
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?
['n,a,b = map(input().split())\nans = 0\nif n * a > b:\n ans += b\nelse:\n ans += n * a\nprint(ans)', 'n,a,b = map(int,input().split())\nans = 0\nif n * a > b:\n ans = b\nelse:\n ans = n * a\nprint(ans)']
['Runtime Error', 'Accepted']
['s445517616', 's129816611']
[2940.0, 2940.0]
[17.0, 17.0]
[93, 95]
p02981
u075628913
2,000
1,048,576
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?
['N, A, B = map(int, input().split())\nif N*A > B:\n print(B)\nelse:\n print(N*A', 'N, A, B = map(int, input().split())\nif N*A > B:\n print(B)\nelse:\n print(N*A)']
['Runtime Error', 'Accepted']
['s664823393', 's282568924']
[2940.0, 2940.0]
[17.0, 17.0]
[76, 77]
p02981
u077291787
2,000
1,048,576
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?
['x = 1\nfor i in range(10 ** 8):\n x *= i\nprint(x)', '# ABC133A - T or T\ndef main():\n N, A, B = map(int, input().split())\n ans = min(N * A, B)\n print(ans)\n\n\nif __name__ == "__main__":\n main()']
['Time Limit Exceeded', 'Accepted']
['s988515127', 's521007716']
[2940.0, 2940.0]
[2104.0, 17.0]
[50, 149]
p02981
u077337864
2,000
1,048,576
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?
["def main():\n n, a, b = map(int, input().split())\n print(a*n, b)\n\n\nif __name__ == '__main__':\n main()\n", "def main():\n n, a, b = map(int, input().split())\n print(min(a*n, b))\n\n\nif __name__ == '__main__':\n main()\n"]
['Wrong Answer', 'Accepted']
['s822357508', 's404904056']
[3064.0, 2940.0]
[17.0, 17.0]
[105, 110]
p02981
u077498363
2,000
1,048,576
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?
["n, train, taxi = map(int, input().split(' '))\nif n * train >= taxi:\n print(int(n*train))\nelse:\n print(int(taxi))", "n, train, taxi = map(int, input().split(' '))\nif n * train <= taxi:\n print(int(n*train))\nelse:\n print(int(taxi))"]
['Wrong Answer', 'Accepted']
['s182579731', 's752089927']
[2940.0, 2940.0]
[17.0, 24.0]
[114, 114]
p02981
u080880358
2,000
1,048,576
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?
['n,a,b=map(int,input().split())\nprint(max(n*a,b))', 'n,a,b=map(int,input().split())\nprint(min(n*a,b))']
['Wrong Answer', 'Accepted']
['s458007005', 's718732504']
[2940.0, 2940.0]
[17.0, 17.0]
[48, 48]
p02981
u084871864
2,000
1,048,576
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?
['a,b,c=int(input().split())\nprint(min(a*n,b))', 'n,a,b=int(input().split())\nprint(min(a*n,b))', 'n,a,b=map(int,input().split())\nprint(min(b,a*n))\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s467972473', 's918036414', 's764337119']
[3064.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[44, 44, 49]
p02981
u088020258
2,000
1,048,576
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?
['N,A,B = map(int,input().split())\ntrain_tax = N * A\ntotal_tax = train_tax + B\nprint(total_tax)', 'N, A, B = map(int, input().split())\n\nif n * a < b:\n\tprint(n*a)\nelse:\n\tprint(b)\n', 'N, A, B = map(int, input().split())\n\nif N * A < B:\n\tprint(N*A)\nelse:\n\tprint(B)\n']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s217993074', 's421184247', 's621965312']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[93, 79, 79]
p02981
u089075077
2,000
1,048,576
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?
['N,A,B = map(int, input().split())\nif N*A >= B:\n print(B)\nelse:\n print(A)', 'N,A,B = map(int, input().split())\nif N*A <= B:\n print(A)\nelse:\n print(B)\n', 'N,A,B = map(int, input().split())\nif N*A >= B:\n print(B)\nelse:\n print(N*A)\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s118993753', 's323912065', 's948000369']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[74, 75, 77]
p02981
u093562214
2,000
1,048,576
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?
['x, y, z = input().split()\nN = int(x)\nA = int(y)\nB = int(z)\n\nanswer = A + (N * B)\nprint(answer)\n', 'x, y, z = input().split()\nN = int(x)\nA = int(y)\nB = int(z)\n\nif A < (N * B):\n print(A)\nelse:\n print(N * B)\n\n', 'x, y, z = input().split()\nN = int(x)\nA = int(y)\nB = int(z)\n\nif A * N < B:\n p...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s289818484', 's316594846', 's600693346']
[2940.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0]
[95, 113, 110]
p02981
u093792099
2,000
1,048,576
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?
['n,a,b=map(int,input().split()\nprint(n*min(a,b))', 'n,a,b=map(int,input())\nprint(n*min(a,b))', 'n,a,b=map(int,input().split())\nprint(min(n*a,b))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s884210200', 's914784686', 's837336040']
[2940.0, 3064.0, 2940.0]
[17.0, 17.0, 17.0]
[47, 40, 48]
p02981
u094102716
2,000
1,048,576
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?
['a = list(map(int,input().split()))\nif a[0]*a[1]<=a[2]:\n prnit(a[0]*a[1])\nelse:\n print(a[2])\n', 'a = list(map(int,input().split()))\nif a[0]*a[1]<=a[2]:\n print(a[0]*a[1])\nelse:\n print(a[2])\n']
['Runtime Error', 'Accepted']
['s763035171', 's729082976']
[9084.0, 9184.0]
[29.0, 28.0]
[94, 94]
p02981
u095021077
2,000
1,048,576
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?
['N, A, B=map(int, input().split())\nprint(N)\nprint(A)\nprint(B)', 'N, A, B=map(int, input().split())\nprint(min(A*N, B))']
['Wrong Answer', 'Accepted']
['s079787090', 's359967853']
[2940.0, 2940.0]
[17.0, 17.0]
[60, 52]
p02981
u096616343
2,000
1,048,576
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?
['N = int(input())\nA = list(map(int, input().split()))\nrain = []\nS = sum(A)\nsub = sum(A[1:N:2])\nrain.append(S - sub * 2)\nwhile len(rain) != N:\n rain.append(A[len(rain) - 1] * 2 - rain[-1])\nfor _ in rain:\n print(_)', 'A = list(map(int,input().split()))\nif A[0] * A[1] <= A[2]:\n print(A[0] * A[1])\nels...
['Runtime Error', 'Accepted']
['s796264776', 's808726536']
[3060.0, 2940.0]
[17.0, 17.0]
[217, 103]
p02981
u100800700
2,000
1,048,576
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?
['print(min(int(input())*int(input()),int(input())))', 'N,D=map(int,input().split())\nc=0\nX=[[0]*D]*N\nfor l in range(N):\n X[l]=list(map(int,input().split()))\nfor i in range(N-1):\n l=0\n for j in range(i+1,N):\n for k in range(D):\n l+=(X[i][k]-X[j][k])**2\n if pow(l,0.5).is_intege...
['Runtime Error', 'Runtime Error', 'Accepted']
['s564786254', 's823426763', 's369447756']
[2940.0, 3064.0, 2940.0]
[17.0, 17.0, 18.0]
[50, 293, 62]
p02981
u101490607
2,000
1,048,576
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?
['a, b, c = map(int, input().split())\n\ntak = int(a) * int(b)\nrail = int(c)\n\nif tak > rail: \n\tprint( "%d" % tak )\nelse :\n \tprint( "%d" % rail )', 'a, b, c = map(int, input().split())\n\ntak = int(a) * int(b)\nrail = int(c)\n\nif tak < rail: \n\tprint( "%d" % tak )\nelse :\n \tprint( "%d" % rail )']
['Wrong Answer', 'Accepted']
['s450933045', 's055017209']
[2940.0, 3064.0]
[17.0, 17.0]
[141, 141]
p02981
u103902792
2,000
1,048,576
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?
['n,a,b = map(int,input().split())\nprint(a if a<b*n else n*b)', 'n,a,b =map(int,input().split())\nprint(b if b< n*a else n*a)']
['Wrong Answer', 'Accepted']
['s589249284', 's493651196']
[2940.0, 2940.0]
[17.0, 18.0]
[59, 59]
p02981
u104442591
2,000
1,048,576
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?
['l, r = map(int, input().split())\n\ni_rest = l % 2019\ncount_i\nfor i in range(l, r):\n i_rest_next = i % 2019\n if i_rest_next < i_rest:\n i_rest = i_rest_next\n count_i = i\n \nmin_i = i_rest\n\ni_rest = (count_i+1) % 2019\nfor i in range(count_i+1, r+1):\n i_rest_next = i % 2019\n if i_rest_next < i_r...
['Runtime Error', 'Runtime Error', 'Accepted']
['s482889927', 's980187765', 's256387147']
[3064.0, 3064.0, 2940.0]
[19.0, 17.0, 17.0]
[377, 360, 73]
p02981
u107406081
2,000
1,048,576
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?
['n,a,b=map(int,input()split())\n\nif n*a>b:\n return b\n\nelse:\n return n*a', 'li=list(map(int,input().split()))\n\nif li[0]*li[1]>li[2]:\n print(li[0]*li[1])\nelse:\n print(li[2])', 'n,a,b=map(int,input().split())\n\nif n*a>b:\n print(b)\n\nelse:\n print(n*a)\n']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s070541052', 's221887632', 's547130999']
[2940.0, 2940.0, 2940.0]
[17.0, 18.0, 17.0]
[71, 98, 73]
p02981
u111949210
2,000
1,048,576
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?
['n, r = map(int, input().split())\nif r-n >= 2019:\n print(0)\n sys.exit(0)\nmini = 2019\n#nM = n % 2019\n#rM = r % 2019\nfor i in range(n, r+1):\n for j in range(i+1, r+1):\n mini = min((i*j)%2019, mini)\nprint(mini)', 'n, a, b = map(int, input().split())\n\nif n * a < b:\n print(n * a)\nelse:\n print(b)']
['Runtime Error', 'Accepted']
['s107626330', 's948936029']
[3060.0, 2940.0]
[17.0, 17.0]
[212, 82]
p02981
u116233709
2,000
1,048,576
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?
['from math import sqrt\nn,d=map(int, input().split())\nx=[list(map(int, input().split())) for i in range(n)]\n\nans=0\ntmp = 0\n\nfor i in range(n):\n for j in range(i+1, n):\n xi,xj = x[i],x[j]\n for k in range(d):\n tmp += (xi[k]-xj[k]) ** 2\n \n if sqrt(tmp)%1==0:\n ans += 1\n\nprint(ans)\n...
['Runtime Error', 'Accepted']
['s021498529', 's909980260']
[3064.0, 2940.0]
[17.0, 17.0]
[302, 76]
p02981
u122195031
2,000
1,048,576
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?
['a,b,c = map(int,input().split)\n \nif a*b <= c:\n print(a:b)\nelse:\n print(c)', 'a,b,c = map(int,input().split)\n\nif a*b < c:\n print(a:b)\nelse:\n print(c)', 'a,b,c = map(int,input().split())\n \nif a*b < c:\n print(a:b)\nelse:\n print(c)', 'a,b,c = map(int,input().split())\nif a*b < c:\n print(a*b)\nelse:\...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s091388495', 's224106308', 's747317182', 's222268798']
[2940.0, 2940.0, 3064.0, 2940.0]
[18.0, 18.0, 17.0, 17.0]
[75, 73, 76, 74]
p02981
u124025116
2,000
1,048,576
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?
['n,a,b = map(int,input().split())\nprint(min(a,n*b))', 'n,a,b = map(int,input().split())\nprint(min(b,n*a))']
['Wrong Answer', 'Accepted']
['s211081496', 's887808974']
[2940.0, 3064.0]
[17.0, 17.0]
[50, 50]
p02981
u127462352
2,000
1,048,576
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?
['n,a,b = map(int,input().split())\n\nc = n*a\nif c >= b:\nprint(b)\nelse:\nprint(c)', 'N, A, B = map(int, input().split())\nprint(min(N * A, B))']
['Runtime Error', 'Accepted']
['s631993457', 's360555889']
[8864.0, 9052.0]
[29.0, 28.0]
[76, 56]
p02981
u128646083
2,000
1,048,576
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?
["n,d=map(int,input().split())\nx=[]\nfor i in range(n):\n a=list(map(int,input().split()))\n x.append(a)\nimport math\nc=0\nd=0\ne=0\nfor j in range (n-1):\n for k in range(j+1,n):\n for m in range(d):\n d+=float((x[j][m]-x[k][m])*(x[j][m]-x[k][m]))\n c=float(math.sqrt(d))\n if...
['Runtime Error', 'Accepted']
['s848280378', 's615401659']
[3064.0, 2940.0]
[17.0, 17.0]
[393, 62]
p02981
u133566678
2,000
1,048,576
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?
['L, R = map(int, input().split())\nm = 673\nif R // m - (L - 1) // m != 0:\n print(0)\nelse:\n minnum = 1000\n Lmod = L % m\n Rmod = R % m\n for i in range(Lmod, Rmod+1):\n for j in range(i + 1, Rmod+1):\n #print(i, j, (i * j) % 2019)\n minnum = min(minnum, (i * j) % 2019)\n...
['Runtime Error', 'Accepted']
['s586532073', 's747962218']
[3060.0, 2940.0]
[17.0, 17.0]
[324, 68]
p02981
u134302690
2,000
1,048,576
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?
['L, R = map(int, input().split())\nmod = 2019\nans = mod + 100\n\nif R - L >= 3000:\n print(0)\nelse:\n L %= mod\n R %= mod\n for i in range(L, R):\n for j in range(i + 1, R + 1):\n m = (i * j) % mod\n if m < ans:\n ans = m\nprint(ans)\n', 'N, A, B = map(int, inp...
['Runtime Error', 'Accepted']
['s900881768', 's319841259']
[3060.0, 2940.0]
[17.0, 17.0]
[277, 57]
p02981
u135197221
2,000
1,048,576
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?
['def Input():\n return mapt(int, input().split(" "))\n\n\ndef main():\n n, a, b = Input()\n ans = min(n*a, b)\n print(ans)\n\n\nmain()', 'def mapt(fn, *args):\n return list(map(fn, *args))\n\n\ndef Input():\n return mapt(int, input().split(" "))\n\n\ndef main():\n n, a, b = Input()\n ans = min(...
['Runtime Error', 'Accepted']
['s161379243', 's795313799']
[8940.0, 9016.0]
[24.0, 26.0]
[135, 190]
p02981
u137542041
2,000
1,048,576
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?
['l, r = map(int, input().split())\n\nall_mod =[]\n\ncnt1 = 0\nfor i in range(l, r, 1):\n cnt = 0\n for j in range(l + 1, r + 1, 1):\n mod = (i * j) % 2019\n all_mod.append(mod)\n\n cnt += 1\n\n if cnt > 2019:\n break\n\n cnt1 += 1\n if cnt1 > 2019:\n break\n\np...
['Runtime Error', 'Runtime Error', 'Accepted']
['s186670357', 's639900744', 's821745672']
[3064.0, 3060.0, 3064.0]
[17.0, 17.0, 17.0]
[316, 317, 91]
p02981
u138816476
2,000
1,048,576
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?
['l, r = map(int, input().split())\n \nv = []\n \nif l*r < 2019:\n print(l*r)\nelse:\n for a, i in enumerate(range(l, r+1)):\n for j in range(l+a+1, r+1):\n if i*j%2019 in v:\n print(min(v))\n exit()\n else:\n v.append(i*j%2019)\n ...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s016290704', 's796070949', 's995061594', 's724664218']
[3060.0, 3060.0, 3060.0, 2940.0]
[18.0, 17.0, 18.0, 17.0]
[328, 346, 351, 58]
p02981
u140191608
2,000
1,048,576
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?
['N,A,B = map(int,input.split())\nprint(min(B,N*A))', 'N,A,B = map(int,input().split())\nprint(min(B,N*A))']
['Runtime Error', 'Accepted']
['s724579352', 's130691001']
[2940.0, 2940.0]
[17.0, 18.0]
[48, 50]
p02981
u140784478
2,000
1,048,576
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?
['if __name__ == "__main__":\n n,a,b = input(),input(),input()\n print (max(n*a,b))\n', 'n,a,b = map(int,input().split())\n\nprint(max(n*a,b))', 'n,a,b = map(int,input().split())\n\nprint(min(n*a,b))']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s676586014', 's907248813', 's026867879']
[3064.0, 2940.0, 2940.0]
[18.0, 17.0, 17.0]
[86, 51, 51]
p02981
u144203608
2,000
1,048,576
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?
['N,A,B = map(int,input().slit())\nif N*A<B:\n print(N*A)\nelif N*A>B:\n print(B)\nelse:\n print()', 'N,A,B = map(int,input().slit())\nif N*A<=B:\n print(N*A)\nelse N*A>=B:\n print(B)', 'N,A,B = map(int,input().split())\nif N*A<=B:\n print(N*A)\nelse:\n print(B)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s261955961', 's974990300', 's378813508']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 17.0]
[93, 79, 73]
p02981
u148551245
2,000
1,048,576
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?
['n, a, b = map(int, input().split( ))\nprint(max(a * n, b))', 'n, a, b = map(int, input().split( ))\nprint(min(a * n, b))']
['Wrong Answer', 'Accepted']
['s572560941', 's504007952']
[2940.0, 2940.0]
[17.0, 17.0]
[57, 57]
p02981
u150641538
2,000
1,048,576
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?
['n,a,b=amap(int,input().split())\nprint(min(b,a*n))', 'n,a,b=map(int,input().split())\nprint(min(b,a*n))']
['Runtime Error', 'Accepted']
['s374736456', 's504504747']
[2940.0, 2940.0]
[17.0, 18.0]
[49, 48]
p02981
u151107315
2,000
1,048,576
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?
['L,R = map(int,input().split())\n\n\nif R < 2019 :\n print((L * (L + 1)) % 2019)\n\nelif L <= 2019 and R >= 2019 :\n print(0)\n\nelse :\n R = min(R, L + 2018)\n ans = 2018\n for i in range(L,R + 1):\n b = i + 1\n for j in range(b,R + 1):\n x = (i * j) % 2019\n ans = m...
['Runtime Error', 'Accepted']
['s464239550', 's335227653']
[3064.0, 2940.0]
[18.0, 17.0]
[415, 85]
p02981
u152283104
2,000
1,048,576
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?
["import numpy as np\n\nif __name__ == '__main__':\n\tN = int(input())\n\tdam = np.array(list(map(int, input().split())))\n\n\tindex_ = np.array([1 if i % 2 == 0 else -1 for i in range(N)])\n\tans = np.array([])\n\tfor i in range(N):\n\t\tans = np.append(ans, np.dot(dam, index_))\n\t\tindex_ = np.roll(index_, 1)\n\tans...
['Runtime Error', 'Accepted']
['s078395383', 's986195204']
[12504.0, 2940.0]
[153.0, 17.0]
[349, 76]
p02981
u153335839
2,000
1,048,576
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?
['n, a, b = map(int, input().split())\nif n*a >= b:\n print(n*a)\nelse:\n print(b)\n', 'n, a, b = map(int, input().split())\nif n*a <= b:\n print(n*a)\nelse:\n print(b)\n']
['Wrong Answer', 'Accepted']
['s813128251', 's090042611']
[2940.0, 2940.0]
[17.0, 17.0]
[83, 83]
p02981
u159808230
2,000
1,048,576
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?
['i = input().spli(" ")\npeople = int(i[0])\ntrain_fee = int(i[1])\ntaxi_fee = int(i[2])\n\ntrain_sum = people * train_fee\nif train_sum > taxi_fee:\n print(train_sum)\nelse:\n print(taxi_fee)\n', 'i = input().split(" ")\npeople = int(i[0])\ntrain_fee = int(i[1])\ntaxi_fee = int(i[2])\n\ntrain_sum = people * trai...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s062191758', 's773585573', 's119048616']
[2940.0, 2940.0, 2940.0]
[17.0, 17.0, 20.0]
[188, 189, 189]
p02981
u161823208
2,000
1,048,576
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?
['numbers = input().split()\nif(numbers[0]*numbers[1] < numbers[2]):\n ans = numbers[0]*numbers[1]\nelse:\n ans = number[2]\n\nprint(ans)', 'numbers = input().split()\nif(int(numbers[0])*int(numbers[1]) < int(numbers[2])):\n ans = int(numbers[0])*int(numbers[1]) \nelse:\n ans = int(numbers[2])\n \nprint(ans)']
['Runtime Error', 'Accepted']
['s318804162', 's708701961']
[2940.0, 3060.0]
[17.0, 17.0]
[131, 164]
p02981
u166621202
2,000
1,048,576
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?
['import sys\ninput = sys.stdin.readline\n\nL,R = map(int,input().split())\nlst = []\n\nif L <= 2019 and R >= 2019:\n print(0)\nelse:\n for i in range(L,R+1):\n if i % 2019 == 0:\n print(0)\n break\n for j in range(i+1,R+1):\n if j % 2019 == 0:\n print...
['Runtime Error', 'Runtime Error', 'Accepted']
['s601880918', 's710562958', 's187178240']
[3060.0, 3064.0, 3060.0]
[17.0, 17.0, 20.0]
[441, 346, 54]
p02981
u169138653
2,000
1,048,576
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?
['n,a,b=map(int,input().split())\nprint(min(a,n*b))', 'n,a,b=map(int,input().split())\nprint(min(b,n*a))\n']
['Wrong Answer', 'Accepted']
['s392808066', 's051293839']
[2940.0, 2940.0]
[17.0, 18.0]
[48, 49]
p02981
u174536291
2,000
1,048,576
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?
['a, b, c = list(map(intl, input().split()))\nif a * b >= c:\n print(c)\nelse:\n print(a * b)', 'a, b, c = list(map(int, input().split()))\nif a * b >= c:\n print(c)\nelse:\n print(a * b)']
['Runtime Error', 'Accepted']
['s897414327', 's750921982']
[9048.0, 9140.0]
[25.0, 28.0]
[89, 88]
p02981
u175590965
2,000
1,048,576
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?
['n,a,b = map(int,input().split())\nc = n*a\nif c >= b:\n print(c)\nelse:\n print(b)', 'n,a,b = map(int,input().split())\nc = n*a\nif n*a > b:\n print(n*a)\nelse:\n print(b)', 'n,a,b = map(int,input().split())\nprint(min(n*a,b))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s278818604', 's352962168', 's722982298']
[2940.0, 2940.0, 2940.0]
[18.0, 17.0, 19.0]
[79, 82, 50]
p02981
u182004566
2,000
1,048,576
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?
['L, R = map(int, input().split())\n\nif R - L >= 2050:\n print(0)\nelse:\n ans = 20000000\n for i in range(L, R):\n for j in range(i+1, R+1):\n ans = min(ans, (i * j) % 2019)\n print(ans)\n', 'N, A, B = map(int, input().split())\nprint(min(N*A, B))\n']
['Runtime Error', 'Accepted']
['s287388855', 's129227978']
[2940.0, 2940.0]
[17.0, 17.0]
[208, 55]
p02981
u183422236
2,000
1,048,576
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?
['L, R = map(int, input().split())\nans = 2019\nfor i in range(L, R):\n for j in range(i + 1, R + 1):\n if i * j % 2019 < ans:\n ans = i * j % 2019\n if ans == 0:\n exit()\nprint(ans)', 'n, a, b = map(int, input().split())\nprint(min(a * n, b))']
['Runtime Error', 'Accepted']
['s757458638', 's286410471']
[2940.0, 2940.0]
[17.0, 17.0]
[212, 56]
p02981
u185966380
2,000
1,048,576
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?
['N, A, B = map(int, input.split())\nprint(min(A*N, B))', 'N, A, B = map(int, input().split())\nprint(min(A*N, B))']
['Runtime Error', 'Accepted']
['s011505457', 's857025666']
[2940.0, 2940.0]
[17.0, 17.0]
[52, 54]
p02981
u187366461
2,000
1,048,576
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?
['N,A,B=map(int,input().split())\n\nif A*N<B:\n ans=a*N\nelse:\n ans=B\n\nprint(ans)\n', 'N,A,B=map(int,input().split())\n\nif A*N<B:\n ans=A*N\nelse:\n ans=B\n\nprint(ans)\n']
['Runtime Error', 'Accepted']
['s179746150', 's155133909']
[2940.0, 2940.0]
[17.0, 20.0]
[82, 82]
p02981
u187960713
2,000
1,048,576
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?
['N = input()\nA = input()\nB = input()\n\nN = int(N)\nA = int(A)\nB = int(B)\n\nif N * A > B:\n print(N*A)\nelse:\n print(B)', 'NAB = input()\nN,A,B=NAB.split()\nN = int(N)\nA = int(A)\nB = int(B)\n\nif N * A < B:\n print(N*A)\nelse:\n print(B)']
['Runtime Error', 'Accepted']
['s580134556', 's890751206']
[3060.0, 2940.0]
[17.0, 18.0]
[114, 109]
p02981
u200527996
2,000
1,048,576
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?
['# 21:05\nN ,A ,B = map(int, input().split())\nprint(max(N*A,B))\n', '# 21:05\nN ,A ,B = map(int, input().split())\nprint(min(N*A,B))\n']
['Wrong Answer', 'Accepted']
['s403028141', 's647754732']
[2940.0, 2940.0]
[17.0, 17.0]
[62, 62]
p02981
u208947104
2,000
1,048,576
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?
['n=input().split()\nN=int(n[0])\nA=int(n[1])\nB=int(n[2])\na=N*A\nif a>B:\n print(a)\nelse:\n print(B)', 'n=input().split()\nN=int(n[0])\nA=int(n[1])\nB=int(n[2])\na=N*A\nif a>=B:\n print(a)\nelse:\n print(B)', 'n=input().split()\nN=int(n[0])\nA=int(n[1])\nB=int(n[2])\na=N*A\nif a>=B:\n print(B)\nelse:\n print(a...
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s485238079', 's847231126', 's950306223']
[9164.0, 9096.0, 9132.0]
[27.0, 28.0, 31.0]
[95, 96, 96]
p02981
u217627525
2,000
1,048,576
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?
['l,r=map(int,input().split())\nl0=l%2019\nr0=r%2019\nif r-l>=2019 or l0==0 or r0==0:\n print(0)\nelif l-l%2019+2019<=r:\n print(0)\nelse:\n ans=2019\n for i in range(l0,r0):\n for j in range(i+1,r0+1):\n if (i*j)%2019<ans:\n ans=(i*j)%2019\n if ans==1:\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s916113090', 's988708277', 's620251543']
[3064.0, 3064.0, 2940.0]
[17.0, 17.0, 17.0]
[368, 368, 48]
p02981
u219226973
2,000
1,048,576
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?
["def main(n,a,b):\n sum_list = [(n-x)*b + x * a for x in range(1,20)]\n return min(sum_list)\n\nif __name__ == '__main__':\n s = list(map(int, input().split()))\n main(s[0],s[1],s[2])", "def main(n,a,b):\n if 1 <= n <= 20 and 1 <= a <= 50 and 1 <= b <= 50 :\n sum_list = [(n-x)*b + x * a for x in ...
['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s463382015', 's618689684', 's708845807', 's939867626', 's216408834']
[3064.0, 3060.0, 3060.0, 2940.0, 3060.0]
[18.0, 17.0, 17.0, 17.0, 17.0]
[188, 270, 211, 188, 250]
p02981
u219466830
2,000
1,048,576
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?
['a, b, c = str(input()).split()\n\nif a * b < c:\n print(a * b)\nelse:\n print(c)', 'a, b, c = map(int, input().split())\n\nif a * b < c:\n print(a * b)\nelse:\n print(c)']
['Runtime Error', 'Accepted']
['s686122147', 's661317450']
[2940.0, 2940.0]
[17.0, 17.0]
[81, 86]
p02981
u219503971
2,000
1,048,576
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?
['a,b,c=map(int,input().split)\nif b>=c:\n print(a*c)\nelse:\n print(a*b)', 'a,b,c=map(int,input().split())\nif a*b>=c:\n print(c)\nelse:\n print(a*b)\n']
['Runtime Error', 'Accepted']
['s215306543', 's703205091']
[2940.0, 2940.0]
[17.0, 17.0]
[69, 72]
p02981
u223555291
2,000
1,048,576
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?
['n,a,b=map(int,input().split())\nprint(min(n*a,b)\n', 'n,a,b=map(int,input().split())\nprint(min(n*a,b))']
['Runtime Error', 'Accepted']
['s419553598', 's671208634']
[2940.0, 2940.0]
[17.0, 17.0]
[48, 48]
p02981
u227085629
2,000
1,048,576
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?
['a,b,c = map(int, input().split())\nif a*c >= b:\n print(b)\nelse:\n print(a*c)', 'a,b,c = map(int, input().split())\nif a*b >= c:\n print(c)\nelse:\n print(a*b)']
['Wrong Answer', 'Accepted']
['s997515130', 's862845919']
[2940.0, 2940.0]
[17.0, 17.0]
[76, 76]
p02981
u227641731
2,000
1,048,576
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?
['L,R = map(int, input().split())\nMIN = 2019\nfor i in range(L,R):\n for j in range(i+1, R+1):\n mod = ij % 2019\n\n if MIN > mod:\n MIN = mod\n \nprint(MIN)', 'N,A,B = map(int, input().split())\nif N*A >= B:\n print(B)\nelse:\n print(N*A)']
['Runtime Error', 'Accepted']
['s747156813', 's093102771']
[2940.0, 2940.0]
[17.0, 17.0]
[175, 80]
p02981
u229621546
2,000
1,048,576
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?
['A,B,N = map(int,input().split())\nprint(min([A * N,B]))', 'N,A,B = map(int,input().split())\nprint(min([A * N,B]))']
['Wrong Answer', 'Accepted']
['s646800988', 's057158264']
[2940.0, 2940.0]
[18.0, 17.0]
[54, 54]
p02981
u232462528
2,000
1,048,576
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?
['a,b,c=map(int,input().split());print([a*b,c][a*b<c])', 'a,b,c=map(int,input().split());print(a*b if a*b<c else c)']
['Wrong Answer', 'Accepted']
['s569529709', 's872285110']
[2940.0, 2940.0]
[17.0, 17.0]
[52, 57]
p02981
u233745357
2,000
1,048,576
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?
['tmp=input().split()\nn=int(tmp[0])\nd=int(tmp[1])\nxn = [0]*n\nnum = 0\n\nfor i in range(n):\n xn[i] = input().split()\n \nfor i in range(n):\n for j in range(i+1, n):\n dist = 0\n for k in range(d):\n dist = dist + pow(int(xn[i][k])-int(xn[j][k]), 2)\n# print("test",dist)\n# print(int(pow(int(p...
['Runtime Error', 'Wrong Answer', 'Accepted']
['s062783825', 's576866553', 's158733783']
[3316.0, 2940.0, 2940.0]
[22.0, 17.0, 17.0]
[418, 104, 104]
p02981
u234582237
2,000
1,048,576
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?
['import math\nn,d=input().split()\nn=int(n)\nd=int(d)\ndef combinations(n, r):\n return math.factorial(n)/(math.factorial(n-r)*math.factorial(r))\nx=[]\nif d==1:\n count=combinations(n,2)\n count=int(count)\nelse:\n for i in range(n):\n xa=[int(s) for s in input().split()]\n x.append(xa)\n a=[]\n for i i...
['Runtime Error', 'Accepted']
['s562217894', 's115804864']
[3064.0, 2940.0]
[18.0, 17.0]
[634, 98]
p02981
u235066013
2,000
1,048,576
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?
['n,a,b=[int(i)for i in input().split()]\nprint(max(n*a,b))', 'n,a,b=[int(i)for i in input().split()]\nprint(min(n*a,b))']
['Wrong Answer', 'Accepted']
['s205383781', 's593164753']
[2940.0, 2940.0]
[17.0, 17.0]
[56, 56]
p02981
u237493274
2,000
1,048,576
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?
['l, r = map(int, input().split())\nl, r = l%2019, r%2019\nmi = 9999\nif r*(r-1)<2019:\n print(l*(l+1))\nelif r==0 or l==0:\n print(0)\nelse:\n for i in range(l, r-1):\n for j in range(i+1, r):\n if (i/3).is_integer() and (j/673).is_integer():\n print((i/3)*((i/3)+1))\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s092051578', 's804300857', 's644017910']
[3064.0, 3064.0, 2940.0]
[17.0, 17.0, 17.0]
[477, 471, 54]
p02981
u238801602
2,000
1,048,576
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?
['N,A,B = map(int,input().split())\nif N*4 < B:\n print(N*4)\nelse:\n print(B)', 'N,A,B = map(int,input().split())\nif N*A < B:\n print(N*A)\nelse:\n print(B)']
['Wrong Answer', 'Accepted']
['s941347555', 's991285099']
[2940.0, 2940.0]
[17.0, 17.0]
[78, 78]
p02981
u242528247
2,000
1,048,576
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?
['N, A, B = int(input().split())\nprint(min(N*A,B))', 'N, A, B = map(int, input().split())\nprint(min(N*A,B))']
['Runtime Error', 'Accepted']
['s958326723', 's489177445']
[2940.0, 2940.0]
[18.0, 17.0]
[48, 53]
p02981
u243549769
2,000
1,048,576
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?
['N, A, B = map(int, input().split())\n\nli = [N , A , B]\nprint(min(li()))', 'x = N * A\ny = B\n\nli = [x,y]\nprint(min(li))', 'N, A, B = map(int, input().split())\n\nx = N*A\ny = B\nli = [x,y]\nprint(min(li()))', 'N, A, B = map(int, input().split())\n\n\nli = [N*A,B]\nprint(min(li()))', 'N, A, B = map(int, input().sp...
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s268531233', 's552384063', 's772005616', 's910124784', 's955629447', 's082104744']
[2940.0, 2940.0, 2940.0, 2940.0, 3060.0, 2940.0]
[17.0, 17.0, 20.0, 17.0, 19.0, 17.0]
[70, 42, 78, 67, 80, 64]
p02981
u244836567
2,000
1,048,576
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?
['a,b,c=input().split()\na=int(a)\nb=int(b)\nc=int(c)\nprint(int(a*b+c))', 'a,b,c=input().split()\na=int(a)\nb=int(b)\nc=int(c)\nif a*b>c:\n print(c)\nelse:\n print(a*b)']
['Wrong Answer', 'Accepted']
['s333911861', 's405452308']
[9092.0, 9080.0]
[27.0, 25.0]
[66, 88]
p02981
u245154084
2,000
1,048,576
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?
['info = input().split(" ")\nN = int(info[0])\nA = int(info[1])\nB = int(info[2])\n\nif N*A =< B:\n print(N*A)\nelse:\n print(B)\n', 'info = input().split(" ")\nN = int(info[0])\nA = int(info[1])\nB = int(info[2])\n\nif N*A =< B:\n print(N*A)\nelse:\n print(B)', 'info = input().split(" ")\nN = int(info[0])\nA = int...
['Runtime Error', 'Runtime Error', 'Accepted']
['s608010553', 's863535739', 's240029039']
[2940.0, 2940.0, 2940.0]
[17.0, 18.0, 18.0]
[121, 120, 120]
p02981
u245788181
2,000
1,048,576
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?
['N,A,B = map(int,input().split(" "))\nif A * N > B :\n print(B)\nelse:\n print(A)', 'N,A,B = map(int,input().split(" "))\nif A * N > B :\n print(B)\nelse:\n print(A*N)']
['Wrong Answer', 'Accepted']
['s571712804', 's386160206']
[2940.0, 2940.0]
[17.0, 17.0]
[82, 84]
p02981
u245864231
2,000
1,048,576
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?
['n=input()\nn.split(" ")\nif int(n[0])*int(n[1]) < int(n[2]):\n print(int(n[0])*int(n[1]))\nelse:\n print(int(n[2]))\n ', 'i=input()\nii = i.split()\nif int(ii[0]) * int(ii[1]) < int(ii[2]):\n print(int(ii[0]) * int(ii[1]))\nelse:\n print(int(ii[2]))']
['Runtime Error', 'Accepted']
['s818156153', 's195015524']
[2940.0, 3060.0]
[17.0, 18.0]
[115, 124]
p02981
u248670337
2,000
1,048,576
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?
['N = int(input("N = "))\nA = int(input("A = "))\nB = int(input("B = "))\ntrain = N * A\ntaxi = B\nif train >= taxi:\n print(taxi)\nelse:\n print(train)', 'N, A, B = (int(x) for x in input().split)\nif(N * A > B):\n print(N * A)\nelse:\n print(B)', 'N, A, B = (int(x) for x in input().split())\nif(N * A < B):\n ...
['Runtime Error', 'Runtime Error', 'Accepted']
['s820908839', 's839957130', 's703310871']
[3316.0, 2940.0, 2940.0]
[19.0, 18.0, 17.0]
[148, 88, 90]