Snuke has N sticks.
The length of the i-th stick is l_i.
Snuke is making a snake toy by joining K of the sticks together.
The length of the toy is represented by the sum of the individual sticks that compose it.
Find the maximum possible length of the toy.

-----Constraints-----
 - 1 \leq K \leq N \leq 50
 - 1 \leq l_i \leq 50
 - l_i is an integer.

-----Input-----
Input is given from Standard Input in the following format:
N K
l_1 l_2 l_3 ... l_{N}

-----Output-----
Print the answer.

-----Sample Input-----
5 3
1 2 3 4 5

-----Sample Output-----
12

You can make a toy of length 12 by joining the sticks of lengths 3, 4 and 5, which is the maximum possible length.
[{"code": "N,K=map(int,input().split())\nl=list(map(int,input().split()))\nl.sort(reverse=True)\nsum=0\nfor i in range(K) :\n  sum+=l[i]\nprint(sum)", "passed": true, "time": 0.14, "memory": 14104.0, "status": "done"}, {"code": "n,k=map(int,input().split())\ndata=list(map(int,input().split()))\ny=sorted(data)\ns=0\nfor i in range(0,k):\n    s=s+y[n-1-i]\nprint(s)", "passed": true, "time": 0.14, "memory": 14036.0, "status": "done"}, {"code": "n,k=map(int,input().split())\nl=list(map(int,input().split()))\nl.sort()\nal=sum(l)\nfor i in range(n-k):\n    al -= l[i]\nprint(al)", "passed": true, "time": 0.14, "memory": 14320.0, "status": "done"}, {"code": "n, k = map(int, input().split())\nl = list(map(int, input().split()))\n\nl = sorted(l, reverse=True)\nprint(sum(l[:k]))", "passed": true, "time": 0.14, "memory": 14284.0, "status": "done"}, {"code": "n, k = map(int, input().split())\nl = [int(s) for s in input().split()]\n\nl.sort(reverse=True)\nlength = 0\nfor i in range(k):\n    length += l[i]\nprint(length)", "passed": true, "time": 0.16, "memory": 14180.0, "status": "done"}, {"code": "n,k=list(map(int,input().split()))\nL=list(map(int,input().split()))\nL.sort()\ns=0\nfor i in range(n-k):\n  s+=L[i]\n\nprint((sum(L)-s))\n", "passed": true, "time": 0.14, "memory": 14168.0, "status": "done"}, {"code": "n,k=map(int, input().split())\nl=list(map(int, input().split()))\nl.sort(reverse=True)\nprint(sum(l[:k]))", "passed": true, "time": 0.16, "memory": 14040.0, "status": "done"}, {"code": "a, b = list(map(int, input().split()))\nfinal = list(map(int, input().split()))\n\nfinal.sort(reverse = True)\nprint((sum(final[:b])))\n", "passed": true, "time": 0.85, "memory": 14044.0, "status": "done"}, {"code": "n,k=list(map(int,input().split()))\nl=list(map(int,input().split()))\n\nL=sorted(l)\n\nprint((sum(L[(n-k):])))\n\n", "passed": true, "time": 0.14, "memory": 14076.0, "status": "done"}, {"code": "# \u30b9\u30da\u30fc\u30b9\u533a\u5207\u308a\u306e\u6574\u6570\u306e\u5165\u529b\nn, k = map(int, input().split())\n# \u30b9\u30da\u30fc\u30b9\u533a\u5207\u308a\u306e\u6574\u6570\u306e\u5165\u529b\ndata =  list(map(int, input().split()))\nl = sorted(data, reverse=True)\nans = 0\n\nfor i in range(k):\n    ans += l[i]\n\nprint(ans)", "passed": true, "time": 0.24, "memory": 14152.0, "status": "done"}, {"code": "a,b=input().split()\na=int(a)\nb=int(b)\nc=list(map(int,input().split()))\nc.sort()\nd=0\nfor i in range(b):\n  d=d+c[-i-1]\nprint(d)", "passed": true, "time": 0.18, "memory": 14088.0, "status": "done"}, {"code": "N, K = map(int, input().split())\nl = list(map(int, input().split()))\nl.sort()\nprint(sum(l[-K:]))", "passed": true, "time": 0.24, "memory": 14064.0, "status": "done"}, {"code": "n,k = map(int,input().split())\nl = list(map(int,input().split()))\nl.sort(reverse = True)\nans = 0\nfor i in range(k):\n  ans += l[i]\nprint(ans)", "passed": true, "time": 0.15, "memory": 14244.0, "status": "done"}, {"code": "N, K = map(int, input().split())\nls = list(map(int, input().split()))\nprint(sum(sorted(ls, reverse=True)[:K]))", "passed": true, "time": 0.14, "memory": 14216.0, "status": "done"}, {"code": "N, K = list(map(int, input().split()))\nprint((sum(sorted(map(int, input().split()), reverse=True)[:K])))\n", "passed": true, "time": 0.14, "memory": 14176.0, "status": "done"}, {"code": "from typing import List\n\n\ndef answer(n: int, k: int, l: List[int]) -> int:\n    l.sort(reverse=True)\n    return sum(l[:k])\n\n\ndef main():\n    n, k = list(map(int, input().split()))\n    l = list(map(int, input().split()))\n    print((answer(n, k, l)))\n\n\ndef __starting_point():\n    main()\n\n__starting_point()", "passed": true, "time": 0.15, "memory": 15204.0, "status": "done"}, {"code": "# -*- coding: utf-8 -*-\n\nN, K = map(int, input().split())\nl = list(map(int, input().split()))\n\nl_sorted = sorted(l, reverse=True)\ntotal = 0\nfor i in range(K):\n    total += l_sorted[i]\n\nprint(total)", "passed": true, "time": 0.14, "memory": 14228.0, "status": "done"}, {"code": "lst = input().split()\nN = int(lst[0])\nK = int(lst[1])\n\nL = input().split()\nfor i in range(N):\n   L[i] = int(L[i])\n\nL.sort(reverse=True)\n\nans = 0\n\nfor i in range(K):\n   ans += L[i]\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14236.0, "status": "done"}, {"code": "n,k = map(int,input().split())\ndata = list(map(int,input().split()))\ndata.sort(reverse = True)\nans = 0\nfor i in range(k):\n    ans += data[i]\nprint(ans)", "passed": true, "time": 0.23, "memory": 14244.0, "status": "done"}, {"code": "n, k = list(map(int, input().split()))\nL = list(map(int,input().split()))\nprint((sum(sorted(L, reverse=True)[:k])))\n", "passed": true, "time": 0.14, "memory": 14124.0, "status": "done"}, {"code": "N, K = map(int, input().split())\nl = [int(l_) for l_ in input().split()]\nl.sort(reverse=True)\nprint(sum(l[0:K]))", "passed": true, "time": 0.14, "memory": 14300.0, "status": "done"}, {"code": "N,K = map (int, input ().split ())\nl = [int (x) for x in input().split()]\nlist.sort (l)\nx = 0\nfor i in range (K):\n  x += l[-i-1]\nprint (x)", "passed": true, "time": 0.14, "memory": 14064.0, "status": "done"}, {"code": "N, K = map(int,input().split())\nl = list(map(int,input().split()))\n\nl.sort(reverse=True)\nl_max3 = l[0 : K]\nprint(sum(l_max3))", "passed": true, "time": 0.14, "memory": 14016.0, "status": "done"}, {"code": "n, k = map(int, input().split())\nl = sorted(list(map(int, input().split())), reverse=True)\nprint(sum(l[:k]))", "passed": true, "time": 0.14, "memory": 14088.0, "status": "done"}, {"code": "def abc067b_snake_toy():\n    n, k = map(int, input().split())\n    l = sorted(list(map(int, input().split())), reverse=True)\n    print(sum(l[0:k]))\n\nabc067b_snake_toy()", "passed": true, "time": 0.14, "memory": 14176.0, "status": "done"}, {"code": "n,k = list(map(int, input().split()))\nli = list(map(int, input().split()))\nli.sort(reverse=True)\nsum = 0\nfor i in range(k):\n    sum += li[i]\nprint(sum)\n\n", "passed": true, "time": 0.14, "memory": 14092.0, "status": "done"}, {"code": "n, k = map(int, input().split())\nl = list(map(int, input().split()))\nl.sort()\nprint(sum(l[-k:]))", "passed": true, "time": 0.15, "memory": 14200.0, "status": "done"}, {"code": "n,k = map(int, input().split())\na = list(map(int, input().split()))\na.sort()\nprint(sum(a[-k:]))", "passed": true, "time": 0.15, "memory": 14128.0, "status": "done"}, {"code": "N, K = list(map(int, input().split()))\nL = sorted(list(map(int, input().split())), reverse=True)\nans = 0\nfor i in range(K):\n    ans += L[i]\nprint(ans)\n", "passed": true, "time": 0.53, "memory": 14320.0, "status": "done"}, {"code": "N, K = map(int, input().split())\nl = sorted(list(map(int, input().split())))\nl.reverse()\n\n\nprint(sum(l[:K]))", "passed": true, "time": 0.15, "memory": 14200.0, "status": "done"}, {"code": "n, k = map(int,input().split())\na = list(map(int,input().split()))\na.sort(reverse=True)\n\nans = 0\nfor i in range(k):\n    ans += a[i]\nprint(ans)", "passed": true, "time": 0.3, "memory": 14140.0, "status": "done"}, {"code": "n, k = map(int, input().split())\nl = list(map(int, input().split()))\nl.sort(reverse = True)\ncnt = 0\nfor i in range(k):\n    cnt += l[i]\nprint(cnt)", "passed": true, "time": 0.14, "memory": 14112.0, "status": "done"}, {"code": "n, k = map(int, input().split())\nL = sorted(list(map(int, input().split())), reverse=True)\n\nprint(sum(L[0:k]))", "passed": true, "time": 0.14, "memory": 14272.0, "status": "done"}, {"code": "n,k=list(map(int ,input().split()))\nl=list(map(int ,input().split()))\nans=0\nsorted_l=l.sort()\nl.reverse()\nfor i in range(0,k):\n\tans+=l[i]\n\t\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14144.0, "status": "done"}, {"code": "N, K = list(map(int, input().split()))\nL = sorted(list(map(int, input().split())), reverse=True)\n\nprint((sum(L[:K])))\n\n\n", "passed": true, "time": 0.14, "memory": 14104.0, "status": "done"}, {"code": "n,k=map(int, input().split())\nl=list(map(int,input().split()))\nl.sort()\nl.reverse()\nassert l.__len__()==n\nans=0\nfor i in range(k):\n    ans+=l[i]\nprint(ans)", "passed": true, "time": 0.21, "memory": 14356.0, "status": "done"}, {"code": "n,k = map(int, input().split())\nl = list(map(int, input().split()))\nl.sort(reverse=True)\nprint(sum(l[0:k]))", "passed": true, "time": 0.14, "memory": 14052.0, "status": "done"}, {"code": "N, K = map(int, input().split())\nl = sorted(map(int, input().split()))[::-1]\nsum = 0\ncount = 0\n\nfor L in l:\n    count += 1\n    sum += L\n    if count == K:\n        break\n    \nprint(sum)", "passed": true, "time": 0.23, "memory": 14236.0, "status": "done"}, {"code": "N_hon, K_part = map(int, input().split())\nlength = list(map(int, input().split()))\n\nlength.sort()\nans = sum(length[-K_part:])\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14168.0, "status": "done"}, {"code": "N, K = map(int, input().split())\nnum_list = list(map(int, input().split()))\n\nprint(sum(sorted(num_list, reverse=True)[:K]))", "passed": true, "time": 0.23, "memory": 14024.0, "status": "done"}, {"code": "import sys\nfrom typing import List\n\nn, k = list(map(int, input().split()))\nll = list(map(int, input().split()))\n\nbar = sorted(ll)[::-1]\n#bar2 = bar[::-1]\nans = sum(bar[0:k])\n\nprint(ans)\n", "passed": true, "time": 0.16, "memory": 15032.0, "status": "done"}, {"code": "n,k = map(int,input().split())\nl = sorted(list(map(int,input().split())),reverse=True)\nprint(sum(l[:k]))", "passed": true, "time": 0.14, "memory": 14024.0, "status": "done"}, {"code": "n, k = map(int, input().split())\nl = list(map(int, input().split()))\nl = sorted(l)\nx = 0\nfor i in range(-1, -1-k, -1):\n    x += l[i]\nprint(x)", "passed": true, "time": 0.15, "memory": 14228.0, "status": "done"}, {"code": "N, K = map(int, input().split())\nl = list(map(int, input().split()))\nnew_l = sorted(l, reverse=True)\n\nprint(sum(new_l[0:K]))", "passed": true, "time": 0.15, "memory": 14316.0, "status": "done"}, {"code": "N, K = map(int,input().split())\nL = list(map(int,input().split()))\nL.sort(reverse=True)\n\nprint(sum(L[:K]))", "passed": true, "time": 0.14, "memory": 14104.0, "status": "done"}, {"code": "n, k = map(int, input().split())\nlst = list(map(int, input().split()))\nlst.sort(reverse = True)\nans = 0\nfor i in range(0, k):\n    ans += lst[i]\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14324.0, "status": "done"}, {"code": "N, K=list(map(int, input().split()))\nl=list(map(int, input().split()))\nl.sort()\nprint((sum(l[-K:])))\n", "passed": true, "time": 0.14, "memory": 14216.0, "status": "done"}, {"code": "n, k = list(map(int, input().split()))\nl = sorted(list(map(int, input().split())), reverse=True)\nres = l[:k]\nprint((sum(res)))\n", "passed": true, "time": 0.14, "memory": 14308.0, "status": "done"}, {"code": "n,k=map(int,input().split())\nl=list(map(int,input().split()))\n\nl2=sorted(l, reverse=True)\nlength = sum(l2[0:k])\nprint(length)", "passed": true, "time": 0.14, "memory": 14076.0, "status": "done"}, {"code": "n,k = map(int,input().split())\na = sorted(map(int,input().split()))\na.reverse()\nprint(sum(a[:k]))", "passed": true, "time": 0.14, "memory": 14192.0, "status": "done"}, {"code": "# -*- coding: utf-8 -*-\n\nN,K = list(map(int, input().split()))\nj = list(map(int, input().split()))\nans = 0\n\nj.sort()\nfor i in range(K):\n    ans += j.pop()\n\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14016.0, "status": "done"}, {"code": "#n = int(input())\nn, k = list(map(int, input().split()))\nl = list(map(int, input().split()))\n#l = [list(map(int,input().split())) for i in range(n)]\n\nl.sort(reverse=True)\nprint((sum(l[:k])))\n", "passed": true, "time": 0.2, "memory": 14020.0, "status": "done"}, {"code": "n,k=map(int, input().split())\nl=list(map(int,input().split()))\nl.sort()\nprint(sum(l[-k:]))", "passed": true, "time": 0.23, "memory": 14280.0, "status": "done"}, {"code": "N, K = list(map(int, input().split()))\nl = sorted(map(int, input().split()), reverse=True)\n\nans = 0\nfor i in range(K):\n    ans += l[i]\nprint(ans)\n", "passed": true, "time": 0.14, "memory": 14208.0, "status": "done"}, {"code": "n,k = map(int,input().split())\na = sorted(map(int,input().split()))[::-1]\nprint(sum(a[:k]))", "passed": true, "time": 0.14, "memory": 14212.0, "status": "done"}, {"code": "n,k=map(int,input().split())\nl=[int(x) for x in input().split()]\nl.sort(reverse=True)\nprint(sum(l[0:k]))", "passed": true, "time": 0.15, "memory": 14052.0, "status": "done"}, {"code": "n, k = map(int, input().split())\nl = list(map(int, input().split()))\n\n\nl.sort(reverse=True)\nans = sum(l[:k])\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14040.0, "status": "done"}, {"code": "n, k = (int(x) for x in input().split())\nL = [int(x) for x in input().split()]\nans = sum(sorted(L, reverse=True)[:k])\nprint(ans)", "passed": true, "time": 0.14, "memory": 14172.0, "status": "done"}, {"code": "N,K=map(int,input().split())\nl=list(map(int,input().split()))\nl.sort(reverse=True)\nprint(sum(l[0:K]))", "passed": true, "time": 0.14, "memory": 14020.0, "status": "done"}, {"code": "a,b=map(int,input().split())\nc=input().split()\nc=[int(i) for i in c]\nx=0\nc.sort()\nfor i in range(b):\n    x+=c[len(c)-i-1]\nprint(x)", "passed": true, "time": 0.22, "memory": 14100.0, "status": "done"}, {"code": "n, k = map(int, input().split())\nl = list(map(int, input().split()))\nprint(sum(sorted(l, reverse=True)[0:k]))", "passed": true, "time": 0.15, "memory": 14204.0, "status": "done"}, {"code": "\nN, K = map(int, input().split())\nl = sorted(list(map(int, input().split())), reverse=True)\nprint(sum(l[:K]))", "passed": true, "time": 0.14, "memory": 14060.0, "status": "done"}, {"code": "n,k = map(int,input().split())\nli = list(map(int,input().split()))\nli.sort(reverse=True)\ntol = 0\nfor i in range(k):\n    tol += li[i]\nprint(tol)", "passed": true, "time": 0.14, "memory": 14120.0, "status": "done"}, {"code": "N, K = map(int, input().split())\nl = [int(x) for x in input().split()]\nl.sort()\nl.reverse()\nans = 0\nfor i in range(K):\n    ans += l[i]\nprint(ans)", "passed": true, "time": 0.24, "memory": 14236.0, "status": "done"}, {"code": "a,b = list(map(int,input().split()))\ni = sorted(list(map(int,input().split())))\n\nprint((sum(i[-b:])))\n\n", "passed": true, "time": 0.27, "memory": 14068.0, "status": "done"}, {"code": "N,K = map(int,input().split())\nl = list(sorted(map(int,input().split())))[::-1]\n\nprint(sum(l[:K]))", "passed": true, "time": 0.14, "memory": 14300.0, "status": "done"}, {"code": "N,K=map(int,input().split())\nL=list(map(int,input().split()))\nL.sort(reverse=True)\nprint(sum(L[:K]))", "passed": true, "time": 0.14, "memory": 14140.0, "status": "done"}, {"code": "n, k = map(int, input().split())\ns = list(map(int, input().split()))\ns.sort()\nprint(sum(s[n-k:]))", "passed": true, "time": 0.14, "memory": 14068.0, "status": "done"}, {"code": "n, k = map(int, input().split())\nl = list(map(int, input().split()))\nl_sort = sorted(l)\nprint(sum(l_sort[-k:]))", "passed": true, "time": 0.14, "memory": 14040.0, "status": "done"}, {"code": "n, k = list(map(int, input().split(' ')))\nlength = list(map(int, input().split(' ')))\nlength.sort(reverse=True)\nmax_length = sum(length[:k])\nprint(max_length)\n\n", "passed": true, "time": 0.15, "memory": 14056.0, "status": "done"}, {"code": "n, k = map(int, input().split())\na = list(map(int, input().split()))\na.sort(reverse = True)\nsum = 0\nfor i in range(k):\n    sum = sum + a[i]\nprint(sum)", "passed": true, "time": 0.14, "memory": 14248.0, "status": "done"}, {"code": "N,K = list(map(int, input().split()))\nS = list(map(int, input().split()))\n\nS = sorted(S,reverse=True)\n\nprint((sum(S[:K])))\n", "passed": true, "time": 0.14, "memory": 14180.0, "status": "done"}, {"code": "n, k = map(int, input().split())\nl = sorted(list(map(int, input().split())),reverse=True)\nprint(sum(l[:k]))", "passed": true, "time": 0.14, "memory": 14268.0, "status": "done"}, {"code": "n,k = map(int,input().split())\nl = list(map(int,input().split()))\nl.sort(reverse=True)\nprint(sum(l[:k]))", "passed": true, "time": 0.14, "memory": 14152.0, "status": "done"}, {"code": "N, K = map(int,input().split())\nl = list(map(int,input().split()))\n\nl.sort(reverse=True)\nsnake = []\n\nfor i in range(K):\n    snake.append(l[i])\n\nprint(sum(snake))", "passed": true, "time": 0.14, "memory": 14256.0, "status": "done"}, {"code": "n, k = list(map(int, input().split()))\na = [int(i) for i in input().split()]\n\na.sort(reverse=True)\nprint((sum(a[:k])))\n", "passed": true, "time": 0.14, "memory": 14036.0, "status": "done"}, {"code": "N, K = map(int, input().split())\nL = list(map(int, input().split()))\n\nL.sort()\nL.reverse()\n\nprint(sum(L[:K]))", "passed": true, "time": 0.14, "memory": 14180.0, "status": "done"}, {"code": "# coding: utf-8\n\nnum, choose_num = map(int, input().split())\ntotal = 0\nstick_length = input().split(\" \")\n\nstr_num = [int(n) for n in stick_length]\nlist.sort(str_num, reverse=True)\n\nfor i in range(choose_num):\n    total += str_num[i]\n\nprint(total)", "passed": true, "time": 0.23, "memory": 14072.0, "status": "done"}, {"code": "n,k=map(int,input().split())\na=list(map(int,input().split()))\na.sort(reverse=True)\nans = 0\nfor i in range(k):\n  ans += a[i]\nprint(ans)", "passed": true, "time": 0.14, "memory": 14332.0, "status": "done"}, {"code": "k = list(map(int, input().split()))[1]\nls = list(sorted(list(map(int, input().split()))))\nprint((sum(ls[len(ls) - k:])))\n", "passed": true, "time": 0.14, "memory": 14076.0, "status": "done"}, {"code": "n, k = map(int, input().split())\nl = list(map(int, input().split()))\n\nl_sorted = sorted(l, reverse = True)\nsnake = 0\nfor i in range(k):\n    snake += l_sorted[i]\nprint(snake)", "passed": true, "time": 0.14, "memory": 14196.0, "status": "done"}, {"code": "N, K = list(map(int, input().split()))\nl = list(map(int, input().split()))\nl.sort()\nSum = 0\n\nfor i in range(K):\n    Sum += l[N - i - 1]\n\nprint(Sum)\n", "passed": true, "time": 0.15, "memory": 14212.0, "status": "done"}, {"code": "N,K=list(map(int,input().split()))\nl=list(map(int,input().split()))\nl.sort()\nprint((sum(l[N-K:N])))\n", "passed": true, "time": 0.14, "memory": 14048.0, "status": "done"}, {"code": "a,b=list(map(int,input().split()))\nN = sorted(list(map(int,input().split())))[::-1]\nprint((sum(N[:b])))\n", "passed": true, "time": 0.17, "memory": 14220.0, "status": "done"}, {"code": "N, K = map(int, input().split())\nL = list(map(int, input().split()))\n\nL = sorted(L, reverse=True)\nprint(sum(L[:K]))", "passed": true, "time": 0.14, "memory": 14152.0, "status": "done"}, {"code": "a,b=map(int,input().split())\nle=list(map(int,input().split()))\nle.sort()\ngou=0\nfor i in range(b):\n  gou+=le.pop()\nprint(gou)", "passed": true, "time": 0.14, "memory": 14068.0, "status": "done"}, {"code": "N, K = [int(x) for x in input().split()]\nl = [int(x) for x in input().split()]\n\ns = sorted(l)\n\nans = sum(s[N - K:])\n\nprint(ans)", "passed": true, "time": 0.14, "memory": 14088.0, "status": "done"}, {"code": "n, k = map(int, input().split())\nl = sorted(list(map(int, input().split())))[::-1]\n\nprint(sum(l[:k:]))", "passed": true, "time": 0.14, "memory": 14300.0, "status": "done"}, {"code": "N,K = list(map(int,  input().split()))\nlengths_list = list(map(int, input().split()))\nlengths_list.sort()\nlengths_list.reverse()\nsum_length = 0\nfor i in range(K):\n    sum_length += lengths_list[i]\n\nprint(sum_length)\n", "passed": true, "time": 0.14, "memory": 14140.0, "status": "done"}, {"code": "n, k = map(int, input().split())\nlst = list(map(int, input().split()))\n\nlst = sorted(lst)\nprint(sum(lst[(-1) * k:]))", "passed": true, "time": 0.14, "memory": 14216.0, "status": "done"}, {"code": "_,k=map(int,input().split());print(sum(sorted(map(int,input().split()))[-k:]))", "passed": true, "time": 0.14, "memory": 14012.0, "status": "done"}, {"code": "# B - Snake Toy\ndef main():\n    _, k = map(int, input().split())\n    l = list(map(int, input().split()))\n    cnt = 0\n    l.sort(reverse=True)\n\n    for i in range(k):\n        cnt += l[i]\n    else:\n        print(cnt)\n\n\n\nif __name__ ==  \"__main__\":\n    main()", "passed": true, "time": 0.14, "memory": 14224.0, "status": "done"}, {"code": "#!/usr/bin/env python3\nN, K = list(map(int, input().split()))\nL = sorted(list(map(int, input().split())))\nprint((sum(L[-K:])))\n", "passed": true, "time": 0.14, "memory": 14084.0, "status": "done"}, {"code": "n, k = [int(x) for x in input().split()]\na = [int(x) for x in input().split()]\na.sort()\nprint(sum(a[n-k:n]))", "passed": true, "time": 0.14, "memory": 14248.0, "status": "done"}, {"code": "N, K = list(map(int, input().split()))\nL = list(map(int, input().split()))\n\nL.sort()\nprint((sum(L[-K:])))\n", "passed": true, "time": 0.14, "memory": 14284.0, "status": "done"}, {"code": "n,k=map(int,input().split())\ns=list(map(int,input().split()))\ns.sort(reverse=True)\n\nprint(sum(s[0:k]))", "passed": true, "time": 0.14, "memory": 14040.0, "status": "done"}, {"code": "n,k = map(int, input().split())\nl = list(map(int, input().split()))\nl.sort(reverse=True)\nprint(sum(l[:k]))", "passed": true, "time": 0.14, "memory": 14144.0, "status": "done"}]