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 | u220085075 | 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()))\na=0\nfor i in range(k-1):\n a+=p[i]\nprint(a)', 'n,k=map(int,input().split())\np=list(map(int,input().split()))\np=sorted(p)\na=0\nfor i in range(k-1):\n a+=p[i]\nprint(a)', 'n,k=map(int,input().split())\np=list(map(int,input().split()))\np=sorted(p)\na=0\nfor i in range(k):\n a+=p[i]\nprint(a)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s044129565', 's202079604', 's902742055'] | [9236.0, 9176.0, 9240.0] | [31.0, 31.0, 29.0] | [105, 117, 115] |
p02628 | u220499476 | 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())\ns = list(map(int,input().split()))\nans = 0\ns = s.sort()\nfor _ in range(m):\n ans += s[_]\nprint(ans)', 'n, m =map(int,input().split())\ns = list(map(int,input().split()))\nans = 0\ns.sort()\nfor _ in range(m):\n ans += s[_]\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s153708020', 's293155732'] | [9176.0, 9144.0] | [23.0, 28.0] | [130, 126] |
p02628 | u223215060 | 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 , x = map(int,input().split())\nprice_list = list(map(int,input().split()))\nld = sorted(price_list, reverse=True)\nsum = 0\nfor i in range(x):\n sum += ld[i]\nprint(sum)', 'n , x = map(int,input().split())\nprice_list = list(map(int,input().split()))\nld = sorted(price_list, reverse=False)\nsum = 0\nfor i in range(x):\n sum += ld[i]\nprint(sum)'] | ['Wrong Answer', 'Accepted'] | ['s081615545', 's835582340'] | [9244.0, 9208.0] | [25.0, 29.0] | [167, 168] |
p02628 | u232903302 | 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()\nsum(p[:k])', 'N, k = map(int,input().split())\np = list(map(int,input().split()))\np.sort()\nprint(sum(p[:k]))'] | ['Wrong Answer', 'Accepted'] | ['s344568899', 's862050838'] | [9176.0, 9240.0] | [27.0, 35.0] | [86, 93] |
p02628 | u237634011 | 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()\nprice = 0\n\nfor p in range(k):\n price += p[k]\n \nprint(price)', 'n, k = map(int, input().split())\np = list(map(int, input().split()))\np.sort()\nprice = 0\n\nfor p in range(k):\n price += p[k]\n \nprint(price)', 'n, k = map(int, input().split())\np = list(map(int, input().split()))\np.sort()\nfor i in range(k):\n price += p[i]\nprint(price)', 'n, k = map(int, input().split())\np = list(map(int, input().split()))\np.sort()\nprice = 0\n\nfor i in range(k):\n price += p[i]\n \nprint(price)\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s273524932', 's356473446', 's960135663', 's455376640'] | [9264.0, 9116.0, 9248.0, 9240.0] | [24.0, 24.0, 25.0, 27.0] | [139, 138, 125, 140] |
p02628 | u238801602 | 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 = input().split()\na = [int(i) for i in a]\nla = sorted(a)\nsum(la[:K])', 'N,K = map(int,input().split())\na = input().split()\na = [int(i) for i in a]\nla = sorted(a)\nprint(sum(la[:K]))'] | ['Wrong Answer', 'Accepted'] | ['s215594092', 's018698126'] | [9244.0, 9208.0] | [26.0, 28.0] | [101, 108] |
p02628 | u244466744 | 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()))\n\nA.sort(reverse = True)\nmin = 0\n\nfor i in range(K):\n min += A[i]\n \nprint(min)', 'N, K = map(int, input().split())\nA = list(map(int, input().split()))\n\nA.sort()\nmin = 0\n\nfor i in range(K):\n min += A[i]\n \nprint(min)\n'] | ['Wrong Answer', 'Accepted'] | ['s382077662', 's779010738'] | [9148.0, 9036.0] | [25.0, 24.0] | [148, 135] |
p02628 | u244836567 | 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().split()\na=int(a)\nb=int(b)\nc=list(map(int,input().split()))\nd=0\nfor i in range(b):\n d=d+c[i]\nprint(d)', 'a,b=input().split()\na=int(a)\nb=int(b)\nc=list(map(int,input().split()))\nd=0\nc.sort()\nfor i in range(b):\n d=d+c[i]\nprint(d)'] | ['Wrong Answer', 'Accepted'] | ['s847361244', 's671085131'] | [9096.0, 9156.0] | [30.0, 27.0] | [113, 122] |
p02628 | u245960901 | 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\ns = list(map(int,input().split()))\nn=s[0]\nk=s[1]\ns = list(map(int, input().split()))\ns.sort()\nprint(s)\ns=np.array(s[0:k])\nprint(np.sum(s))\n\n', 'import numpy as np\ns = list(map(int,input().split()))\nn=s[0]\nk=s[1]\ns = list(map(int, input().split()))\ns.sort()\nprint(s)\ns=np.array(s[0:k])\nprint(np.sum(s))\n\n', 'import numpy as np\ns = list(map(int,input().split()))\nn=s[0]\nk=s[1]\ns = list(map(int, input().split()))\ns.sort()\ns=np.array(s[0:k])\nprint(np.sum(s))\n\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s576610488', 's704551026', 's822160736'] | [27240.0, 27332.0, 27360.0] | [137.0, 128.0, 135.0] | [159, 159, 150] |
p02628 | u248364740 | 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\n# -*- coding: utf-8 -*-\n\nN, K = map(int, input().split())\nA = list(map(int, input().split()))\nresult = 0\nfor i in range(N):\n for j in range(i):\n if A[i-j-1] > A[i-j]:\n tmp = A[i-j]\n A[i-j] = A[i-j-1]\n A[i-j-1] = tmp\n print(A)\n\nfor i in range(K):\n result += A[i]\n\nprint(result)\n\n', '#!/usr/bin/env python\n# -*- coding: utf-8 -*-\n\nN, K = map(int, input().split())\nA = list(map(int, input().split()))\nresult = 0\nfor i in range(N):\n for j in range(i):\n if A[i-j-1] > A[i-j]:\n tmp = A[i-j]\n A[i-j] = A[i-j-1]\n A[i-j-1] = tmp\n\nfor i in range(K):\n result += A[i]\n\nprint(result)\n\n'] | ['Runtime Error', 'Accepted'] | ['s327444590', 's661738738'] | [137768.0, 9116.0] | [1898.0, 201.0] | [353, 336] |
p02628 | u248670337 | 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=int(input()[-1])\nprint(sum(sorted(list(map(int,input().split()))[:k])))', 'n,k,*p=map(int,open(0).read().split());print(sum(sorted(p)[:k]))'] | ['Wrong Answer', 'Accepted'] | ['s901963468', 's785161467'] | [9192.0, 9256.0] | [25.0, 28.0] | [73, 64] |
p02628 | u249077731 | 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() # 5 3\nb = input() # 50 100 80 120 80\nc = a.split() \nd = b.split()\ne = sorted(d) # 50 80 80 100 120\nf = int(c[1])\nfor i in range(f):\n print(e[i])', 'a,b = map(int,input().split())\nprice = [int(s) for s in input().split()]\npric = sorted(price)\nsum = 0\nfor i in range(b):\n sum += int(pric[i])\nprint(sum)'] | ['Wrong Answer', 'Accepted'] | ['s690181135', 's330247177'] | [9160.0, 9200.0] | [27.0, 27.0] | [157, 155] |
p02628 | u256363575 | 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(list(map(int,input().split())))\nprint(sum(p[0:2]))', 'N,K = map(int, input().split())\np=sorted(list(map(int,input().split())))\nprint(sum(p[0:K]))'] | ['Wrong Answer', 'Accepted'] | ['s978497808', 's431881124'] | [9256.0, 9152.0] | [28.0, 33.0] | [91, 91] |
p02628 | u260068288 | 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()))\nl1 = sorted(l, reverse= False)\nsum = sum(l[0:3])\nprint(sum)', 'n,k = map(int, input().split())\nl = list(map(int, input().split()))\nl1 = sorted(l, reverse= False)\nsum = sum(l1[0:k])\nprint(sum)'] | ['Wrong Answer', 'Accepted'] | ['s898634463', 's496971733'] | [9188.0, 9072.0] | [28.0, 29.0] | [127, 128] |
p02628 | u261427665 | 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 sys\ndef order (p):\n return (sorted(p)) \ndef Mix_Juice (p):\n p[0] = len (p)\n p[1] = K\n a = order (p[2:p[0]])\n b = 0\n for i in range (0, K-1):\n b = b + a[i]\n return b\np = list(map(int, input().split()))\nMix_Juice (p)', 'import sys\ndef order (p):\n return (sorted(p)) \ndef Mix_Juice (p):\n p[1] = K\n a = order (p[2:])\n b = 0\n for i in range (0, K):\n b = b + a[i]\n return b\np = list(map(int, input().split()))\nMix_Juice (p)', 'n = input()\nm = n.split()\na = [input() for l in range(0,1)]\nb = a[0].split()\n\nfor i in range(0, len(b)):\n b[i] = int(b[i])\n\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])\n', 'import sys\ndef order (p):\n return (sorted(p)) \ndef Mix_Juice (p, K):\n N = len (p)\n a = order (p)\n b = 0\n for i in range (0, K):\n b = b + a[i]\n return b\nN,K = map(int, input().split())\np = list(map(int, input().split()))\nMix_Juice (p,K)', 'n = input()\nm = n.split()\n\na = [input() for l in range(0,1)]\nb = a[0].split()\n\n\nfor i in range(0, len(b)):\n b[i] = int(b[i])\n\nc = sorted(b, reverse=True)\n\np = 0\nfor i in range(int(m[0]) - int(m[1]),int(m[0])):\n p = p + int(c[i])\nprint(int(p))'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s525257323', 's669044566', 's890186540', 's946346136', 's849311336'] | [9200.0, 9120.0, 9152.0, 9196.0, 9164.0] | [25.0, 28.0, 30.0, 23.0, 30.0] | [257, 232, 232, 268, 248] |
p02628 | u262039080 | 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=map(int,input().split())\nAA=list(A)\nlist.sort(AA,reverse=False)\nprint(AA)\nans=int(0)\nfor i in range(K):\n ans += AA[i]\nprint(ans)\n', 'N, K=map(int,input().split())\nA=map(int,input().split())\nAA=list(A)\nlist.sort(AA,reverse=False)\nans=int(0)\nfor i in range(K):\n ans += AA[i]\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s589423389', 's757239386'] | [9056.0, 9236.0] | [36.0, 38.0] | [164, 154] |
p02628 | u262227581 | 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[:K]', 'N,K=map(int,input().split())\np=list(map(int,input().split()))\np.sort()\nprint(sum(p[:K]))'] | ['Runtime Error', 'Accepted'] | ['s399990500', 's443427478'] | [9028.0, 9244.0] | [20.0, 26.0] | [86, 88] |
p02628 | u264210020 | 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())\nnewlist = sorted(p, reverse=False)\nans_list=[]\nfor i in range(1,K+1):\n ans.append(newlist[i-1])\nprint(sum(ans_list))\n', 'N, K = map(int,input().split())\np = map(int,input().split())\nnewlist = sorted(p, reverse=False)\nans_list=[]\nfor i in range(1,K+1):\n ans_list.append(newlist[i-1])\nprint(sum(ans_list))\n'] | ['Runtime Error', 'Accepted'] | ['s550691094', 's851714034'] | [9176.0, 9156.0] | [25.0, 35.0] | [181, 186] |
p02628 | u268822556 | 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()\nprint(sum(P[:K]))\n', 'N, K = map(int, input().split())\nP = sorted(list(map(int, input().split())))\nprint(sum(P[:K]))'] | ['Runtime Error', 'Accepted'] | ['s595641778', 's698560477'] | [9180.0, 9208.0] | [26.0, 27.0] | [94, 94] |
p02628 | u271853076 | 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 = list(input().split())\n\nnew_list = sorted(li)\n\nj = 0\ni = 0\n\nwhile i <= k-1:\n j += int(new_list[i])\n i += 1\n\nprint(j)', 'n, k = map(int, input().split())\nli = list(input().split())\n\nli.sort(key = int)\n\nprint(li)\n\nj = 0\ni = 0\n\nwhile i <= k-1:\n \n j += int(li[i])\n i += 1\n\nprint(j)', 'n, k = map(int, input().split())\nli = list(input().split())\n\nli.sort(key = int)\n\nj = 0\ni = 0\n\nwhile i <= k-1:\n \n j += int(li[i])\n i += 1\n\nprint(j)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s230393569', 's841964408', 's627188294'] | [8924.0, 9168.0, 9252.0] | [26.0, 36.0, 32.0] | [155, 160, 149] |
p02628 | u277312083 | 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(list(map(int, ipupt().split())))\nprint(sum(p[:k]))\n', 'n, k = map(int, input().split())\nprint(sum(sorted(list(map(int, ipupt().split())))[:k]))\n', 'n, k = map(int, input().split())\nprint(sum(sorted(list(map(int, input().split())))[:k]))\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s323246015', 's748819416', 's835017443'] | [9052.0, 9144.0, 9120.0] | [23.0, 25.0, 28.0] | [95, 89, 89] |
p02628 | u283751459 | 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())\np = list(map(int, input().split()))\nlists = []\n \nfor x,y,z in p:\n n = x + y + z\n return lists.append(n)\n\nprint(min(lists))\n \n ', 'S = list(map(int, input().strip().split()))\nN = S[0]\nK = S[1]\np = list(map(int, input().strip().split()))\nlists = []\nfor l in range(K):\n lists.append(min(p))\n lists.drop(min(p))\n \nprint(sum(lists))\n', 'import itertools\n \nN = int(input())\nK = int(input())\np = list(map(int, input().strip().split()))\nlists = []\nfor l in itertools.combinations(p, K):\n sums = sum(list(l))\n lists.append(sums)\n \nprint(min(lists))\n', 'N = int(input())\nK = int(input())\np = list(map(int, input().split()))\nlists = []\nfor l in itertools.combinations(p, 3):\n sums = sum(list(l))\n return lists.append(sums)\n\nprint(min(lists))\n \n \n', 'import itertools\n \nS = list(map(int, input().strip().split()))\nN = S[0]\nK = S[1]\np = list(map(int, input().strip().split()))\nlists = [1000000000000]\nx = list(itertools.combinations(p, K))\ncounts = len(list(x))\nfor l in range(1,x+1):\n sums = sum(list(x[counts - 1]))\n if int(sums) <= int(lists[l-1]):\n lists.append(sums)\n else:\n continue\n\nprint(min(lists))', 'S = list(map(int, input().strip().split()))\nN = S[0]\nK = S[1]\np = list(map(int, input().strip().split()))\nlists = []\nfor l in range(K):\n lists.append(min(p))\n lists.remove(min(p))\n \nprint(sum(lists))\n', 'import itertools\n\nN = int(input())\nK = int(input())\np = list(map(int,input().split()))\nlists = []\nfor l in itertools.combinations(p, K):\n sums = sum(list(l))\n lists.append(sums)\n\nprint(min(lists))\n \n \n', 'import itertools\n \nN = int(input().split())\nK = int(input().split())\np = list(map(int, input().strip().split()))\nlists = []\nfor l in itertools.combinations(p, K):\n sums = sum(list(l))\n lists.append(sums)\n \nprint(min(lists))\n', 'import itertools\n \nS = list(map(int, input().strip().split()))\nN = S[0]\nK = S[1]\np = list(map(int, input().strip().split()))\nlists = [1000000000000]\nx = list(itertools.combinations(p, K))\ncounts = len(list(x))\n for l in range(1,x+1):\n sums = sum(list(x[counts - 1]))\n \tif sums <= lists[l-1]:\n \tlists.append(sums)\n else:\n continue\n\nprint(min(lists))\n', 'import itertools\n\nN = int(input())\nK = int(input())\np = list(map(int, input().split()))\nlists = []\nfor l in itertools.combinations(p, K):\n sums = sum(list(l))\n lists.append(sums)\n\nprint(min(lists))\n \n \n', 'import itertools\n \nS = list(map(int, input().strip().split()))\nN = S[0]\nK = s[1]\np = list(map(int, input().strip().split()))\nlists = []\nfor l in itertools.combinations(p, K):\n sums = sum(list(l))\n lists.append(sums)\n \nprint(min(lists))\n', 'import itertools\n \nS = list(map(int, input().strip().split()))\nN = S[0]\nK = S[1]\np = list(map(int, input().strip().split()))\nlists = []\nfor l in range(K):\n lists.append(min(l))\n lists.drop(min(l))\n \nprint(sum(lists))\n', 'import itertools\n \nS = list(map(int, input().strip().split()))\nN = S[0]\nK = S[1]\np = list(map(int, input().strip().split()))\nlists = [1000000000000]\nx = itertools.combinations(p, K)\ncounts = len(list(x)\n for l in range(1,x+1):\n sums = sum(list(l))\n \tif sums <= lists[l-1]:\n \tlists.append(sums)\n else:\n continue\n\nprint(min(lists))\n', 'N = int(input())\nK = int(input())\np = list(map(int, input().split()))\nlists = []\nfor l in itertools.combinations(p, K):\n sums = sum(list(l))\n return lists.append(sums)\n\nprint(min(lists))\n \n \n', 'import itertools\n \nN = int(input())\nK = int(input())\np = list(map(int,input().split(" ")))\nlists = []\nfor l in itertools.combinations(p, K):\n sums = sum(list(l))\n lists.append(sums)\n \nprint(min(lists))', 'S = list(map(int, input().strip().split()))\nN = S[0]\nK = S[1]\np = list(map(int, input().strip().split()))\nlists = []\nfor l in range(K):\n lists.append(min(p))\n p.remove(min(p))\n \nprint(sum(lists))\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s059020810', 's064618121', 's295975164', 's299066343', 's311884923', 's371668485', 's390685999', 's488510354', 's775032253', 's793412833', 's829158220', 's864436306', 's864504404', 's960281887', 's975330409', 's649427651'] | [9096.0, 9176.0, 9160.0, 8964.0, 1848196.0, 9196.0, 9172.0, 9088.0, 8988.0, 9120.0, 9188.0, 9212.0, 9024.0, 9092.0, 9052.0, 9248.0] | [22.0, 27.0, 21.0, 25.0, 2270.0, 57.0, 25.0, 28.0, 28.0, 25.0, 26.0, 24.0, 26.0, 29.0, 30.0, 48.0] | [165, 201, 210, 195, 378, 203, 205, 226, 367, 206, 238, 220, 348, 195, 203, 199] |
p02628 | u294542073 | 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\nx = list(input().split()) for i in range(n)\nx.sort()\nprint(sum(list[0:k]))', 'n, k =map(int,input().split())\n\nx = list(map(int,input().split()))\nx.sort()\nprint(sum(x[0:k]))'] | ['Runtime Error', 'Accepted'] | ['s152821898', 's827002480'] | [8956.0, 9116.0] | [23.0, 30.0] | [130, 118] |
p02628 | u303344598 | 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()))\nlist.sort(a)\nsum(a[0:k])', 'n,k = map(int,input().split())\na = list(map(int,input().split()))\nlist.sort(a)\nprint(sum(a[0:k]))'] | ['Wrong Answer', 'Accepted'] | ['s307665318', 's609829190'] | [9120.0, 9092.0] | [27.0, 25.0] | [90, 97] |
p02628 | u308918401 | 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())\nlist=list(map(int,input().split()))\nlist.sort()\nans=0\nfor i in range(k):\n ans+=list[i]\nprint(ans)', 'n,k=map(int,input().split())\nlist=list(map(int,input().split()))\nlist.sort()\nans=0\nfor i in range(k):\n ans+=list[i]\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s653800400', 's759548544'] | [9160.0, 9240.0] | [26.0, 33.0] | [115, 127] |
p02628 | u309026918 | 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)[:2]))', 'N, K = map(int, input().split())\np = list(map(int, input().split()))\nprint(sum(sorted(p)[:K]))'] | ['Wrong Answer', 'Accepted'] | ['s417512429', 's882831793'] | [9088.0, 9084.0] | [25.0, 24.0] | [94, 94] |
p02628 | u309120194 | 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 = sorted(p, reverse=True)\nans = 0\nfor k in range(K):\n ans += p[k]', 'N, K = map(int, input().split())\np = list(map(int, input().split()))\np = sorted(p, reverse=True)\n\nans = 0\nfor k in range(K):\n ans += p[k]\n\nprint(ans)', 'N, K = map(int, input().split())\np = list(map(int, input().split()))\np = sorted(p)\n \n\nans = 0\nfor i in range(K):\n ans += p[i]\n \nprint(ans)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s376914017', 's773457869', 's948399399'] | [9248.0, 9140.0, 9184.0] | [24.0, 27.0, 29.0] | [138, 150, 193] |
p02628 | u310111951 | 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()))\nprice.sort()\nprice_K=price[:K]\nj=0\nfor i in price_K:\n j+=i\n print(j)', 'N,K=map(int,input().split())\nprice=list(map(int,input().split()))\nprice.sort(reverse=True)\nprice_N=price[:K]\nj=0\nfor i in price_K:\n\tj+=i\nprint(j)', 'N,K=map(int,input().split())\nprice=list(map(int,input().split()))\nprice.sort()\nprice_K=price[:K]\nj=0\nfor i in price_K:\n j+=i\nprint(j)'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s054293988', 's965335990', 's465593346'] | [9156.0, 9240.0, 9152.0] | [30.0, 26.0, 30.0] | [136, 145, 134] |
p02628 | u325279090 | 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()\nb=a.split()\nc=input()\nd=c.split()\nN=int(b[0])\nK=int(b[1])\np=[]\nfor i in range(N):\n p.append(int(d[i]))\np.sort()\nprint(p)\nans=0\nfor i in range(K):\n ans=ans+p[i]\nprint(ans)', 'a=input()\nb=a.split()\nc=input()\nd=c.split()\nN=int(b[0])\nK=int(b[1])\np=[]\nfor i in range(len(d)):\n p.append(int(d[i]))\np.sort()\nans=0\nfor i in range(K):\n ans=ans+p[i]\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s882314085', 's173038703'] | [9156.0, 9256.0] | [31.0, 34.0] | [186, 182] |
p02628 | u328510800 | 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())\nl = sorted([int(x) for x in input().split()])\n\nprint(sum(l[:k]))', 'n, k = map(int, input().split())\nl = sorted([int(x) for x in input().split()])\n\nprint(sum(l[:k]))'] | ['Runtime Error', 'Accepted'] | ['s307912550', 's619933802'] | [9060.0, 9220.0] | [24.0, 25.0] | [89, 97] |
p02628 | u329102630 | 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. | ['\nimport sys\nimport math\ninput = sys.stdin.readline\n\n \ndef inlt():\n return(list(map(int,input().split())))\n\n\nn, k = inlt()\np = inlt()\np = math.sort(p)\nprint(sum(p[:k]))\n\n\n', '\nimport sys\ninput = sys.stdin.readline\n\n \ndef inlt():\n return(list(map(int,input().split())))\n\n\nn, k = inlt()\np = inlt()\np = sorted(p)\nprint(sum(p[:k]))\n\n\n'] | ['Runtime Error', 'Accepted'] | ['s596360107', 's757874371'] | [9256.0, 9188.0] | [26.0, 31.0] | [176, 161] |
p02628 | u336721073 | 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\nsort(p)\nprint(sum(p[:K]))\n\n \n ', 'N, K = map(int, input().split(" "))\np = list(map(int, input().split(" ")))\n \np.sort()\nprint(sum(p[:K]))'] | ['Runtime Error', 'Accepted'] | ['s641051830', 's340177156'] | [9248.0, 9268.0] | [25.0, 29.0] | [124, 103] |
p02628 | u337851472 | 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.sort()\nprint(sum(p[:K+1]))\n', 'a = input()\nprint("A" if ord(a) < 92 else "a") \n\n', 'N, K = map(int,input().split())\np = [int(i) for i in input().split()]\np.sort()\nprint(sum(p[:K]))\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s139158548', 's233088833', 's902208198'] | [9160.0, 8972.0, 9140.0] | [28.0, 26.0, 30.0] | [90, 49, 97] |
p02628 | u345778634 | 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()\nsum(P[:K])', 'N, K = map(int, input().split())\nP = list(map(int, input().split()))\nP.sort()\nprint(sum(P[:K]))'] | ['Wrong Answer', 'Accepted'] | ['s216357454', 's702018677'] | [9252.0, 9244.0] | [31.0, 29.0] | [88, 95] |
p02628 | u346207191 | 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())\np=list(map(int, input().split()))\nld = sorted(p, reverse=True)\nl=(ld[:K])\nprint(sum(l))', 'N,K=(int(x) for x in input().split())\np=list(map(int, input().split()))\nld = sorted(p)\nl=(ld[:K])\nprint(sum(l))\n'] | ['Wrong Answer', 'Accepted'] | ['s530213160', 's475686148'] | [9084.0, 9172.0] | [29.0, 25.0] | [125, 112] |
p02628 | u349856178 | 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 = sorted(p, key = int)\nprint(sum(p[:2]))', 'n, k = map(int, input().split())\np = list(map(int,input().split()))\np = sorted(p, key = int)\nprint(sum(p[:k]))\n'] | ['Runtime Error', 'Accepted'] | ['s747692445', 's688314074'] | [9156.0, 9184.0] | [22.0, 24.0] | [112, 111] |
p02628 | u351654473 | 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()\nls = []\nfor i in range(K):\n ls.append(p[i])\n', 'N, K = map(int,input().split())\np = list(map(int,input().split()))\np.sort()\nls = []\nfor i in range(K):\n ls.append(p[i])\nprint(ls)', 'N, K = map(int,input().split())\np = list(map(int,input().split()))\np.sort()\nls = []\nfor i in range(K):\n ls.append(p[i])\nprint(sum(ls))\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s775292222', 's867955997', 's138931068'] | [9148.0, 9260.0, 9196.0] | [29.0, 33.0, 29.0] | [123, 132, 138] |
p02628 | u352676541 | 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()))\nans = 0\n\np.sort()\nfor i in range(1,K+1):\n ans += p[i]\nprint(ans)', 'N,K=map(int,input().split())\np = list(map(int,input().split()))\nans = 0\n\np.sort()\nfor i in range(K+1):\n ans += p[i]\nprint(ans)', 'N,K=map(int,input().split())\np = list(map(int,input().split()))\nans = 0\n\np.sort()\nfor i in range(K):\n ans += p[i]\nprint(ans)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s028901650', 's290629555', 's664320095'] | [9104.0, 9136.0, 9248.0] | [30.0, 26.0, 32.0] | [129, 127, 125] |
p02628 | u354623416 | 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(a[:k]))\n', 'n,k=map(int,input().split())\na=list(map(int,input().split()))\na.sort()\nprint(sum(a[:k]))\n'] | ['Runtime Error', 'Accepted'] | ['s350330062', 's145350419'] | [8852.0, 9188.0] | [21.0, 27.0] | [88, 89] |
p02628 | u354862173 | 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 sys\nimport numpy as np\nfrom math import ceil as C, floor as F\nfrom collections import defaultdict as D\nfrom functools import reduce as R\n\nALP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'\nalp = 'abcdefghijklmnopqrstuvwxyz'\ndef _X(): return sys.stdin.readline().rstrip().split(' ')\ndef _S(ss): return tuple(ss) if len(ss) > 1 else ss[0]\ndef S(): return _S(_X())\ndef _Ss(ss): return list(ss) if isinstance(ss, tuple) else [ss]\ndef Ss(): return _Ss(S())\ndef _I(ss): return tuple([int(s) for s in ss]) if isinstance(ss, tuple) else int(ss)\ndef I(): return _I(S())\ndef _Is(ss): return list(ss) if isinstance(ss, tuple) else [ss]\ndef Is(): return _Is(I())\n\nN, K = I()\nprint(N, K)\nxs = sorted(Is())\nprint(np.sum(xs[:K]))", "import sys\nimport numpy as np\nfrom math import ceil as C, floor as F\nfrom collections import defaultdict as D\nfrom functools import reduce as R\n\nALP = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'\nalp = 'abcdefghijklmnopqrstuvwxyz'\ndef _X(): return sys.stdin.readline().rstrip().split(' ')\ndef _S(ss): return tuple(ss) if len(ss) > 1 else ss[0]\ndef S(): return _S(_X())\ndef _Ss(ss): return list(ss) if isinstance(ss, tuple) else [ss]\ndef Ss(): return _Ss(S())\ndef _I(ss): return tuple([int(s) for s in ss]) if isinstance(ss, tuple) else int(ss)\ndef I(): return _I(S())\ndef _Is(ss): return list(ss) if isinstance(ss, tuple) else [ss]\ndef Is(): return _Is(I())\n\nN, K = I()\nxs = sorted(Is())\nprint(np.sum(xs[:K]))"] | ['Wrong Answer', 'Accepted'] | ['s676196800', 's628732298'] | [27164.0, 27360.0] | [123.0, 123.0] | [705, 693] |
p02628 | u357120030 | 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())\nP = [int(v) for v in input().split()]\n\nprint(sum(sorted(P)[:K]))', 'N, K = [int(v) for v in input().split()]\nP = [int(v) for v in input().split()]\n\nprint(sum(sorted(P)[:K]))'] | ['Runtime Error', 'Accepted'] | ['s400780534', 's111261956'] | [9092.0, 9100.0] | [24.0, 26.0] | [98, 105] |
p02628 | u357751375 | 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 = map(int,input().split())\np = list(map(int,input().split()))\nprint(p)\n\np.sort()\n\ns = 0\n\nfor i in range(k):\n s += p[i]\n\nprint(s)', '\nn,k = map(int,input().split())\np = list(map(int,input().split()))\n\np.sort()\n\ns = 0\n\nfor i in range(k):\n s += p[i]\n\nprint(s)'] | ['Wrong Answer', 'Accepted'] | ['s774666942', 's730706265'] | [9244.0, 9228.0] | [28.0, 27.0] | [195, 186] |
p02628 | u367713721 | 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 sys\nnsel = int(input().split()[1])\nfruits = [int(fr) for fr in input().split()]\nfor fr in sorted(fruits)[:nsel]: sys.stdout.write(str(fr)+" ")', 'nsel = int(input().split()[1])\nfruits = [int(fr) for fr in input().split()]\nprint(sum(sorted(fruits)[:nsel]))'] | ['Wrong Answer', 'Accepted'] | ['s061286928', 's686760793'] | [9132.0, 9000.0] | [31.0, 30.0] | [149, 109] |
p02628 | u370852395 | 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(l)\nprint(sum(l[0:K]))\n', 'N,K=map(int,input().split())\nl=list(map(int,input().split()))\nl.sort()\nprint(sum(l[0:K]))\n'] | ['Wrong Answer', 'Accepted'] | ['s586326336', 's827248077'] | [9240.0, 9228.0] | [32.0, 31.0] | [99, 90] |
p02628 | u376752722 | 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. | ['num, select = map(int, input())\nl = list(map(int, input()))\n\nsum = 0\nl = l.sort()\nfor i in l:\n sum += l[i]\n\nprint(sum)', 'N_syu, K_ko = map(int, input().split())\nprices = list(map(int, input().split()))\n\nprices.sort()\n\nsum = 0\nfor i in range(K_ko):\n sum += prices[i]\nprint(sum)\n'] | ['Runtime Error', 'Accepted'] | ['s540570157', 's476841181'] | [8936.0, 9084.0] | [29.0, 32.0] | [119, 159] |
p02628 | u378691508 | 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=sorted(list(map(int, input().split())))\n\nprint(p_list[:K])\n\n\n', 'N, K = map(int, input().split())\np_list=sorted(list(map(int, input().split())))\n\nprint(sum(p_list[:K]))\n\n\n\n'] | ['Wrong Answer', 'Accepted'] | ['s953109610', 's572560853'] | [9196.0, 9176.0] | [25.0, 27.0] | [101, 107] |
p02628 | u381961741 | 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()\narr = [int(j) for j in x.split()]\ny = input()\nmain = [int(i) for i in y.split()]\nmain = sorted(main)\nsum = 0\nr = 0\nwhile r < arr[1]:\n sum+=main[r]\n r+=1\nprint(main)\n', 'x = input()\narr = [int(j) for j in x.split()]\ny = input()\nmain = [int(i) for i in y.split()]\nmain = sorted(main)\nsum = 0\nr = 0\nwhile r < arr[1]:\n sum+=main[r]\n r+=1\nprint(sum)'] | ['Wrong Answer', 'Accepted'] | ['s929986420', 's926214178'] | [9176.0, 9268.0] | [34.0, 28.0] | [179, 177] |
p02628 | u382169668 | 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 num2alpha(num):\n if num<=26:\n return chr(97+num)\n elif num%26==0:\n return num2alpha(num//26-1)+chr(90)\n else:\n return num2alpha(num//26)+chr(97+num%26)\n\nif __name__ == '__main__':\n n = int(input())\n print(num2alpha(n))", "no, sct = map(int, input().split(' '))\nflut = list(map(int, input().split(' ')))\nflut = sorted(flut, reverse=False)\nsum_ = 0\nfor i in range(sct):\n sum_ += flut[i]\nprint(sum_)"] | ['Runtime Error', 'Accepted'] | ['s448984648', 's377945296'] | [9180.0, 9168.0] | [26.0, 32.0] | [254, 175] |
p02628 | u391340825 | 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. | ['nm = [int(i) for i in input().split()]\nn = nm[0]\nm = nm[1]\na = [int(i) for i in input().split()]\nsorted(a)\nsum = 0\nfor i in range(m):\n sum += a[i]\nprint(sum)\n', 'nm = [int(i) for i in input().split()]\nn = nm[0]\nm = nm[1]\na = [int(i) for i in input().split()]\na = sorted(a)\nsum = 0\nfor i in range(m):\n sum += a[i]\nprint(sum)'] | ['Wrong Answer', 'Accepted'] | ['s717908455', 's390122090'] | [9240.0, 9260.0] | [30.0, 27.0] | [159, 162] |
p02628 | u394731058 | 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(p[:k])', 'n, k = map(int, input().split())\np = list(map(int, input().split()))\np.sort()\nprint(sum(p[:k]))\n '] | ['Wrong Answer', 'Accepted'] | ['s668794947', 's526500561'] | [9164.0, 9148.0] | [26.0, 27.0] | [90, 105] |
p02628 | u408325839 | 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 = list(map(int, input().split()))\n\nprice_list.sort()\n\nprint(price_list)\nprint(sum(price_list[:k]))\n', 'n, k = map(int, input().split())\nprice_list = list(map(int, input().split()))\n\nprice_list.sort()\n\nprint(sum(price_list[:k]))\n'] | ['Wrong Answer', 'Accepted'] | ['s550834517', 's656175176'] | [9160.0, 9236.0] | [30.0, 27.0] | [143, 125] |
p02628 | u408791346 | 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(list(int(input()) for _ in range(n)))\nprint(sum(p[0:k]))', 'n, k = map(int, input().split())\np = sorted(list(map(int, input().split())))\nprint(sum(p[0:k]))\n'] | ['Runtime Error', 'Accepted'] | ['s412565946', 's843193411'] | [9044.0, 9136.0] | [29.0, 30.0] | [100, 96] |
p02628 | u410917601 | 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=int(input())\nN=int(input())\nli=[]\nfor i in range(0,K):\n fruit=int(input())\n li.append(fruit)\n li.sort()\n sum1=0\n for i in range(0,N):\n sum1=sum1+li[i]\n print(sum1) ', 'K, N = (map(int,input().split()))\nli=list(map(int,input().split()))\nli.sort()\nsum1=0\nfor i in range(0,N):\n sum1=sum1+li[i]\nprint(sum1) '] | ['Runtime Error', 'Accepted'] | ['s786880116', 's252058877'] | [9064.0, 9260.0] | [31.0, 31.0] | [175, 140] |
p02628 | u410956928 | 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\nprint(sum(sorted(p)[:n]))', 'N,K = map(int, input().split())\np = list(map(int, input().split())\n\nprint(sum(sorted(p)[:N]))', 'n,k = map(int, input().split())\np = list(map(int, input().split()))\n\nprint(sum(sorted(p)[:n+1]))\n', 'N,K = map(int, input().split())\np = list(map(int, input().split()))\n\nprint(sum(sorted(p)[:N]))', 'N,K = map(int, input().split())\npi= list(map(int, input().split()))\n\nprint(sum(sorted(pi)[:N]))', 'N,K = map(int, input().split())\np_list= list(map(int, input().split()))\n\nprint(sum(sorted(p_list)[:N]))', 'N,K= map(int, input().split())\np = list(map(int, input().split()))\n\nprint(sum(sorted(p)[:N]))', 'N,K = map(int, input().split())\np = list(map(int, input().split()))\n\nprint(sum(sorted(p)[:N]))', 'N,K = map(int, input().split())\np = list(map(int, input().split()))\n\nprint(sum(sorted(p)[:N]))', 'N,K = map(int, input().split())\np = list(map(int, input().split()))\n\nprint(sum(sorted(p)[:N]))', 'N,K = map(int, input().split())\np = list(map(int, input().split()))\nprint(sum(sorted(p)[:N]))', 'n,k = map(int, input().split())\np = list(map(int, input().split()))\n\nprint(sum(sorted(p)[:k]))\n'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s029454631', 's119242760', 's188292764', 's320343712', 's356021066', 's440328465', 's603946381', 's885584860', 's958625561', 's982490816', 's986513277', 's356397749'] | [9208.0, 9024.0, 9180.0, 9024.0, 9212.0, 9132.0, 9132.0, 9248.0, 9200.0, 9196.0, 9200.0, 9140.0] | [26.0, 23.0, 26.0, 29.0, 30.0, 31.0, 31.0, 26.0, 29.0, 27.0, 32.0, 29.0] | [94, 93, 97, 94, 95, 103, 93, 94, 94, 94, 93, 95] |
p02628 | u414050834 | 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()))\np2=p.sort()\nprint(sum(p2[:k]))', 'n,k=map(int,input().split())\np=list(map(int,input().split()))\np2=sorted(p)\nprint(sum(p2[:k]))\n'] | ['Runtime Error', 'Accepted'] | ['s173596323', 's302999498'] | [9156.0, 9184.0] | [22.0, 31.0] | [92, 94] |
p02628 | u414376763 | 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(imt,input().split()))\np.sort()\nprint(sum(p[:k]))', 'n,k = map(input().split())\np = map(input)\nprint(sum(p,:k)', 'n,k = map(input().split())\np = list(int,map(input().split()))\np.sort()\nprint(sum(p[:k]))', 'n,k = map(int,input().split())\np = list(int,input())\np.sort()\nprint(sum(p[:k])\n', 'n,k = map(int,input().split())\np = list(map(int,input().split()))\np.sort()\nprint(sum(p[:k])\n', 'n,k = map(int,input().split())\np = list(int,input())\nprint(sum(p[:k])\n', 'n,k = map(int,input().split())\np = list(map(int,input().split()))\np.sort()\nprint(sum(p[:k]))\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s491509443', 's511724509', 's534122560', 's747725621', 's767805920', 's825771923', 's441708752'] | [9096.0, 8964.0, 8960.0, 8852.0, 8952.0, 9012.0, 9232.0] | [24.0, 27.0, 23.0, 21.0, 26.0, 24.0, 27.0] | [92, 57, 88, 79, 92, 70, 93] |
p02628 | u421674761 | 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 = map(int,input().split())\np = list(map(int,input().split()))\n\np.sort()\nprint(p[:k])\n', '\nn,k = map(int,input().split())\np = list(map(int,input().split()))\n\np.sort()\n\nprint(sum(p[:k]))\n'] | ['Wrong Answer', 'Accepted'] | ['s542970719', 's797014553'] | [9164.0, 9176.0] | [27.0, 26.0] | [90, 96] |
p02628 | u426205961 | 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())\nmylist = input().split()\nmylist.sort()\nc = 0\nprint(mylist)\nfor i in range(b-1):\n c = c + int(mylist[i-1])\nprint(c)', 'a, b = map(int,input().split())\nc = input().split()\nc.sort()\nd = 0\nfor i in range(b):\n\td += int(c[i])\nprint(d)', 'a, b = list(map(int, input().split()))\ns = input().split()\nc = 0\ns.sort()\nfor i in range(b):\n c += int(s[i])\nprint(c)', 'N, K = map(int, input().split())\nA = list(map(int, input().split()))\nA.sort()\nB = 0\nfor i in range(K):\n B += A[i]\nprint(B)'] | ['Wrong Answer', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s063522656', 's085229054', 's259198616', 's666391625'] | [9084.0, 9020.0, 9116.0, 9176.0] | [32.0, 27.0, 29.0, 29.0] | [148, 110, 120, 125] |
p02628 | u427514507 | 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())\nprices = [int(i) for i in input().split()]\nprint(sum(prices.sort()[:K]))', 'N, K = map(int, input().split())\nprices = [int(i) for i in input().split()]\nprices.sort()\nprint(sum(prices[:K]))\n'] | ['Runtime Error', 'Accepted'] | ['s775842255', 's224632542'] | [9180.0, 9236.0] | [28.0, 28.0] | [105, 113] |
p02628 | u432453907 | 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(input().split())\np = [int(x) for x in p]\np.sort()\nprint(p)\nans =sum(p[0:k])\nprint(ans)', 'n,k = map(int,input().split())\np = list(input().split())\np = [int(x) for x in p]\np.sort()\nans =sum(p[0:k])\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s591303223', 's930336586'] | [9172.0, 9008.0] | [26.0, 32.0] | [126, 117] |
p02628 | u433836112 | 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\nn, k = list(map(int, input().rstrip().split()))\np = list(map(int, input().rstrip().splist()))\np = np.sort(np.array(p))\n\nprint(np.sum(p[:k]))', 'import numpy as np\nn, k = list(map(int, input().rstrip().split()))\np = list(map(int, input().rstrip().split()))\np = np.sort(np.array(p))\n \nprint(np.sum(p[:k]))'] | ['Runtime Error', 'Accepted'] | ['s794466052', 's047765084'] | [27076.0, 27356.0] | [116.0, 131.0] | [159, 159] |
p02628 | u434609232 | 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_n = list(map(int, input().split()))\np = list(map(int, input().split()))\np = sorted(p, reverse=False)\nsum = 0\nfor i in range(k_n[0]):\n sum += p[i]\nprint(sum)', 'k_n = list(map(int, input().split()))\np = list(map(int, input().split()))\np = sorted(p, reverse=False)\nsum = 0\nfor i in range(k_n[1]):\n sum += p[i]\nprint(sum)'] | ['Wrong Answer', 'Accepted'] | ['s605440776', 's221828023'] | [9212.0, 9256.0] | [25.0, 25.0] | [161, 161] |
p02628 | u435569602 | 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 heapq\nN,K = map(int,input().split())\np = list(map(int,input().split()))\nsum(heapq.nsmallest(K,p))', 'import heapq\nN,K = map(int,input().split())\np = list(map(int,input().split()))\nsum(heapq.nsmallest(K,p))', 'import heapq\nN,K = map(int,input().split())\np = list(map(int,input().split()))\nprint(sum(heapq.nsmallest(K,p)))\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s657639887', 's853568248', 's601579690'] | [9180.0, 9280.0, 9292.0] | [27.0, 25.0, 35.0] | [104, 104, 112] |
p02628 | u436519884 | 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 functools\nn,k=int(input())\np=list(map(int,input().split()))\np.sort()\ncost=functools.reduce(lambda x,y:x+y,p[:k],0)\nprint(cost)', 'import functools\nn,k=int(input())\np=list(map(int,input().split()))\np.sort()\nfor i in range(k):\n cost+=p[i]\nprint(cost)', 'import functools\nn,k=map(int,input().split())\np=list(map(int,input().split()))\np.sort()\ncost=functools.reduce(lambda x,y:x+y,p[:k],0)\nprint(cost)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s616683820', 's629113612', 's628727061'] | [9548.0, 9568.0, 9528.0] | [30.0, 35.0, 35.0] | [133, 119, 145] |
p02628 | u443569380 | 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 math \nn = int(input())\nprint(math.ceil(n/ 1000) * 1000 - n)', 'n, k = map(int, input().split())\nl = sorted(list(map(int, input().split())))\n\nans = 0\nfor i in range(k):\n ans += l[i]\n\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s665191940', 's301853532'] | [9076.0, 9172.0] | [26.0, 30.0] | [66, 133] |
p02628 | u450983668 | 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();print(sum(list(map(int,input().split()))[:int(a[2])]))', 'n,k=map(int,input().split())\nprint(sum(sorted(list(map(int,input().split())))[:k]))'] | ['Runtime Error', 'Accepted'] | ['s342151234', 's895493500'] | [9240.0, 9164.0] | [28.0, 30.0] | [64, 83] |
p02628 | u461463382 | 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\nprint(sum(P[:K]))', 'N, K = map(int, input().split())\n \nP = list(map(int, input().split()))\nP.sort()\n \nprint(sum(P[:K]))'] | ['Wrong Answer', 'Accepted'] | ['s622381355', 's540350053'] | [9240.0, 9260.0] | [28.0, 28.0] | [88, 99] |
p02628 | u467464521 | 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. | ['A1, A2 = map(int, input().split())\nB = list(map(int,input().split()))\t\n\nB.sort()\nnum = 0\n\nfor i in range(A2):\n num = B[i]\n\nprint(num)\n\n', 'A1, A2 = map(int, input().split())\nB = list(map(int,input().split()))\t\n\nB.sort()\nnum = 0\n\nfor i in range(A2):\n num = num + B[i]\n \nprint(num)'] | ['Wrong Answer', 'Accepted'] | ['s966599152', 's240826988'] | [9256.0, 9172.0] | [28.0, 29.0] | [136, 142] |
p02628 | u468972478 | 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(list(map(int, input().split())))\na = 0\nfor i in range(k):\n a += i\nprint(a)\n \n', 'n, k = map(int, input().split())\np = sorted(list(map(int, input().split())))\na = 0\nfor i in range(k):\n a += p[i]\nprint(a)\n \n'] | ['Wrong Answer', 'Accepted'] | ['s745529526', 's141255597'] | [9240.0, 9072.0] | [31.0, 27.0] | [123, 126] |
p02628 | u475048784 | 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(" ")))\ncont = list(map(int,input.split(" ")))\nprint(sum(cont[:K]))', 'N,K = tuple(map(int,input().split(" ")))\ncont = sorted(list(map(int,input().split(" "))))\nprint(sum(cont[:K]))'] | ['Runtime Error', 'Accepted'] | ['s476870107', 's413866499'] | [8960.0, 9224.0] | [24.0, 30.0] | [98, 110] |
p02628 | u477837488 | 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()))\nprice = sorted(price)\nsum(price[:k])', 'n, k = map(int, input().split())\nprice = list(map(int, input().split()))\nprice = sorted(price)\nprint(sum(price[:k]))'] | ['Wrong Answer', 'Accepted'] | ['s442934505', 's937024592'] | [9180.0, 9276.0] | [27.0, 27.0] | [109, 116] |
p02628 | u479484272 | 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()\nsum = 0\nfor i in range(K):\n print(i)\n sum = sum + p[i]\nprint(sum)\n', 'N,K = map(int,input().split())\np = list(map(int, input().split()))\np.sort()\nnew = p[0:K]\nprint(sum(new))\n'] | ['Wrong Answer', 'Accepted'] | ['s540008023', 's620379845'] | [9180.0, 9240.0] | [30.0, 25.0] | [148, 105] |
p02628 | u481919972 | 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. | ['l = input().split()\nn1 = int(l[0])\nn2 = int(l[1])\n\nmoney = input().split()\n\nfor i in range(n1):\n money[i] = int(money[i])\n\nmoney.sort()\nprint(money)\n\nans = 0\n\nfor i in range(n2):\n ans += money[i]\n\nprint(ans)', 'l = input().split()\nn1 = int(l[0])\nn2 = int(l[1])\n\nmoney = input().split()\n\nfor i in range(n1):\n money[i] = int(money[i])\n\nmoney.sort()\n\nans = 0\n\nfor i in range(n2):\n ans += money[i]\n\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s184600196', 's872372293'] | [9104.0, 9220.0] | [30.0, 31.0] | [213, 200] |
p02628 | u486209657 | 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(p)\nprice=0\nfor idx in range(K):\n price=price+p[idx]\nprint(price)', 'N,K=map(int,input().split())\np = list(map(int,input().split()))\np=p.sort()\nprice=0\nfor idx in range(K):\n price=price+p[idx]\nprint(price)', 'N,K=map(int,input().split())\np=list(map(int, input().split()))\np.sort()\nprint(p)\nprice=0\nfor idx in range(K):\n price=price+p[idx]\nprint(price)', 'N,K=map(int,input().split())\np=list(map(int, input().split()))\np.sort()\n\nprice=0\nfor idx in range(K):\n price=price+p[idx]\nprint(price)\n'] | ['Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s031377075', 's485878490', 's656555457', 's407278678'] | [9040.0, 9180.0, 9008.0, 9184.0] | [28.0, 24.0, 29.0, 28.0] | [145, 137, 145, 138] |
p02628 | u493318999 | 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())\np = list(map(int,input().split()))\n\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()))\n\np.sort()\nans = 0\nfor i in range(k):\n ans += p[i]\nprint(ans)\n'] | ['Runtime Error', 'Accepted'] | ['s140663694', 's841155162'] | [9164.0, 9160.0] | [29.0, 27.0] | [115, 128] |
p02628 | u496157893 | 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\nP = [int(p) for p in input().split()]\n\nP.sort()\n\nfor q in range(int(K)):\n X = X + int(q)\n\nprint(X)', 'N,K = input().split()\n\nP = [int(p) for p in input().split()]\n\nP.sort()\n\nX = 0\n\nfor q in range(int(K)):\n X = X + P[q]\n\nprint(X)'] | ['Runtime Error', 'Accepted'] | ['s854777583', 's684070195'] | [9044.0, 9156.0] | [28.0, 25.0] | [124, 129] |
p02628 | u497158316 | 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()))\nprice_arr = list(map(int, input.split()))\nprice_arr.sort()\nsum = 0\nfor i in range(0,k):\n sum += price_arr[i]\nprint(sum)\n', 'n, k = list(map(int, input().split()))\nprice_arr = list(map(int, input().split()))\nprice_arr.sort()\nsum = 0\nfor i in range(0,k):\n sum += price_arr[i]\nprint(sum)\n'] | ['Runtime Error', 'Accepted'] | ['s129123612', 's715791846'] | [9164.0, 9240.0] | [27.0, 27.0] | [160, 162] |
p02628 | u497188176 | 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(int,input().split())\nB=0\np.sort()\nK=K-1\nfor i in range(0,K):\n B=B+p[i]\n i=i+1\n \nprint(B)', 'N,K=map(int,input().split())\np=list(map(int,input().split()))\nB=0\np.sort()\nN=N-5\nK=K-1\nfor i in range(0,K):\n B=B+p[i]\n i=i+1\n \nprint(B)\n', 'N,K=map(int,input().split())\np=list(map(int,input().split()))\nB=0\nC=0\np.sort()\nN=N-5\nfor i in range(0,K):\n B=B+p[i]\n i=i+1\n \nprint(B)\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s138410228', 's664486967', 's978284509'] | [9036.0, 9208.0, 9176.0] | [22.0, 31.0, 35.0] | [131, 145, 143] |
p02628 | u500673386 | 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())\nprint('0'if n%k==0 else'1')", 'n,k=map(int,input().split())\np=list(map(int,input().split()))\np.sort()\nprint(sum(p[:k]))'] | ['Wrong Answer', 'Accepted'] | ['s561948175', 's343806386'] | [9044.0, 9192.0] | [27.0, 29.0] | [56, 88] |
p02628 | u504856568 | 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()\nn = int(n)\nk = int(k)\nlistnum = []\nnewlist = []\nsumnum = 0\nfor a in range(n):\n listnum.append(int(input())\nnewlist = sorted(listnum)\nfor b in range(k):\n sumnum = sumnum + list[0]\nprint(sumnum)', 'n, k = input().split()\nn = int(n)\nk = int(k)\nlistnum = input().split()\nnewlist = []\nsumnum = 0\n\nlistnum = [int(n) for n in listnum]\nnewlist = sorted(listnum)\nfor b in range(k):\n sumnum = sumnum + newlist[b]\nprint(sumnum)'] | ['Runtime Error', 'Accepted'] | ['s984691490', 's716924563'] | [8784.0, 9196.0] | [26.0, 31.0] | [221, 223] |
p02628 | u505825680 | 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()))\nvalues = list(map(int, input().split()))\nprint(sum(sorted(values)[:k])', 'n, k = list(map(int, input().split()))\nvalues = list(map(int, input().split()))\nprint(sum(sorted(values)[:k]))'] | ['Runtime Error', 'Accepted'] | ['s142325405', 's960429050'] | [8960.0, 9248.0] | [24.0, 29.0] | [109, 110] |
p02628 | u506996808 | 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()))\nppp=sorted(p)\nprint(ppp)\nbuy=[]\nfor i in range(K):\n buy.append(ppp[i])\nprint(sum(buy))', 'N,K=map(int,input().split())\np=list(map(int,input().split()))\nppp=sorted(p)\nbuy=[]\nfor i in range(K):\n buy.append(ppp[i])\nprint(sum(buy))'] | ['Wrong Answer', 'Accepted'] | ['s933623097', 's095945910'] | [9148.0, 9276.0] | [32.0, 32.0] | [151, 140] |
p02628 | u512953702 | 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=[int(v) for v in input().split()]\nprint(sum(a[:k]))', 'n,k=map(int,input().split())\na=[int(v) for v in input().split()]\na.sort()\nprint(sum(a[:k]))\n'] | ['Wrong Answer', 'Accepted'] | ['s556158576', 's330035809'] | [9248.0, 9252.0] | [30.0, 28.0] | [82, 92] |
p02628 | u522140891 | 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 = list(map(int, input().split()))\n P = list(map(int, input().split()))\n\n min_ = float('inf')\n\n all_ = list(range(N))\n for items in itertools.combinations(all_, K):\n sum_ = sum([P[i] for i in items])\n min_ = min(min_, sum_)\n\n print(min_)\n\n\nif(__name__ == '__main__'):\n main()", "def main():\n N, K = list(map(int, input().split()))\n P = list(map(int, input().split()))\n\n P.sort()\n print(sum(P[:K]))\n\n\nif(__name__ == '__main__'):\n main()"] | ['Runtime Error', 'Accepted'] | ['s717091458', 's887403157'] | [9260.0, 9184.0] | [26.0, 26.0] | [305, 161] |
p02628 | u522937309 | 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_p=list(map(int, input().split())) \n\nlist_p.sort()\n\nsum(list_p[:k])', 'n, k =map(int, input().split()) \nlist_p=list(map(int, input().split())) \n\nlist_p.sort()\n\nprint(sum(list_p[:k]))'] | ['Wrong Answer', 'Accepted'] | ['s144355355', 's726539096'] | [9260.0, 9176.0] | [31.0, 25.0] | [141, 148] |
p02628 | u529461372 | 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())\nprices = list(map(input().split()))\nprint(sum(sorted(prices[:k])))', 'n, k = map(int, input().split())\nprice = list(map(int, input().split()))\nprint(sum(sorted(price)[:k]))\n'] | ['Runtime Error', 'Accepted'] | ['s116889903', 's988592650'] | [9212.0, 9236.0] | [26.0, 25.0] | [99, 103] |
p02628 | u529737989 | 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 = list(map(int, input().split()))\np = list(map(int, input().split()))\n\nN = a[0]\nK = a[1]\n\np = p.sort\n\ng = sum(p[0:K-1])\nprint(g)', 'N,K=(int(x) for x in input().split())\np = list(map(int, input().split()))\n\np = p.sort\n\nK = 0\nfor i in range(K):\n K = K+p(i)\n\nprint(K)', 'a = list(map(int, input().split()))\np = list(map(int, input().split()))\n\nN = a[0]\nK = a[1]\n\np.sort()\n\ng = 0\nfor k in range(K)\n\tg = g+p[k]\nprint(g)', 'a = list(map(int, input().split()))\np = list(map(int, input().split()))\n\nN = a[0]\nK = a[1]\n\np.sort()\n\ng = sum(p[0:K-1])\nprint(g)', 'a = list(map(int,input().split()))\np = list(map(int, input().split()))\n\nN = a[0]\nK = a[1]\n\np = p.sort\n\ng = 0\nfor i in range(K):\n g = K+p(i)\n\nprint(g)', 'a = list(map(int, input().split()))\np = list(map(int, input().split()))\n\nN = a[0]\nK = a[1]\n\np.sort()\n\ng = 0\nfor k in range(K):\n\tg = g + p[k]\nprint(g)'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s256046505', 's452955327', 's488570676', 's507549682', 's543965654', 's785411051'] | [9156.0, 8992.0, 8884.0, 9076.0, 9088.0, 9156.0] | [30.0, 30.0, 26.0, 30.0, 33.0, 28.0] | [130, 136, 146, 128, 152, 149] |
p02628 | u529870875 | 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.sort()\nprint(p)\nprint(sum(p[0:k]))', 'n,k = list(map(int, input().split()))\np = list(map(int, input().split()))\np.sort()\nprint(sum(p[0:k]))'] | ['Wrong Answer', 'Accepted'] | ['s928885373', 's257504745'] | [9084.0, 9212.0] | [29.0, 28.0] | [110, 101] |
p02628 | u530606147 | 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(sorted(p)[k:]))\n', 'n, k = list(map(int, input().split()))\np = list(map(int, input().split()))\n\nprint(sum(sorted(p)[:k]))\n'] | ['Wrong Answer', 'Accepted'] | ['s846447305', 's270039716'] | [9176.0, 9196.0] | [31.0, 26.0] | [102, 102] |
p02628 | u535654998 | 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_1 = sorted(list(map(int, input().split())), reverse=True)\nK = K+1\nans = sum(List_1[:K])', 'N, K = map(int,input().split())\nList_1 = sorted(list(map(int, input().split())), reverse=True)\nK = K+1\nans = sum(List_1[:K])\nprint(ans)', 'N, K = map(int,input().split())\nLIst_1 = sorted(list(map(int, input().split())), reverse=True)\nK = K+1\nans = sum(List_1[:K])', 'N, K = map(int,input().split())\nList_1 = sorted(list(map(int, input().split())))\nans = sum(List_1[:K])\nprint(ans)'] | ['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted'] | ['s015406311', 's124973639', 's853412607', 's925964427'] | [9100.0, 9144.0, 9196.0, 9104.0] | [29.0, 27.0, 24.0, 30.0] | [124, 135, 124, 113] |
p02628 | u536642030 | 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(sorted(p)[:k])', 'n,k = list(map(int, input().split()))\np = list(map(int, input().split()))\n\nprint(sum(sorted(p)[:k]))'] | ['Runtime Error', 'Accepted'] | ['s703738845', 's209963500'] | [8644.0, 9252.0] | [30.0, 29.0] | [99, 100] |
p02628 | u538955095 | 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()\nn = input()\nprice = list(input().split()).sort\n\ntotal = sum(prices[:n])\nprint(total)', 'k,n = map(int, input().split())\nprices = list(int, input().split()).sort()\ntotal = sum(prices[:n])\nprint(total)\n', 'k, n = map(int, input().split())\nprices = list(map(int, input().split()))\nprices.sort()\ntotal = sum(prices[:n])\nprint(total)'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s194154209', 's644079430', 's908287141'] | [9020.0, 9092.0, 9156.0] | [29.0, 28.0, 30.0] | [96, 112, 124] |
p02628 | u539659844 | 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()]\nnewlist = sorted(li)\nprice = 0\nfor a in range(k):\n count += newlist[a]\n \nprint(count)', 'n, k = map(int, input().split())\nli = [int(i) for i in input().split()]\nnewlist = sorted(li)\nprice = 0\nfor a in range(k):\n price += newlist[a]\n \nprint(price)'] | ['Runtime Error', 'Accepted'] | ['s082498099', 's950524838'] | [9208.0, 9168.0] | [25.0, 34.0] | [159, 159] |
p02628 | u544272759 | 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 = sum(p[:k])\nprint(ans)', 'n, k = map(int, input().split())\np = list(map(int, input().split()))\n \np.sort()\nans = sum(p[:k])\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s309122926', 's153195923'] | [8940.0, 9224.0] | [26.0, 29.0] | [104, 115] |
p02628 | u545929650 | 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\nprices = list(map(int, input().split()))\n\nprices = sorted(prices)\n\nprint(sum(prices[:k])', 'n, k = list(map(int, input().split()))\nprices = list(map(int, input().split()))\nprices = sorted(prices)\nprint(sum(prices[:k]))\t'] | ['Runtime Error', 'Accepted'] | ['s935411857', 's585567230'] | [9036.0, 9260.0] | [21.0, 34.0] | [128, 127] |
p02628 | u546236742 | 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 = list(map(int, input().split()))\nc = list(map(int, input().split()))\nc.sort()\n\nn = 0\nfor i in range(b):\n n += i\n \nprint(n)', 'a, b = list(map(int, input().split()))\nc = list(map(int, input().split()))\nc.sort()\n\nn = 0\nfor i in range(b):\n n += c[i]\n \nprint(n)'] | ['Wrong Answer', 'Accepted'] | ['s862828303', 's280248622'] | [9176.0, 9176.0] | [30.0, 30.0] | [130, 133] |
p02628 | u547608423 | 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 = sorted(p)\nans = 0\n\nfor a in p[:K]:\n ans += a\n print(a)\n\nprint(ans)\n', 'N, K = map(int, input().split())\np = list(map(int, input().split()))\n\np = sorted(p)\nans = 0\n\nfor a in p[:K]:\n ans += a\n #print(a)\n\nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s533467541', 's341559023'] | [9252.0, 9176.0] | [30.0, 29.0] | [147, 148] |
p02628 | u548379829 | 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()\n\nque = input()\n\nque = [x for x in que.split()]\n# -*- coding: utf-8 -*-\n"""\nSpyder Editor\n\nThis is a temporary script file.\n\nAuthor : Takeshi Saga\n\n"""\n\nimport itertools\nimport numpy as np\n\nN, K = input()\nque = input()\ntry:\n N = int(N)\nexcept:\n pass\ntry:\n K = int(K)\nexcept:\n pass\n\n\n\nque = [int(x) for x in que.split()]\n\n#print(que)\n"""\ntmp = []\nfor x in que:\n for xx in range(K):\n tmp.append(x)\nque = tmp\n"""\nmin_val = 999999999\n\nfor x in itertools.combinations(que, K):\n tmp = np.sum(x)\n if tmp < min_val:\n min_val = tmp\n\nprint(min_val)', 'import itertools\nimport numpy as np\n\nN, K = input()\nque = input()\ntry:\n N = int(N)\nexcept:\n pass\ntry:\n K = int(K)\nexcept:\n pass\n\n\n\nque = [int(x) for x in que.split()]\n\n#print(que)\n"""\ntmp = []\nfor x in que:\n for xx in range(K):\n tmp.append(x)\nque = tmp\n"""\nmin_val = 999999999\n\nfor x in itertools.combinations(que, K):\n tmp = np.sum(x)\n if tmp < min_val:\n min_val = tmp\n\nprint(min_val)\n', '# -*- coding: utf-8 -*-\n"""\nSpyder Editor\n\nThis is a temporary script file.\n\nAuthor : Takeshi Saga\n\n"""\n\nimport itertools\nimport numpy as np\n\ntmp = input()\nN,K = tmp.split()\nque = input()\ntry:\n N = int(N)\nexcept:\n pass\ntry:\n K = int(K)\nexcept:\n pass\n\n\n\nque = [int(x) for x in que.split()]\n\n#print(que)\n"""\ntmp = []\nfor x in que:\n for xx in range(K):\n tmp.append(x)\nque = tmp\n"""\nmin_val = 999999999\n\nque = sorted(que)\n\n#for x in itertools.combinations(que, K):\n\nx = [que[i] for i in range(K)]\ntmp = np.sum(x)\n\nprint(min_val)', '# -*- coding: utf-8 -*-\n"""\nSpyder Editor\n\nThis is a temporary script file.\n\nAuthor : Takeshi Saga\n\n"""\n\nimport itertools\nimport numpy as np\n\ntmp = input()\nN,K = tmp.split()\nque = input()\ntry:\n N = int(N)\nexcept:\n pass\ntry:\n K = int(K)\nexcept:\n pass\n\n\n\nque = [int(x) for x in que.split()]\n\n#print(que)\n"""\ntmp = []\nfor x in que:\n for xx in range(K):\n tmp.append(x)\nque = tmp\n"""\nmin_val = 999999999\n\nque = sorted(que)\n\n#for x in itertools.combinations(que, K):\nfor x in que:\n tmp = np.sum(x)\n if tmp < min_val:\n min_val = tmp\n\nprint(min_val)', '# -*- coding: utf-8 -*-\n"""\nSpyder Editor\n\nThis is a temporary script file.\n\nAuthor : Takeshi Saga\n\n"""\n\nimport itertools\nimport numpy as np\n\ntmp = input()\n#tmp = "5 3"\nN,K = tmp.split()\nque = input()\n\ntry:\n N = int(N)\nexcept:\n pass\ntry:\n K = int(K)\nexcept:\n pass\n\n\n\nque = [int(x) for x in que.split()]\n\n#print(que)\n"""\ntmp = []\nfor x in que:\n for xx in range(K):\n tmp.append(x)\nque = tmp\n"""\nmin_val = 999999999\n\nque = sorted(que)\n\n#for x in itertools.combinations(que, K):\n\nx = [que[i] for i in range(K)]\nmin_val = np.sum(x)\n\nprint(min_val)'] | ['Runtime Error', 'Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s175513274', 's183273572', 's373153054', 's522530610', 's587442344'] | [9080.0, 27136.0, 27184.0, 26960.0, 27248.0] | [25.0, 112.0, 114.0, 124.0, 120.0] | [587, 421, 546, 576, 589] |
p02628 | u549474450 | 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())\nl=list(map(int, input().split()))\nans=0\nl.sort()\nfor i in range(k):\n ans=ans+l[k]\nprint(ans)', 'n,m=map(int, input().split())\nl=list(map(int, input().split()))\nans=0\nl.sort()\nfor i in range(m):\n ans=ans+l[i]\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s253546900', 's336114845'] | [9244.0, 9192.0] | [28.0, 37.0] | [125, 125] |
p02628 | u551692187 | 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()\nfor i,v in enumerate(p):\n ans += v\n if i == 2:\n print(ans)\n exit()\nprint(ans)', 'N,K = map(int, input().split())\np = list(map(int, input().split()))\np.sort()\nans = 0\nfor i,v in enumerate(p):\n ans += v\n if i == K - 1:\n print(ans)\n exit()\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s986577361', 's585881566'] | [9168.0, 9136.0] | [23.0, 26.0] | [174, 186] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.