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
p02628
u554784585
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K=map(int,input().split())\nans=0\np=list(map(int,input().split()))\n\np.sort()\n\nfor i in range(K):\n ans+=p[i]\n\n print(ans)\n', 'N,K=map(int,input().split())\nans=0\np=list(map(int,input().split()))\n\np.sort()\n\nfor i in range(K):\n ans+=p[i]\n\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s850550355', 's936796166']
[9124.0, 9236.0]
[32.0, 28.0]
[128, 124]
p02628
u556589653
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k = map(int,input().split())\np = list(map(int,input().split()))\np.sort()\nans = 0\nfor i in range(K):\n ans += p[i]\nprint(ans)', 'n,k = map(int,input().split())\np = list(map(int,input().split()))\np.sort()\nans = 0\nfor i in range(k):\n ans += p[i]\nprint(ans)']
['Runtime Error', 'Accepted']
['s573039734', 's977279055']
[8932.0, 8924.0]
[26.0, 29.0]
[126, 126]
p02628
u558129042
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['number = input().split(" ")\nN = int(number[0])\nK = int(number[1])\n\nnumbers = input().split(" ")\nnumbers.sotr()\n\na = 0\n\nfor i in range(K):\n\ta += numbers[i]\nprint(a)', 'number = input().split(" ")\nN = int(number[0])\nK = int(number[1])\n \nlist = []\nnumbers = input().split(" ")\nfor i in numbers:\n list.append(int(i))\nlist.sort()\n \na = 0\n \nfor i in range(K):\n\ta += int(list[i])\nprint(a)']
['Runtime Error', 'Accepted']
['s148548116', 's309950101']
[9068.0, 9140.0]
[34.0, 28.0]
[163, 217]
p02628
u562577097
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['#!/usr/bin/env python\nfrom __future__ import division, print_function\n\nimport os\nimport sys\nfrom io import BytesIO, IOBase\n\nif sys.version_info[0] < 3:\n from __builtin__ import xrange as range\n from future_builtins import ascii, filter, hex, map, oct, zip\n\n\n# region fastio\n\nBUFSIZE = 8192\n\n\nclass FastIO(IOBase):\n newlines = 0\n\n def __init__(self, file):\n self._fd = file.fileno()\n self.buffer = BytesIO()\n self.writable = "x" in file.mode or "r" not in file.mode\n self.write = self.buffer.write if self.writable else None\n\n def read(self):\n while True:\n b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))\n if not b:\n break\n ptr = self.buffer.tell()\n self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)\n self.newlines = 0\n return self.buffer.read()\n\n def readline(self):\n while self.newlines == 0:\n b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))\n self.newlines = b.count(b"\\n") + (not b)\n ptr = self.buffer.tell()\n self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)\n self.newlines -= 1\n return self.buffer.readline()\n\n def flush(self):\n if self.writable:\n os.write(self._fd, self.buffer.getvalue())\n self.buffer.truncate(0), self.buffer.seek(0)\n\n\nclass IOWrapper(IOBase):\n def __init__(self, file):\n self.buffer = FastIO(file)\n self.flush = self.buffer.flush\n self.writable = self.buffer.writable\n self.write = lambda s: self.buffer.write(s.encode("ascii"))\n self.read = lambda: self.buffer.read().decode("ascii")\n self.readline = lambda: self.buffer.readline().decode("ascii")\n\n\ndef print(*args, **kwargs):\n """Prints the values to a stream, or to sys.stdout by default."""\n sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)\n at_start = True\n for x in args:\n if not at_start:\n file.write(sep)\n file.write(str(x))\n at_start = False\n file.write(kwargs.pop("end", "\\n"))\n if kwargs.pop("flush", False):\n file.flush()\n\n\nif sys.version_info[0] < 3:\n sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)\nelse:\n sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)\n\n\nfrom math import sqrt, floor, factorial, gcd, log\nfrom collections import deque, Counter, defaultdict\nfrom itertools import permutations, combinations\nfrom math import gcd\nfrom bisect import bisect\n\n\ninput = lambda: sys.stdin.readline().rstrip("\\r\\n")\nread = lambda: list(map(int, input().strip().split(" ")))\n\n\n\n\n\ndef solve():\n n, k = read(); arr = read()\n if n == 1:print(arr[0]);return\n\n def chk(x):\n ans = 0; i = 0\n while i < n:\n t = 0; c = 0\n while i < n and arr[i]+t <= x and c < 2:\n print(arr[i], t, c)\n c += 1\n i += 1\n ans += 1\n \n return(ans)\n print(chk(9))\n\n \n \n \n # mid = (lo+hi)//2\n # if chk(mid) <= k:\n \n \n # else:\n # hi = mid-1\n\n\n\n\n\n\n\n\n \n\n\n \n\nif __name__ == "__main__":\n\tsolve()', 'import sys\n# from math import sqrt, gcd, ceil, log\n# from bisect import bisect\n# from collections import defaultdict, Counter\ninp = sys.stdin.readline\nread = lambda: list(map(int, inp().strip().split()))\n\n\n\n\n\ndef solve():\n\tn, k = read(); arr = sorted(read())\n\tprint(sum(arr[:k]))\n\n\n\nif __name__ == "__main__":\n\tsolve()']
['Wrong Answer', 'Accepted']
['s277093986', 's349415724']
[9428.0, 9128.0]
[2205.0, 30.0]
[3370, 348]
p02628
u567664824
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N, K = input().split()\np = list(map(int, input().split())).sort()\nres = 0\nfor x in range(K):\n res += p[x]\nprint(res)', 'N, K = input().split()\np = list(map(int, input().sort().split()))\nres = 0\nfor x in range(K):\n res += p[x]\nprint(res)', 'N, K = input().split()\np = sorted([list(map(int, input().split()))])\nres = 0\nfor x in range(K):\n res += p[x]\nprint(res)', 'from functools import reduce\n\nN, K = [int(x) for x in input().split()]\np = sorted([int(x) for x in input().split()])\nprint(reduce(lambda x, y: x + y, p[0:K]))']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s002990537', 's050519851', 's381171495', 's063203198']
[9260.0, 9040.0, 9260.0, 9724.0]
[23.0, 27.0, 27.0, 31.0]
[117, 117, 120, 158]
p02628
u569479281
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['def main():\n n, k = map(int, input().split())\n p = sorted(list(input().split()))\n \n hui = 0\n \n for i in range(k):\n hui += int(p[i])\n \n print(int(hui))\n \nmain()', 'def main():\n n, k = map(int, input().split())\n p = sorted(list(input().split()))\n \n hui = 0\n \n for i in range(k):\n hui += int(p[i])\n \n print(hui)\n \nmain()', 'def main():\n n, k = map(int, input().split())\n p = sorted(list(map(int, input().split())))\n \n hui = 0\n \n for i in range(k):\n hui += int(p[i])\n \n print(hui)\n \nmain()\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s098059473', 's766648540', 's740633475']
[8976.0, 9212.0, 9168.0]
[30.0, 29.0, 32.0]
[173, 168, 179]
p02628
u571281863
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K,*P=map(int,open(0).read().split())\nprint(sum(sorted(P[:K])))', 'N,K,*P=map(int,open(0).read().split())\nprint(sum(sorted(P)[:K]))']
['Wrong Answer', 'Accepted']
['s435624645', 's534108845']
[9208.0, 9264.0]
[32.0, 34.0]
[64, 64]
p02628
u573754721
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k=map(int,input().split())\nP=list(map(int,input().split()))\nP.sort()\nprint(sum(P[0:k+1]))\n', 'n,k=map(int,input().split())\nP=list(map(int,input().split()))\nP.sort()\nprint(sum(P[0:k+1]))', 'n,k=map(int,input().split())\nP=list(map(int,input().split()))\nP.sort()\nprint(sum(P[:k]))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s078473041', 's371959091', 's418320797']
[9136.0, 9212.0, 9144.0]
[29.0, 27.0, 27.0]
[92, 91, 88]
p02628
u578093902
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K = list(int(t) for t in input().split())\nprice = list(int(t) for t in input().split())\nprice.sort()\ntotal = sum(price[0,K])\nprint(total)', 'N,K = input().split()\nprice = list(int(t) for t in input().split())\nprice_s = sorted(price)\ntotal = sum(price_s[0:int(K)])\nprint(total)']
['Runtime Error', 'Accepted']
['s638696727', 's936758217']
[9252.0, 9196.0]
[27.0, 27.0]
[139, 135]
p02628
u581248859
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K = map(int,input().split())\n\nprice = list(map(int,input(),split()))\n\nprice.sort()\n\nfor p in range(1,K):\n\tans += price[p]\n\nprint(ans)\n', 'N,K = map(int,input().split())\n\nprice = list(map(int,input(),split()))\n\nprice.sort\n\nfor p in range(1,K):\n\tans += price[p]\n\nprint(ans)\n', 'N,K = map(int,input().split())\n\nprice = list(map(int,input().split()))\n\nprice.sort()\n\nans = sum(price[:K])\nprint(ans)\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s466009995', 's701641717', 's807805311']
[9144.0, 9104.0, 9068.0]
[31.0, 24.0, 27.0]
[137, 135, 118]
p02628
u589361760
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n, k = map(int, input().split())\np = list(map(int, input().split()))\n\np.sort(reverse=True)\n\ni = 0\nwhile i < k:\n i += p[i]\n i ++\n \nprint(i)', 'n, k = map(int, input().split())\np = list(map(int, input().split()))\n \np.sort()\n \ni = 0\nprice = 0\nwhile i < k:\n price += p[i]\n i ++\n \nprint(price)', 'n, k = map(int, input().split())\np = list(map(int, input().split()))\n \np.sort()\n \ni = 0\nwhile i < k:\n i += p[i]\n i ++\n \nprint(i)', 'n, k = map(int, input().split())\np = list(map(int, input().split()))\np.sort()\n\ni = 0\nprice = 0\nwhile i < k:\n price += p[i]\n i += 1\n \nprint(price)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s223281095', 's717953237', 's742242280', 's644998287']
[9016.0, 9024.0, 9020.0, 9036.0]
[23.0, 28.0, 24.0, 28.0]
[141, 149, 131, 147]
p02628
u589734885
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k = map(int,input().split(" "))\np = list(map(int,input().split(" "))).sort()\nans = 0\n\nfor i in range(k):\n ans = ans + p[i]\n\nprint(ans)', 'n,k = map(int,input().split(" "))\np = list(map(int,input().split(" ")))\n\np.sort()\n#print(p)\n\nans = 0\nfor i in range(k):\n ans = ans + p[i]\n\nprint(ans)']
['Runtime Error', 'Accepted']
['s118090366', 's513036479']
[9096.0, 9212.0]
[24.0, 30.0]
[139, 152]
p02628
u591734860
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N, K = map(int, input().split(\' \'))\nfruit_prices = list(map(int, input().split(\' \')))\nprint("{0}個の果物から{1}種類選ぶ".format(N, K))\nprint(fruit_prices)\n\nfruit_prices.sort()\nprint(fruit_prices)\n\nmin_price = 0\n\nfor i in range(K):\n min_price += fruit_prices[i]\n\nprint(min_price)', "N, K = map(int, input().split(' '))\nfruit_prices = list(map(int, input().split(' ')))\n\nfruit_prices.sort()\n\nmin_price = 0\n\nfor i in range(K):\n min_price += fruit_prices[i]\n\nprint(min_price)"]
['Wrong Answer', 'Accepted']
['s586259251', 's825327736']
[9200.0, 9252.0]
[32.0, 28.0]
[289, 190]
p02628
u593920359
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k=map(int,input().split)\nl=list(map(int,input().split))\nl.sort()\nprint(sum(l[:k]))', 'n,k=map(int,input().split())\nl=list(map(int,input().split()))\nl.sort()\nprint(sum(l[:k]))\n']
['Runtime Error', 'Accepted']
['s740529962', 's946661341']
[8968.0, 9116.0]
[21.0, 26.0]
[84, 89]
p02628
u598296382
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n = int(input())\nk = int(input())\ni=0\np = []\nwhile i < n:\n p.append(int(input()))\n i += 1\n\np.sort()\ns= sum(p[:k])\nprint(s)', 'n,k = map(int, input().split())\ni=0\np = list(map(int, input().split())\np.sort()\ns= sum(p[:k])\nprint(s)', 'n = int(input())\nk = int(input())\ni=0\np = []\nwhile i < n:\n p.append(int(input()))\n i += 1\n#print(p)\n#s=0\n#l=0\n#while l < k:\n\n# p = p.remove(min(p))\n# l += 1\n#print(s)\np.sort()\ns= sum(p[:k])\nprint(s)', 'n,k = map(int, input().split())\np = list(map(int, input().split())\np.sort()\ns= sum(p[:k])\nprint(s)', 'n,k = map(int, input().split())\ni=0\np = []\nwhile i < n:\n p.append(int(input()))\n i += 1\n#print(p)\n#s=0\n#l=0\n#while l < k:\n\n# p = p.remove(min(p))\n# l += 1\n\np.sort()\ns= sum(p[:k])\nprint(s)', 'n,k = map(int, input().split())\np = list(map(int, input().split()))\np.sort()\n#print(p)\ns= sum(p[:k])\nprint(s)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s134688814', 's215637301', 's246430240', 's497419429', 's531983148', 's478863852']
[9084.0, 8940.0, 9108.0, 8952.0, 9156.0, 9124.0]
[23.0, 22.0, 22.0, 20.0, 25.0, 28.0]
[128, 102, 226, 98, 260, 109]
p02628
u605662776
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['a=int(100)\nx=int(input())\ni=0\nfor i in range(10000):\n if a < x:\n a*=1.01\n a=int(a)\n i+=1\n elif a>=x:\n break\nprint(i)\n', 'a=int(100)\nx=int(input())\nfor i in range(10000):\n if a < x:\n a*=101//100\n a=int(a)\n i+=1\n else:\n break\nprint(i)\n', 'n,k=map(int,input().split())\np=list(map(int,input().split()))\n \np = sorted(p)\n\nans=0\nfor i in range(k):\n ans+=p[i]\nprint(ans)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s171185626', 's211503280', 's076006262']
[9152.0, 9096.0, 9156.0]
[25.0, 30.0, 23.0]
[131, 126, 135]
p02628
u611090896
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k = map(int,input().split())\np = sorted([int(input()) for i in range(n)])\ncount=0\nfor i in range(k):\n count = count+p[i]\nprint(count)\n', 'n,k = map(int,input().split())\np = sorted(list(map(int,input().split())))\ntotal = 0\nfor i in range(k):\n total += p[i]\nprint(total)']
['Runtime Error', 'Accepted']
['s040635477', 's216702316']
[9140.0, 9204.0]
[25.0, 28.0]
[137, 131]
p02628
u617225232
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['# -*- coding: utf-8 -*-\n# input\na, b = map(int, input().split())\nx = list(map(int, input()))\nx.sorted()\no = 0\nfor i in range(b):\n o = O+x[i]\nprint(o)\n', '# -*- coding: utf-8 -*-\n# input\na, b = map(int, input().split())\nx = list(map(int, input().split()))\nx.sort()\no = 0\nfor i in range(b):\n o = o+x[i]\nprint(o)\n']
['Runtime Error', 'Accepted']
['s389374315', 's356902334']
[9112.0, 9188.0]
[26.0, 30.0]
[153, 159]
p02628
u617953889
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k = map(int,input().split())\np = [int(x) for x in input().split()]\ns = 0\nfor i in range(k):\n s+=p[i]\nprint(s)\n\n\n ', 'n,k = map(int,input().split())\np = [int(x) for x in input().split()]\np.sort()\ns = 0\nfor i in range(k):\n s+=p[i]\nprint(s)\n\n\n']
['Wrong Answer', 'Accepted']
['s891568363', 's219823588']
[9164.0, 9080.0]
[28.0, 27.0]
[121, 126]
p02628
u620464724
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k = map(int,input().split())\na = list(map(int,input().split()))\nasr = sorted(a)\ndel asr[0:n-k]\nans = sum(asr)\nprint(str(ans))', 'n = int(input())\nk = int(input())\na = list(map(int,input().split()))\nasr = sorted(a)\ndel asr[0:n-k]\nans = sum(asr)\nprint(str(ans))', 'n,k = map(int,input().split())\na = list(map(int,input().split()))\nasr = sorted(a,reverse=True)\ndel asr[0:n-k]\nans = sum(asr)\nprint(str(ans))']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s586434842', 's813364744', 's290630679']
[9240.0, 9168.0, 9264.0]
[32.0, 23.0, 31.0]
[127, 130, 140]
p02628
u626228246
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K = map(int,input().split())\nP = list(map(int,input().split()))\nsum = 0\nfor i in range(N):\n sum += sorted(P)[i]\nprint(sum)', 'N,K = map(int,input().split())\nP = list(map(int,input().split()))\nsum,cnt = 0,0\nfor i in range(K):\n sum += sorted(P)[i]\nprint(sum)']
['Wrong Answer', 'Accepted']
['s819016334', 's167281911']
[9248.0, 9256.0]
[97.0, 83.0]
[125, 131]
p02628
u629945282
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K = map(int,input().split())\np = list(map(int,input().split)\np.sort(reverse = True)\nprint(sum(p[:K]))', 'N,K = map(int,input().split())\np = list(map(int,input().split()))\np.sort()\nprint(sum(p[:K]))']
['Runtime Error', 'Accepted']
['s558303488', 's762544866']
[8904.0, 9184.0]
[28.0, 28.0]
[103, 92]
p02628
u637387397
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k = input().split(" ")\n\ncost = input().split(" ")\n\ncost.sort()\n\nsum = 0\nfor i in range(int(k)):\n sum += int(cost[i])\nprint(sum)', 'n,k = input().split(" ")\n\ncost = input().split(" ")\na = []\nfor i in cost:\n a.append(int(i))\na.sort()\n\nsum = 0\nfor i in range(int(k)):\n sum += int(a[i])\nprint(sum)']
['Wrong Answer', 'Accepted']
['s340260202', 's152372508']
[9096.0, 9156.0]
[31.0, 26.0]
[130, 164]
p02628
u638856391
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
["n, k = input().strip().split()\nn, k = [int(n), int(k)]\n\np = list(map(int, input().strip().split()))\n\np.sort\n\nprint(f'{sum(p[0:k])}')", "n, k = input().strip().split()\nn, k = [int(n), int(k)]\n\np = list(map(int, input().strip().split()))\n\np.sort()\n\nprint(f'{sum(p[0:k])}')"]
['Wrong Answer', 'Accepted']
['s285141845', 's318470487']
[9064.0, 9220.0]
[29.0, 29.0]
[132, 134]
p02628
u645937929
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N, K = list(map(int, input().split()))\n\nprice_list = input().split()\n\nprice_list.sort()\n\nanswer = 0\n\nfor i in range(K):\n answer += price_list[i]\n\nprint(answer)', 'N, K = list(map(int, input().split()))\n\nprice_list = list(map(int, input().split()))\n\nprice_list.sort()\n\nanswer = 0\n\nfor i in range(K):\n answer += price_list[i]\n\nprint(answer)']
['Runtime Error', 'Accepted']
['s965790518', 's147074656']
[8820.0, 9128.0]
[22.0, 27.0]
[162, 178]
p02628
u655048024
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k = map(int,input().split())\np = list(map(int,input().split()))\np.sort\nans = 0\nfor i in range(k):\n ans += p[i]\nprint(ans)', 'n,k = map(int,input().split())\np = list(map(int,input().split()))\np.sort()\nans = 0\nfor i in range(k):\n ans += p[i]\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s291197813', 's060031758']
[9260.0, 9060.0]
[29.0, 28.0]
[124, 127]
p02628
u658600714
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k = map(int,input().split())\np = list[]\nans = 0\n\nfor i in range (n):\n p[i] = int(input())\n\np.sort()\n\nfor i in range(k):\n ans += p[i]\n\nprint(ans)', 'n,k = map(int,input().split())\np = list(map(int,input().split()))\nans = 0\n\n\np.sort()\n\nfor i in range(k):\n ans += p[i]\n\nprint(ans)']
['Runtime Error', 'Accepted']
['s943099111', 's855344354']
[8976.0, 9212.0]
[29.0, 26.0]
[148, 130]
p02628
u664546626
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,m=map(int,input().split())\narr=list(map(int,input().split())\n arr.sort()\nprint(sum(arr[:m]))', 'n,m=map(int,input().split())\narr=list(map(int,input().split())\narr.sort()\nprint(sum(arr[:m]))', 'n,m=map(int,input().split())\narr=sorted(list(map(int,input().split())))\nprint(sum(arr[:m]))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s043105461', 's513123805', 's479690693']
[8816.0, 8948.0, 9140.0]
[23.0, 27.0, 29.0]
[94, 93, 91]
p02628
u671204079
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K = map(int,input().split())\nP = list(map(int,input().split()))\nP.sort()\nres = 0\ni = 0\nwhile(K):\n\tres += P[i]\n\tK -= 1\nprint(res)\n', 'N,K = map(int,input().split())\nP = list(map(int,input().split()))\nP.sort()\nres = 0\ni = 0\nwhile(K):\n res += P[i]\n K -= 1\n i += 1\nprint(res)']
['Wrong Answer', 'Accepted']
['s377669044', 's301074516']
[9012.0, 9180.0]
[27.0, 34.0]
[131, 147]
p02628
u671889550
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K=map(int,input().split())\np=list(map(int,input().split()))\nl=[]\n\np.sort()\n\nfor i in range(K+1):\n l.append(p[i])\nprint(sum(l))\n\n', 'N,K=map(int,input().split())\np=list(map(int,input().split()))\nl=[]\n\np.sort()\n\nfor i in range(K):\n l.append(p[i])\nprint(sum(l))']
['Runtime Error', 'Accepted']
['s658791218', 's062991413']
[9152.0, 9192.0]
[29.0, 27.0]
[131, 127]
p02628
u682894596
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['a = 0\nn,k=input().split()\np=input().split(" ")\np=sorted(p)\nfor i in range(int(k)):\n a += int(p[i])\nprint(a)', 'a = 0\nn,k=input().split()\np=input().split(" ")\nfor i in range(int(n)):\n p[i] = int(p[i])\np=sorted(p)\nfor i in range(int(k)):\n a += int(p[i])\nprint(a)']
['Wrong Answer', 'Accepted']
['s569141947', 's470212191']
[9124.0, 9024.0]
[29.0, 29.0]
[108, 151]
p02628
u686174642
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k=[int(i) for i in input().strip().split(" ")]\narr=[int(i) for i in input().strip().split(" ")]\narr=sorted(arr)\nans=0\nfor i in range(k):\n ans+=arr[k]\nprint(ans)', 'n,k=[int(i) for i in input().strip().split(" ")]\narr=[int(i) for i in input().strip().split(" ")]\narrs=sorted(arr)\nprint(arrs)\nans=0\nfor i in range(k):\n ans+=arrs[k]\nprint(ans)', 'n,k=[int(i) for i in input().strip().split(" ")]\narr=[int(i) for i in input().strip().split(" ")] \nans=0\narr=sorted(arr)\nfor i in range(k):\n ans+=arr[i]\nprint(ans)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s076870853', 's775911502', 's167841800']
[9188.0, 9104.0, 9164.0]
[27.0, 29.0, 28.0]
[165, 179, 166]
p02628
u686536081
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k = map(int,input().split())\na = list(map(int,input().split()))\na.sort()\nprint(sum(p[:k]))', 'n,k = map(int,input().split())\na = map(int,input().split())\na.sort()\nprint(sum(p[:k]))', 'n=int(input())\nk=int(input())\na = [int(input()) for i in range(n)]\na.sort()\nprint(sum(a[:k]))', 'n=int(input())\nk=int(input())\na = [int(input()) for i in range(n)]\na.sort()\nprint(sum(a[:k]))', 'n=input()\nk=input()\na = [int(input()) for i in range(int(n))]\na.sort()\nprint(sum(a[:int(k)]))', 'n,k = map(int,input().split())\na = list(map(int,input().split()))\na.sort()\nprint(sum(a[:k]))']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s340109736', 's407263618', 's612016135', 's743247154', 's958257866', 's672753378']
[9084.0, 9256.0, 9120.0, 9084.0, 9096.0, 9136.0]
[24.0, 23.0, 24.0, 25.0, 25.0, 27.0]
[92, 86, 93, 93, 93, 92]
p02628
u686989171
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['def resolve():\n n,k = map(int, input().split())\n listA = list(map(int,input().split()))\n listA.sort()\n c = sum(listA[:k])\n print(c\nresolve()', 'def resolve():\n n,k = map(int, input().split())\n listA = list(map(int,input().split()))\n listA.sort()\n c = sum(listA[:k])\n print(c)\n \nresolve()']
['Runtime Error', 'Accepted']
['s190642455', 's557600168']
[8896.0, 9256.0]
[25.0, 27.0]
[155, 161]
p02628
u687574784
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K = list(map(int, input().split()))\np = list(map(int, input().split()))\n\nprint(sum(p))', 'N,K = list(map(int, input().split()))\np = sorted(list(map(int, input().split())))\n\nprint(sum(p[:K]))']
['Wrong Answer', 'Accepted']
['s919251047', 's021170969']
[9256.0, 9212.0]
[31.0, 31.0]
[88, 100]
p02628
u688203790
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k = map(int,input().split())\n\np = list(map(int,input().split()))\n\nps = p.sort()\nans = 0\n\nfor i in range(k):\n\tans += ps[i]\n\nprint(ans)', 'n,k = map(int,input().split())\n\np = list(map(int,input().split()))\n\np.sort()\nans = sum(p[0:k])\n\nprint(ans)']
['Runtime Error', 'Accepted']
['s198420771', 's841523915']
[9232.0, 9236.0]
[22.0, 29.0]
[135, 106]
p02628
u691195128
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['a = input().split(" ")\nb = input().split(" ")\nc = []\nfor i in b:\n c.append(i)\nc.sort()\nsum = 0\nfor i in c[0:int(a[1])]:\n sum += int(i)\nprint(sum)', 'a = input().split(" ")\nb = input().split(" ").sort()\nsum = 0\nfor i in a[1]:\n sum += i\nprint(sum)', 'a = input().split(" ")\nb = input().split(" ")\nc = []\nfor i in b:\n c.append(int(i))\n\nc.sort()\nsum = 0\nfor i in c[0:int(a[1])]:\n sum += int(i)\nprint(sum)']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s176379300', 's560967455', 's684450688']
[9092.0, 9148.0, 9252.0]
[30.0, 27.0, 34.0]
[151, 99, 157]
p02628
u691399849
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N, K = map(int, input().split())\nfruits = map(int, input().split())\n\nreturn sorted(fruit)[:K]', 'N, K = map(int, input().split())\nfruits = map(int, input().split())\n\nprint(sum(sorted(fruits)[:K]))']
['Runtime Error', 'Accepted']
['s203997880', 's361284284']
[8928.0, 9144.0]
[23.0, 29.0]
[93, 99]
p02628
u693333798
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N , K = map(N , K = map(int, input().split())\nl = list(map(int, input().split()))\nl = sorted(l)\nres = 0\nfor i in range (K):\n res += l[i]\nprint(res)\n ', 'N , K = map(int, input().split())\nl = list(map(int, input().split()))\nll = sorted(l)\nres = 0\nif N == K :\n res = sum(ll)\nelif K==1 : \n res = ll[0]\nelse:\n for i in range (K):\n res += ll[i]\nprint(res)']
['Runtime Error', 'Accepted']
['s801972259', 's624729657']
[9004.0, 9264.0]
[26.0, 33.0]
[163, 213]
p02628
u698919163
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K = map(int,input().split())\np = list(map(int,input().split()))\n\np.sort()\nprint(sum(p[:K])', 'N,K = map(int,input().split())\np = list(map(int,input().split()))\n\np.sort()\nprint(sum(p[:K]))']
['Runtime Error', 'Accepted']
['s328581201', 's541592630']
[8944.0, 9080.0]
[23.0, 27.0]
[92, 93]
p02628
u699008198
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N, K = map( int, input() )\n\np = sorted( list( map( int, input().split() ) ) )\n\nprint( sum( p[ : K ] ) )\n', 'N, K = map( int, input().split() )\n \np = sorted( list( map( int, input().split() ) ) )\n \nprint( sum( p[ : K ] ) )']
['Runtime Error', 'Accepted']
['s291127573', 's319703773']
[9152.0, 9144.0]
[25.0, 30.0]
[104, 113]
p02628
u701513230
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K = map(int,input().split())\nprice = list(map(int,input().split()))\npriceN = sorted(price)\ntotal = 0\nfor i in range(K):\n total += priceN[i]\nprice(total)', 'N,K = map(int,input().split())\nprice = list(map(int,input().split()))\npriceN = sorted(price)\ntotal = 0\nfor i in range(K):\n total += priceN[i]\nprint(total)']
['Runtime Error', 'Accepted']
['s594388411', 's493680721']
[9200.0, 9072.0]
[25.0, 25.0]
[155, 155]
p02628
u708379767
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['# encoding: utf-8\nmax_, request = map(int, input().split())\namounts = list(map(int, input().split()))\namounts.sort()\nprint(amounts[:request])', '# coding: utf-8\nmax_, request = map(int, input().split())\namounts = list(map(int, input().split()))\namounts.sort()\nprint(sum(amounts[:request]))']
['Wrong Answer', 'Accepted']
['s051381567', 's977804857']
[9188.0, 9164.0]
[27.0, 31.0]
[141, 144]
p02628
u708890186
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k=map(int,input().split())\nl=[int(_) for _ in input().split()]\nl.sort()\nsum=0\nfor i in range(k):\n sum+=l[k]\nprint(sum)', 'n,k=map(int,input().split())\nl=[int(_) for _ in input().split()]\nl.sort()\n\nans=0\nfor i in range(k):\n ans+=l[k]\n\nprint(ans)', 'n,k=map(int,input().split())\nl=[int(_) for _ in input().split()]\nl.sort()\n \nans=0\nfor i in range(k):\n ans+=l[i]\nprint(ans)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s449159673', 's595712901', 's351130845']
[9180.0, 9160.0, 9196.0]
[26.0, 31.0, 30.0]
[121, 123, 123]
p02628
u716798056
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
["def main():\n\tN = int(input())\n\tK = int(input())\n\n\tprice = list(map(int, input().split()))\n\t\n\tprice.sort()\n\n\tpart = price[0:K]\n\n\tprint(sum(part))\n\nif __name__ == '__main__':\n main()", "def main():\n N = int(input())\n K = int(input())\n\n price = list(map(int, input().split()))\n\n price.sort()\n\n part = price[0:K]\n\n print(sum(part))\n\nif __name__ == '__main__':\n main()", "def main():\n\tN = int(input())\n\tK = int(input())\n\n\tlist = []\n\n\tfor i in range(N):\n\t\tlist.append(int(input()))\n\t\n\tlist.sort()\n\n\tpart = list[0:K]\n\n\tprint(sum(part))\n\nif __name__ == '__main__':\n main()", "def main():\n N, K = map(int, input().split())\n\n price = list(map(int, input().split()))\n\n price.sort()\n\n part = price[0:K]\n\n print(sum(part))\n\nif __name__ == '__main__':\n main()"]
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s030055214', 's212850958', 's327118056', 's287870278']
[9036.0, 9156.0, 9116.0, 9208.0]
[29.0, 28.0, 27.0, 26.0]
[183, 186, 200, 183]
p02628
u729119068
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K=map(int,input().split())\nn=list(map(int, input().split()))\nm=n.sort()\nprint(sum(m[0:K]))\n', 'N,K=map(int,input().split())\nn=list(map(int, input().split()))\nm=sorted(n)\nprint(sum(m[0:K]))']
['Runtime Error', 'Accepted']
['s853983618', 's211421101']
[9116.0, 9104.0]
[21.0, 27.0]
[93, 93]
p02628
u729911693
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N, K = map(int, input().split())\np = list(map(int,input().split()))\np = sorted(list(set(p)))\n\nprint(sum(p[0:K]))', 'N, K = map(int, input().split())\np = list(map(int,input().split()))\n\nprint(sum(list(set(p))))', 'N, K = map(int, input().split())\np = list(map(int,input().split()))\np = sorted(p)\n\nprint(sum(p[0:K]))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s407939091', 's892372483', 's767048861']
[9220.0, 9140.0, 9208.0]
[29.0, 30.0, 27.0]
[112, 93, 101]
p02628
u733866054
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K=map(int,input().split())\np=list(map(int,input().split()))\np.sort()\nprint(sum(p[0:K-1])', 'N,K=map(int,input().split())\np=list(map(int,input().split()))\n\np.sort()\nprint(sum(p[0:K]))']
['Runtime Error', 'Accepted']
['s105069007', 's668282794']
[8900.0, 9072.0]
[20.0, 28.0]
[90, 90]
p02628
u734274573
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k=map(int,input().split())\np=list(map(int,input().split()))\nprint(sum(sorted(p)[:K])', 'n,k=map(int,input().split())\np=list(map(int,input().split()))\nprint(sum(sorted(p)[:k]))\n']
['Runtime Error', 'Accepted']
['s935483085', 's698181724']
[8976.0, 9156.0]
[29.0, 30.0]
[86, 88]
p02628
u741215420
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n, k = map(int, input().split())\npr = list(map(int, input().split()))\n\npr.sort()\n\nprint(sum(pr[0:k])', 'n, k = map(int, input().split())\npr = list(map(int, input().split()))\n \npr.sort()\n \nprint(sum(pr[0:k]))']
['Runtime Error', 'Accepted']
['s852844526', 's676162102']
[8744.0, 9176.0]
[24.0, 30.0]
[100, 103]
p02628
u742960659
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K=map(int,input().split())\np=list(map(int,input().split()))\np.sort()\nans = 0\nfor i in range(K):\n ans += p[i]\n \nprint(m)\n', 'n,k = map(int,input().split())\np = list(map(int,input().split()))\np.sort()\nans = 0\nfor i in range(k):\n ans += p[i]\nprint(ans)']
['Runtime Error', 'Accepted']
['s039693904', 's746111203']
[9144.0, 9172.0]
[29.0, 30.0]
[128, 128]
p02628
u743272507
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k = map(int,input().split())\na = list(map(int,input().split()))\na.sort()\nprint(sum[:k])', 'n,k = map(int,input().split())\na = list(map(int,input().split()))\na.sort()\nprint(sum(a[:k]))\n']
['Runtime Error', 'Accepted']
['s310211592', 's527268108']
[9260.0, 9180.0]
[23.0, 30.0]
[89, 93]
p02628
u748640316
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
["n, k = [int(j) for j in input().split(' ')]\np = input().split(' ')\n\np.sort()\nsum = 0\n\nfor i in range(0,k):\n sum+=p[i]\n \nprint(sum)", "n, k = [int(j) for j in input().split(' ')]\np = input().split(' ')\n \np.sort()\nsum = 0\n \nfor i in range(0,k):\n sum+=int(p[i])\n \nprint(sum)", "n, k = [int(j) for j in input().split(' ')]\np = input().split(' ')\n \np.sort()\nsum = 0\n \nfor i in range(0,k):\n sum+=int(p[i])\n \nreturn sum", "n, k = [int(j) for j in input().split(' ')]\np = [int(j) for j in input().split(' ')]\n \np.sort()\nsum = 0\n \nfor i in range(0,k):\n sum+=p[i]\n \nprint(sum)"]
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s142255648', 's489356783', 's631121412', 's375547380']
[9120.0, 8952.0, 9044.0, 9188.0]
[31.0, 30.0, 24.0, 37.0]
[132, 139, 139, 152]
p02628
u751549333
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n = input()\nk = input()\nprice = []\ncost = 0\nfor p in range(n + 1):\n p = int(input())\n price.append(p)\n\nprice.sort(reverse = True)\nfor p in price:\n cost += p\n\nprint(price)', 'n = int(input())\nk = int(nput())\nprice = []\ncost = 0\nfor p in range(n):\n p = int(input())\n price.append(p)\n\nprice.sort()\nfor p in price:\n cost += p\n\nprint(price)', 'n = int(input())\nk = int(input())\nprice = []\ncost = 0\nfor p in range(n):\n p = int(input())\n price.append(p)\n\nprice.sort()\ndel price[k:]\nfor p in price:\n cost += p\n\nprint(cost)', 'n = int(input())\nk = int(nput())\nprice = []\ncost = 0\nfor p in range(n + 1):\n p = int(input())\n price.append(p)\n\nprice.sort()\nfor p in price:\n cost += p\n\nprint(price)', 'n = int(input())\nk = int(nput())\nprice = []\ncost = 0\nfor p in range(n):\n p = int(input())\n price.append(p)\n\nprice.sort()\nfor p in price:\n cost += p\n\nprint(price)', 'n, k, =map(int, input().split())\ncost = 0\nprice = list(map(int, input().split()))\n \nprice.sort()\ndel price[k:]\nfor p in price:\n cost += p\n\nprint(cost)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s066695017', 's336932021', 's634063067', 's698899663', 's977067762', 's690392150']
[9092.0, 9168.0, 9012.0, 9168.0, 9168.0, 9136.0]
[29.0, 21.0, 26.0, 29.0, 24.0, 33.0]
[192, 183, 196, 187, 183, 165]
p02628
u773081031
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N, K = map(int, input().split())\np = list(map(int, input().split()))\np.sort()\n\nprint(sum(p[0:K])', 'N, K = map(int, input().split())\np = list(map(int, input().split()))\np.sort()\n\nprint(sum(p[0:K]))']
['Runtime Error', 'Accepted']
['s703959961', 's575975900']
[8804.0, 9156.0]
[22.0, 30.0]
[96, 97]
p02628
u775451660
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N = int(input())\nK = int(input())\nA = list(map(int, input().split()))\nA.sort()\nprint(sum(A[0:K]))', 'N = int(input())\nK = int(input())\nA = list(map(int, input().split()))\nprint(sum(A.sort()[0:K]))', 'N, K = map(int, input().split()) \nA = list(map(int, input().split()))\nA.sort()\nprint(sum(A[0:K]))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s340669234', 's717994703', 's898402499']
[9100.0, 9164.0, 9212.0]
[27.0, 24.0, 33.0]
[97, 95, 97]
p02628
u775723163
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K = map(int,input.split())\np = map(int,input.split())\n\nprint(sum(sorted(p)[:K]\n', 'N,K = map(int,input().split())\np = list(map(int,input().split())\np.sort()\nprint(sum(p[:K]))', 'N, K = map(int, input().split())\np = map(int, input().split())\n\nprint(sum(sorted(p)[:K]))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s064749158', 's303340438', 's264483898']
[8960.0, 8884.0, 9024.0]
[27.0, 21.0, 26.0]
[81, 91, 89]
p02628
u782616557
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K=map(int,input().split())\nP=list(map(input().split()))\n\nP.sort()\nprice=0\nfor i in range(K):\n price+=P[i]\n \nprint(price)', 'N,K=map(int,input().split())\nP=list(map(int,input().split()))\n\nP.sort()\nprice=0\nfor i in range(K):\n price+=P[i]\n \nprint(price)\n']
['Runtime Error', 'Accepted']
['s151514180', 's613525476']
[9208.0, 9104.0]
[25.0, 30.0]
[124, 129]
p02628
u789565565
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['import numpy as np\nfrom itertools import combinations\nif n==1:\n print(int(input()))\nelse:\n n,k = map(int,input().split())\n lis = input().split()\n total =np.inf\n\n for i in combinations(lis,k):\n ml =0\n\n for a in i:\n\n ml += int(a)\n\n total = min(total,ml)\n\n\n print(total)', 'n,k = map(int,input().split())\nif n==1:\n print(int(input()))\nelse:\n total = 0\n lis = list(map(int,input().split()))\n lis.sort()\n for i in range(k):\n total += lis[i]\n print(total)']
['Runtime Error', 'Accepted']
['s046481568', 's319538153']
[27116.0, 9128.0]
[116.0, 35.0]
[317, 203]
p02628
u790867486
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k=map(int,input().split())\nl1=list(map(int.input().split()))\nl1.sort()\nprice = 0\ncount= 0\nfor i in range(n-1):\n if count=k:\n break\n else: \n if l1[i]!=l1[i+1]:\n price+=l1[i]\n count+=1\nprint(price) ', 'n,k=map(int,input().split())\nl1=list(map(int.input().split()))\nl1.sort()\nprice = 0\nfor i in range(n-1):\n if l1[i]!=l1[i+1]:\n price+=l1[i]\nprint(price) \n ', 'N, K = map(int, input().split())\np = list(map(int, input().split()))\nprint(sum(sorted(p)[:K]))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s509324946', 's924752409', 's494410568']
[8888.0, 9024.0, 9104.0]
[28.0, 24.0, 27.0]
[233, 163, 94]
p02628
u793430793
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
["n,k=(int(x) for x in input.split())\narray = list(map(int, input().strip().split()))\nprint(f'{n} {k}')\nprint(sum(array[0:k]))", 'n,k=(int(x) for x in input().split())\nmylist=list(map(int, input().strip().split()))\nmylist.sort()\nnum=0\nsuma=0\nwhile num < k:\n suma=suma+mylist[num]\n num += 1\nprint(suma)']
['Runtime Error', 'Accepted']
['s645404089', 's258504775']
[9104.0, 9240.0]
[22.0, 24.0]
[124, 177]
p02628
u802114399
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n, k = tuple(map(int, input.split()))\nl = list[map(int, input.split())]\ns = sum(l.sort().[:k])\nprint(s)', 'n, k = tuple(map(int, input().split()))\nl = list(map(int, input().split()))\ns = sum(sorted(l)[:k])\nprint(s)']
['Runtime Error', 'Accepted']
['s843053180', 's654662887']
[9004.0, 9148.0]
[24.0, 29.0]
[103, 107]
p02628
u809714729
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N, K = map(int, input().split())\nA = sorted(map(int, input().split()))\nprint(A[:K])', 'N, K = map(int, input().split())\nA = sorted(map(int, input().split()))\nprint(sum(A[:K]))']
['Wrong Answer', 'Accepted']
['s532645912', 's353803482']
[9260.0, 9144.0]
[28.0, 26.0]
[83, 88]
p02628
u809963697
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n, k = input().split()\nlists = list(input().split())\nfor i in range(int(n)):\n lists[i] = int(lists[i])\nlists.sort()\nfor i in range(int(k)):\n sum_fruit = sum_fruit + int(lists.pop(0))\nprint(str(sum_fruit))', 'n, k = input().split()\nlists = list(input().split())\nfor i in range(int(n)):\n lists[i] = int(lists[i])\nlists.sort()\nsum_fruit = 0\nfor i in range(int(k)):\n sum_fruit = sum_fruit + int(lists.pop(0))\nprint(str(sum_fruit))']
['Runtime Error', 'Accepted']
['s149611349', 's224840270']
[9104.0, 9236.0]
[28.0, 29.0]
[208, 222]
p02628
u813125722
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['x=input()\nif x.isupper()==True:\n print("A")\nelse:\n print("a")\n', 'N,K=map(int,input().split())\np=list(map(int,input().split()))\nprint(sum(sorted(p)[:K]))']
['Wrong Answer', 'Accepted']
['s778344249', 's668690811']
[9024.0, 9112.0]
[33.0, 32.0]
[68, 87]
p02628
u814288001
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['a,b = map(int,input().split())\nlol = [int(n) for n in input().split()]\nlol.sort()\nprint(sum(lol[:k]))', 'a,b = map(int,input().split())\nlol = [int(n) for n in input().split()]\nlol.sort()\nprint(sum(lol[:b]))']
['Runtime Error', 'Accepted']
['s131066919', 's053887979']
[9148.0, 8972.0]
[29.0, 28.0]
[101, 101]
p02628
u816631826
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N = int(input())\nK = int(input())\nprices = list()\nfor i in range(N):\n prices.append(int(input()))\nsum = 0\nfor i in prices:\n x = min(prices)\n sum = sum + x\n prices.remove(x)\n K = K - 1\n if K == 0: break\nprint(sum)', '\ndef main():\n \n kinds = list(map(int,input().split()))\n prices = list(map(int,input().split()))\n \n minPrice = 0\n \n for item in range(kinds[1]):\n minPrice += min(prices)\n prices.remove(min(prices))\n\n print(minPrice) \n \n \n\nif __name__ == "__main__":\n main()']
['Runtime Error', 'Accepted']
['s517539514', 's974203752']
[9124.0, 9100.0]
[27.0, 43.0]
[230, 308]
p02628
u820031813
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['init = input().split()\nN = int(init[0])\nK = int(init[1])\n\nprices = [int(input()) for i in range(N)]\nprices.sort()\n\nsum = 0\nfor i, ele in enumerate(prices):\n if i == K:\n break\n else\n \tsum = sum + ele\nprint(sum)', 'init = input().split()\nN = int(init[0])\nK = int(init[1])\n \nprices = [int(input()) for i in range(N)]\nprices.sort()\n \nsum = 0\nfor i, ele in enumerate(prices):\n if i >= K:\n break\n else\n \tsum = sum + ele\nprint(sum)', 'init = input().split()\nN = int(init[0])\nK = int(init[1])\n \nprices = list(map(int, input().split()))\nprices.sort()\n \nsum = 0\nfor i, ele in enumerate(prices):\n if i >= K:\n break\n else:\n \tsum = sum + ele\nprint(sum)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s464636105', 's909711506', 's268621735']
[9032.0, 9032.0, 8908.0]
[24.0, 26.0, 33.0]
[215, 217, 217]
p02628
u827554201
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['\nN, K, *p = map(int, open(0).read().split())\n\nimport itertools\nlis = list(itertools.combinations(range(N), 3))\n\nif len(lis) == 0:\n print(p[0])\n import sys\n sys.exit()\n\nmi = -1\nfor x in lis:\n cur = 0\n for pos in x:\n cur += p[pos]\n\n print(cur)\n\n if mi == -1:\n mi = cur\n else:\n mi = min(mi, cur)\n\nprint(mi)\n#print(lis)\n', 'N, K, *p = map(int, open(0).read().split())\n\nsortp = sorted(p)\n\nans = 0\nfor x in range(K):\n ans += sortp[x]\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s769942140', 's529015244']
[1971504.0, 9240.0]
[2282.0, 28.0]
[361, 122]
p02628
u842388336
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n, k = map(int, input().split())\nlist_ = list(map(int, input().split()))\nsorted(list_)\n\nprint(sum(list_[:k]))', 'n, k = map(int, input().split())\nlist_ = list(map(int, input().split()))\nlist_ = sorted(list_)\n\nprint(sum(list_[:k]))']
['Wrong Answer', 'Accepted']
['s058585596', 's966473224']
[9160.0, 9244.0]
[32.0, 32.0]
[109, 117]
p02628
u844558673
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k=map(int,input().split())\np=input().split()\np1=sorted(p)\nc = 0\nfor i in range(k):\n c += int(p1[i])\nprint(c)', 'n,k=map(int,input().split())\np=input().split()\np1=sorted(p)\nc = 0\nfor i in range(k-1):\n c += int(p1[i])\nprint(c)', 'n,k=map(int,input().split())\np=input().split()\np2=[]\nfor i in range(n):\n p3=int(p[i])\n p2.append(p3)\np1=sorted(p2)\nc = 0\nfor i in range(k):\n c += int(p1[i])\nprint(c)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s276122695', 's612269161', 's175804362']
[9208.0, 9204.0, 9220.0]
[30.0, 27.0, 29.0]
[111, 113, 168]
p02628
u845847173
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n, k = map(int, input().split())\np = [int(e) for e in input().split()]\n\np.sort\n\nans = 0\nfor i in range(k):\n ans += p[i]\n\nprint(ans)', 'n, k = map(int, input().split())\np = [int(e) for e in input().split()]\n\np.sort()\n\nans = 0\nfor i in range(k):\n ans += p[i]\n\nprint(ans)']
['Wrong Answer', 'Accepted']
['s044028202', 's735728291']
[9128.0, 9172.0]
[33.0, 26.0]
[134, 136]
p02628
u854931881
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['s=input()\nif s.isupper():\n print("A")\nelse:\n print("a")', 'n,k=map(int,input().split())\np=list(map(int,input().split()))\np=sorted(p)\ntotal=0\nfor i in range(k):\n total+=p[i]\nprint(total)']
['Wrong Answer', 'Accepted']
['s338038315', 's690912444']
[9100.0, 9252.0]
[27.0, 32.0]
[55, 126]
p02628
u855804009
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N, K = input().split()\np = [int(i) for i in input().split()]\np_ascending = p.sort()\ntotal = 0\nfor i in p_ascending[0,int(K)]:\n total += i\n \nprint(total)\n ', 'N, K = int(input())\np = [int(i) for i in input().split()]\np_ascending = p.sort()\ntotal = 0\nfor i in p_ascending[0,K]:\n total += i\n \nprint total\n ', 'N, K = map(int, input().split())\np = [int(i) for i in input().split()]\np.sort()\ntotal = 0\nfor i in p[:int(K)]:\n total += i\n \nprint(total)\n ']
['Runtime Error', 'Runtime Error', 'Accepted']
['s340596118', 's489786833', 's315312595']
[9184.0, 8964.0, 9156.0]
[25.0, 23.0, 30.0]
[157, 148, 142]
p02628
u859021444
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n, k = map(int, input().split())\np = list(map(int, input().split()))\n\np.sort()\nprint(sum(p[0:k])', 'length= int(input())\nnum=int(input())\ni=0\nj=0\np=0\nfruits=[]\nfor i in range(length):\n\tfruits.append(int(input())\nfruits.sort()\nfor j in range(num):\n\tp+=fruits[j]\nprint(p)\n# for x in fruits:\n# \tprint(x)', 'n, k = map(int, input().split())\nj=0\np=0\nfruits= list(map(int, input().split()))\nfruits.sort()\nfor j in range(k):\n\tp+=fruits[j]\nprint(p)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s593349336', 's828825491', 's605568684']
[8936.0, 8920.0, 9208.0]
[23.0, 21.0, 27.0]
[96, 200, 136]
p02628
u861886710
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N, K = list(map(int, input().split()))\nP = list(map(int, input().split()))\nP = sorted(P)\nprint(P)\nP = P[0:K]\nprint(sum(P))\n\n\n', 'N, K = list(map(int, input().split()))\nP = list(map(int, input().split()))\nP = sorted(P)\nP = P[0:K]\nprint(sum(P))']
['Wrong Answer', 'Accepted']
['s537215592', 's034649619']
[9236.0, 9204.0]
[27.0, 33.0]
[125, 113]
p02628
u865728927
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K = map(int,input().split())\nli = [int(i) for i in input().split()]\ntotal = 0\n\nfor _ in range(K):\n\ttotal += min(li)\n\tli = li.remove(min(li))\n\nprint(total)', 'N,K = map(int,input().split())\nli = [int(i) for i in input().split()]\ntotal = 0\n \nfor _ in range(K):\n\ttotal += min(li)\n\tli.remove(min(li))\n \nprint(total)']
['Runtime Error', 'Accepted']
['s172660611', 's087563247']
[9168.0, 9244.0]
[27.0, 49.0]
[156, 153]
p02628
u866747430
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['_, k = input().split()\n \nprices = input().split().map(lambda x : int(x))\n \nprices.sort()\n \nsum = 0\nfor i in range(int(k)):\n\tsum += prices[i]\nprint(sum)', '_, k = input().split()\n \nprices = input().split().map(lambda x : int(x))\n \nprices.sort()\n \nsum = 0\nfor i in range(k):\n\tsum += prices[i]\nprint(sum)', '_, k = input().split()\n \nprices = list(input().split().map(lambda x : int(x)))\n \nprices.sort()\n \nsum = 0\nfor i in range(int(k)):\n\tsum += prices[i]\nprint(sum)', '_, k = input().split()\n\nprices = input().split().map(lambda x : int(x))\n\nprices.sort()\n\nsum = 0\nfor i in range(k):\n\tsum += prices(i)\nprint(sum)', '_, k = input().split()\n \nprices = list(map(lambda x : int(x), input().split()))\n \nprices.sort()\n \nsum = 0\nfor i in range(int(k)):\n\tsum += prices[i]\nprint(sum)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s429857471', 's723221123', 's742308300', 's868423786', 's929755104']
[9032.0, 9036.0, 8984.0, 9100.0, 9144.0]
[25.0, 26.0, 28.0, 22.0, 25.0]
[151, 146, 157, 143, 158]
p02628
u867826040
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['#define _GLIBCXX_DEBUG\n\n#include <bits/stdc++.h>\nusing namespace std;\n\nint main() {\n int n,k,ans = 0;\n cin >> n >> k;\n vector<int> p(n);\n rep(i,n) cin >> p[i];\n sort(p.begin(), p.end());\n rep(i,k) ans+=p[i];\n cout << ans << endl;\n}', 'n,k = map(int,input().split())\np = list(map(int,input().split()))\np.sort()\nprint(sum(p[:k]))']
['Runtime Error', 'Accepted']
['s684704774', 's466716645']
[8928.0, 9244.0]
[26.0, 29.0]
[303, 92]
p02628
u869474504
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N, K = map(int, input().strip().split())\np = list(map(int, input().strip().split()))\np.sort()\nprint(sum(p[:K+1]))', 'N, K = map(int, input().strip().split())\np = list(map(int, input().strip().split()))\np = sorted(p)\nprint(sum(p[:K]))']
['Wrong Answer', 'Accepted']
['s662494483', 's360325808']
[9036.0, 9192.0]
[30.0, 27.0]
[113, 116]
p02628
u873543537
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K = map(int,input().split())\np = list(map(int,input().split()))\nsorted(p)\nprint(p[0]+p[1]+p[2])', 'N,K = map(int,input().split())\np = list(map(int,input().split()))\np.sort()\nif len(p) >= 3:\n print(p[0]+p[1]+p[2])\nelse if len(p) == 2:\n print(p[0] + p[1])\nelse:\n print(p[0])\n ', 'N,K = map(int,input().split())\np = list(map(int,input().split()))\np.sort()\ncount = 0\nif len(p) >= K:\n for i in range(K):\n count = count + p[i]\nelse:\n for i in p:\n count = count + i\n \nprint(count)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s527614118', 's679974144', 's808964799']
[9220.0, 8960.0, 9276.0]
[30.0, 27.0, 28.0]
[97, 187, 222]
p02628
u874092557
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K = map(int,input().split())\nfruit = [int(i) for i in input().split()]\n\nfruit.sort()\nprice = 0\nfor i in range(N) :\n if i>3 :\n break\n price += fruit[i]\n \nprint(price)', 'N,K = map(int,input().split())\nfruit = [int(i) for i in input().split()]\n\nfruit.sort()\nprice = 0\nfor i in range(N) :\n if i>K-1 :\n break\n price += fruit[i]\n \nprint(price)']
['Wrong Answer', 'Accepted']
['s214629676', 's222066079']
[9244.0, 9144.0]
[28.0, 30.0]
[183, 185]
p02628
u878114269
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k = input().split()\na = list()\na = input().split(" ")\na.sort()\n#while i<int(k): \n # print(a[i])\n # i-=1\nk = int(k)\ni = 0\nsum = 0\nwhile i<k:\n print(int(a[i]))\n sum+=int(a[i])\n i+=1\n \nprint(sum)', 'n,k = input().split()\na = list()\na = input().split(" ")\na.sort()\n\nk = int(k)\ni = 0\nsum = 0\nwhile i<k:\n sum+=int(a[i])\n i+=1\n \nprint(sum)', 'n,k = input().split()\nk = int(k)-1\na = list()\na = input().split(" ")\nb = list()\nfor i in a:\n b.append(int(i))\nb.sort()\nsum = 0\nwhile k>=0:\n sum += b[k]\n k -= 1\nprint(sum)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s382866560', 's505079124', 's413607079']
[9236.0, 9096.0, 9176.0]
[26.0, 27.0, 29.0]
[210, 145, 179]
p02628
u882831132
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N, K = list(map(int, input().split()))\np = list(map(int, input().split()))\n\np = sorted(p)\n\nprint(sum(p[:N]))', 'N, K = list(map(int, input().split()))\np = list(map(int, input().split()))\n\np = sorted(p)\n\nprint(sum(p[:K]))']
['Wrong Answer', 'Accepted']
['s948687302', 's571266887']
[9260.0, 9276.0]
[33.0, 30.0]
[108, 108]
p02628
u883237011
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['m, k = map(int, input(.split()))\narray = list(map(int, input().split()))\n\narray.sort()\nprint(sum(array[:k]))\n', 'm, k = map(int, input().split())\narray = list(map(int, input().split()))\n\narray.sort()\nprint(sum(array[:k]))']
['Runtime Error', 'Accepted']
['s359016974', 's606785430']
[9004.0, 9244.0]
[25.0, 23.0]
[109, 108]
p02628
u886921509
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N = int(input())\nK = int(input())\nvalue = []\nsum = 0\n\nfor i in range(N):\n value.append(int(input())) \nnewValue = sorted(value)\n\nfor j in range(K):\n sum = sum + newValue[j]\n\nprint(sum)', 'N = list(map(int,input().split()))\nvalue = list(map(int,input().split()))\nsum = 0\nnewValue = sorted(value)\nfor i in range(N[1]):\n sum = sum + newValue[i]\nprint(sum)']
['Runtime Error', 'Accepted']
['s325509745', 's541536621']
[9168.0, 9272.0]
[25.0, 24.0]
[189, 167]
p02628
u887080361
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['nk=input().split()\nn=int(nk[0])\nk=int(nk[1])\ndata=list(map(int,input().split()))\ndata2=data.sort()\ns=0\nfor i in range(k):\n s += data2[i]\nprint(s)', 'nk=input().split()\nn=int(nk[0])\nk=int(nk[1])\ndata=list(map(int,input().split()))\ndata.sort()\ns=0\nfor i in range(k):\n s += data[i]\nprint(s)']
['Runtime Error', 'Accepted']
['s490792428', 's041959992']
[9188.0, 9192.0]
[28.0, 32.0]
[148, 141]
p02628
u888260487
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k=map(int,input().split())\np=[]\nfor i in range(n):\n x=int(input())\n p.append(x)\np.sort()\ny=0\nfor i in range(k):\n y=y+p[i]\nprint(y)', 'n,k=map(int,input().split())\np=[]\na,*b=map(int,input().split())\np.append(a)\nfor i in range(len(b)):\n p.append(b[i])\np.sort()\ny=0\nfor i in range(k):\n y=y+p[i]\nprint(y)']
['Runtime Error', 'Accepted']
['s311656858', 's258208406']
[9164.0, 9192.0]
[25.0, 33.0]
[135, 172]
p02628
u888881904
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n, k = map(int, input().split())\np = list(map(int,input().split()))\n\nans = 0\n\nfor i in range(k):\n ans += p[i]\n\nprint(ans)', 'n, k = map(int, input().split())\np = list(map(int,input().split()))\n\np = sorted(p)\n\nans = 0\n\nfor i in range(k):\n ans += p[i]\n\nprint(ans)']
['Wrong Answer', 'Accepted']
['s926763344', 's214184935']
[9240.0, 9268.0]
[26.0, 27.0]
[124, 139]
p02628
u893197162
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n,k= map(int,input().split())\ns = map(int,input().split())\ns.sort()\nprint(sum(s[:k]))', 'n,k= map(int,input().split())\ns = map(int,input().split())\nli = list(s)\nli.sort()\nprint(sum(li[:k]))\n']
['Runtime Error', 'Accepted']
['s414967459', 's616387894']
[9044.0, 9088.0]
[26.0, 27.0]
[85, 101]
p02628
u895153066
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N,K = map(int, input().split())\np = input().split()\n\np.sort()\nprint(sum(p[0:k]))\n', 'N,K = map(int, input().split())\np = list(map(int, input().split()))\n\np.sort()\nprint(sum(p[0:K]))\n\n']
['Runtime Error', 'Accepted']
['s348710451', 's742564107']
[9208.0, 9268.0]
[27.0, 24.0]
[81, 98]
p02628
u904995051
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['#ABC171B\nn,k = map(int,input().split())\np = sorted(list(map(int,inout().split())))\nprint(sum(p[:k]))', '#ABC171B\nn,k = map(int,input().split())\np = sorted(list(map(int,input().split())))\nprint(sum(p[:k]))']
['Runtime Error', 'Accepted']
['s353696503', 's623587340']
[9072.0, 9224.0]
[30.0, 27.0]
[100, 100]
p02628
u907261228
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['import collections\n\ns = [int(i) for i in input().split(" ")]\nprint(s)\np = [int(i) for i in input().split(" ")]\nprint(p)\na = []\np.sort()\nprint(p)\n\nfor i in range(0,s[1]):\n\ta = p[i]\nb = [int(b) for b in a]\nprint(sum(b))\n', 'import collections\n\ns = [int(i) for i in input().split(" ")]\nprint(s)\np = [int(i) for i in input().split(" ")]\nprint(p)\np.sort()\nprint(p)\na = []\n\nfor i in range(0,s[1]):\n\ta.append(p[i])\nprint(sum(a))\n', 'import collections\n\ns = [int(i) for i in input().split(" ")]\np = [int(i) for i in input().split(" ")]\np.sort()\na = []\n\nfor i in range(0,s[1]):\n\ta.append(p[i])\nprint(sum(a))']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s090342159', 's196893722', 's178597323']
[9596.0, 9596.0, 9596.0]
[28.0, 30.0, 29.0]
[218, 200, 172]
p02628
u909359131
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n = input()\nm = n.split()\nl = m[2:]\ns = sorted(l, reverse=True)\np = 0\nfor i in range(0,int(m[1])):\n p = p + int(l[i])\nprint(int(p))', 'n = input()\nm = n.split()\nprint(m)\na = [input() for l in range(0,1)]\nb = a[0].split()\nprint(b)\n\nfor i in range(0, len(b)):\n b[i] = int(b[i])\n\nc = sorted(b, reverse=True)\nprint(c)\np = 0\nfor i in range(int(m[0]) - int(m[1]),int(m[0])):\n p = p + int(c[i])\nprint(int(p))', 'n = input()\nm = n.split()\na \n\nfor i in range(0, len(m)):\n m[i] = int(m[i])\na = m[0]\nb = m[1]\nm = m[2:]\nprint(m,a,b)\n\np = 0\nfor i in range(a-b,a):\n p = p + int(c[i])\nprint(int(p))', 'n = input()\nm = n.split()\nprint(m)\nl = m[2:]\na = sorted(l, reverse=True)\np = 0\nfor i in range(0,int(m[1])):\n p = p + int(c[i])\nprint(int(p))', 'n = input()\nm = n.split()\nfor i in range(0, len(m)):\n m[i] = int(m[i])\na = m[0]\nb = m[1]\nm = m[2:]\n\np = 0\nfor i in range(a-b,a):\n p = p + int(c[i])\nprint(int(p))', 'n = input()\nm = n.split()\nprint(m)\na = [input() for l in range(0,1)]\nb = a[0].split()\nprint(b)\n\nfor i in range(0, len(b)):\n b[i] = int(b[i])\n\nc = sorted(b, reverse=True)\nprint(c)\np = 0\nfor i in range(int(m[0]) - int(m[1]),int(m[0])):\n p = p + int(c[i])\nprint(p)', 'n = input()\nm = n.split()\nl = m[2:]\na = sorted(l, reverse=True)\np = 0\nfor i in range(0,int(m[1])):\n p = p + int(c[i])\nprint(int(p))', 'n = input()\nm = n.split()\nfor i in range(0, len(m)):\n m[i] = int(m[i])\na = m[0]\nb = m[1]\nm = m[2:]\np = 0\nfor i in range(a-b,a):\n p = p + int(m[i])\nprint(int(p))', 'n = input()\nm = n.split()\nprint(m)\na = [input() for l in range(0,1)]\nb = a[0].split()\nprint(b)\n\nfor i in range(0, len(b)):\n b[i] = int(b[i])\n\nc = sorted(b, reverse=True)\nprint(c)\np = 0\nfor i in range(int(m[0]) - int(m[1])+1,int(m[0])+1):\n p = p + int(c[i])\nprint(int(p))', 'n = input()\nm = n.split()\nprint(m)\na = [input() for l in range(0,1)]\nb = a[0].split()\nprint(b)\n\nfor i in range(0, len(b)):\n b[i] = int(b[i])\n\nc = sorted(b, reverse=True)\nprint(c)\np = 0\nfor i in range(int(m[0]) - int(m[1]),int(m[0])):\n p = p + int(c[i])\nprint(int(p))', 'n = input()\nm = n.split()\na = [input() for l in range(0,1)]\nb = a[0].split()\nfor i in range(0, len(b)):\n b[i] = int(b[i])\nc = sorted(b, reverse=True)\np = 0\nfor i in range(int(m[0]) - int(m[1]),int(m[0])):\n p = p + int(c[i])\nprint(p)']
['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted']
['s241461234', 's255968729', 's322257452', 's338506086', 's570735344', 's731082492', 's760838887', 's831809467', 's875933778', 's914860572', 's668879951']
[9180.0, 9144.0, 9040.0, 9184.0, 9056.0, 9164.0, 9200.0, 9120.0, 9276.0, 9076.0, 9228.0]
[25.0, 33.0, 27.0, 26.0, 24.0, 28.0, 26.0, 21.0, 24.0, 27.0, 33.0]
[134, 272, 184, 143, 167, 267, 134, 166, 276, 272, 238]
p02628
u909643606
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n, k = [int(i) in input().split()]\np = [int(i) in input().split()]\np.sort()\nprint(sum(p[:k])', 'n, k = [int(i) for i in input().split()]\np = [int(i) for i in input().split()]\np.sort()\nprint(sum(p[:k]))']
['Runtime Error', 'Accepted']
['s701086046', 's487198398']
[8976.0, 9240.0]
[23.0, 29.0]
[92, 105]
p02628
u909851424
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N, K = map(int, input().split())\np = []\nfor i in range(N):\n p.append(int(input()))\np.sort()\n\nprice = 0\nfor j in range(3):\n price += p[j]\nprint(price)', 'N, K = map(int, input().split())\np = []\nfor i in range(N):\n p.append(int(input()))\np.sort()\n\nprice = 0\nif N > 0:\n for j in range(3):\n price += p[j]\nprint(price)', 'N, K = map(int, input().split())\np = []\nfor i in range(N):\n p.append(int(input()))\np.sort()\n\nprice = 0\nfor i in range(3):\n price += p[i]\nprint(price)', 'N, K = map(int, input().split())\np = [int(x) for x in input().split()]\np.sort()\n\nprice = 0\nif N > 0:\n for j in range(K):\n price += p[j]\nprint(price)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s702167839', 's922162196', 's990181536', 's547508114']
[9168.0, 9124.0, 9176.0, 9248.0]
[29.0, 23.0, 25.0, 32.0]
[155, 173, 155, 158]
p02628
u910426639
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['N, K = map(int, input().split())\n\np = list(map(int, input().split()))\n\np = sorted(p)\n\nprint(p)\n\nans = 0\nfor i in range(K):\n ans += p[i]\n\nprint(ans)', 'N, K = map(int, input().split())\n\np = list(map(int, input().split()))\n\np = sorted(p)\n\n\nans = 0\nfor i in range(K):\n ans += p[i]\n\nprint(ans)']
['Wrong Answer', 'Accepted']
['s566286569', 's264310153']
[9256.0, 9260.0]
[36.0, 28.0]
[150, 141]
p02628
u912728973
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n, k = map(int, input().sprit())\na = list(map(int, input().sprit()))\na.sort()\nb = 0\nfor i in range(k):\n\tb += a[i]\nprint(b)', 'n, k = map(int,input().sprit())\na = list(map(int,input().sprit()))\na.sort()\nb = 0\nfor i in range(k)\n\tb += a[k]\nprint(b)', 'a = list(map(int,input().sprit()))\nb = list(map(int,input().sprit()))\nb.sort()\nc = 0\nfor i in range(a[1])\n\tc += b[i]\nprint(c)', 'n, k = map(int, input().sprit())\na = list(map(int, input().sprit()))\na.sort()\nb = 0\nfor i in range(k):\n\tb+=a[i]\nprint(b)', 'n, k = map(int,input().sprit())\na = list(map(int,input().sprit()))\na.sort()\nb = 0\nfor i in range(k):\n\tb += a[k]\nprint(b)', 'a = list(map(int,input().sprit()))\nfor i in range(a[0])\n\tb = list(map(int,input().sprit()))\nb.sort()\nc = 0\nfor i in range(a[1])\n\tc += b[i]\nprint(b)', 'n, k = map(int, input().split())\np = list(map(int, input().split()))\np.sort()\ntotal = 0\nfor i in range(k):\n total+=p[i]\nprint(total)']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s126130285', 's330856528', 's388731513', 's414959785', 's610187666', 's831861460', 's343351001']
[9088.0, 8872.0, 8864.0, 8992.0, 9024.0, 8884.0, 9136.0]
[25.0, 27.0, 26.0, 26.0, 27.0, 25.0, 29.0]
[122, 119, 125, 120, 120, 148, 135]
p02628
u919681556
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['n, k = int(input()), int(input())\nlst = []\nresult = []\nfor i in range(n):\n lst.append(int(input()))\nfor i in range(k):\n temp = min(lst)\n result.append(temp)\n lst.remove(temp)\nprint(sum(result))', 'n = int(input())\nk = int(input())\nlst = []\nresult = []\nfor i in range(n):\n lst.append(int(input()))\nfor i in range(k):\n temp = min(lst)\n result.append(temp)\n lst.remove(temp)\nprint(sum(result))', 'n = list(int(num) for num in input().strip().split())\nlst = list(int(num) for num in input().strip().split())[:n[0]]\nresult = []\nfor i in range(n[1]):\n temp = min(lst)\n result.append(temp)\n lst.remove(temp)\nprint(sum(result))']
['Runtime Error', 'Runtime Error', 'Accepted']
['s296136652', 's410590725', 's105436275']
[9128.0, 9212.0, 9256.0]
[26.0, 29.0, 39.0]
[205, 205, 234]
p02628
u925478395
2,000
1,048,576
A shop sells N kinds of fruits, Fruit 1, \ldots, N, at prices of p_1, \ldots, p_N yen per item, respectively. (Yen is the currency of Japan.) Here, we will choose K kinds of fruits and buy one of each chosen kind. Find the minimum possible total price of those fruits.
['a,b = input()\nlistA = list(map(int,input().split()))\nlistA.sort()\nall = 0\n\nfor i in range(b):\n all = all + list[i]\n\nprint(all)', 'a,b = map(int,input().split())\nlistA = list(map(int,input().split()))\nlistA.sort()\nall = 0\n\nfor i in range(b):\n all = all + listA[i]\n\nprint(all)']
['Runtime Error', 'Accepted']
['s307079771', 's729150500']
[8964.0, 9224.0]
[27.0, 25.0]
[127, 145]