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
p02785
u420399048
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['def f(h,k):\n N=len(h)\n t=0\n h.sort()\n for i in range(k-1):\n t+=h[i]\n return sum(h)-t\nN,k=map(int,input().split())\nh=list(map(int,input().split()))\nprint(f(h,k))\n\n ', 'def f(h,k):\n N=len(h)\n t=0\n h.sort()\n for i in range(N-k):\n t+=h[i]\n return t\nN,k=map(int,input().split())\nh=list(map(int,input().split()))\nprint(f(h,k))\n']
['Runtime Error', 'Accepted']
['s987025958', 's964554153']
[26764.0, 25768.0]
[178.0, 163.0]
[192, 176]
p02785
u424240341
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
["n, k = tuple(map(int, input().split(' ')))\nhs = list(map(int, input().split(' ')))\nif k>=n:\n print(0)\n return\nhs = sorted(hs)\nprint(sum(hs[:n-k]))\n", "n, k = tuple(map(int, input().split(' ')))\nhs = list(map(int, input().split(' ')))\nif k>=n:\n print(0)\n exit()\nhs = sorted(hs)\nprint(sum(hs[:n-k]))"]
['Runtime Error', 'Accepted']
['s033132452', 's559435351']
[2940.0, 26764.0]
[17.0, 160.0]
[153, 152]
p02785
u430336181
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int, input().split())\nH = list(map(int, input().split()))\nprint(H)\nfor i in range(min(K,N)):\n saidai = max(H)\n H.remove(saidai)\nprint(H)\n\nprint(sum(H))', 'N, K = map(int, input().split())\nH = list(map(int, input().split()))\n\nHsort = sorted(H, reverse=True)\n\nHuse = Hsort[K:]\n\n\nprint(sum(Huse))']
['Wrong Answer', 'Accepted']
['s920267888', 's193556669']
[26024.0, 26180.0]
[2104.0, 155.0]
[168, 138]
p02785
u431484963
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k = list(map(int,input().split()))\n\n#print(n)\na = list(map(int, input().split()))\n\nsum = 0\na.sort()\nprint(a)\nfor i in range(min(n,k)): a.pop()\n#print(a)\nfor i in range(len(a)):\n sum += a[i]\nprint(sum)\n', 'n,k = list(map(int,input().split()))\n\n#print(n)\na = list(map(int, input().split()))\n\nsum = 0\na.sort()\n#print(a)\nfor i in range(min(n,k)): a.pop()\n#print(a)\nfor i in range(len(a)):\n sum += a[i]\nprint(sum)\n']
['Wrong Answer', 'Accepted']
['s277879703', 's819296027']
[26024.0, 26024.0]
[199.0, 174.0]
[206, 207]
p02785
u437860615
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['h = int(input())\nmem = [0] * 100\ncnt = 0\n \ndef atk(k):\n if k == 1:\n mem[1] = 1\n return 1\n else:\n j = int(k // 2)\n l = 0\n while k / ( 2 ** l) >1:\n l += 1\n \n if mem[l] == 0:\n mem[l] = atk(j) * 2 + 1\n return mem[l]\n else: \n return mem[l]\n\natk(h)\nmem.sort(reverse = True)\nprint(mem[0])\n', 'n, k = map(int, input().split())\nh = list(map(int, input().split()))\n\nh.sort(reverse = True)\n\nif k > n:\n k = n\n\nfor i in range(k):\n h[i] = 0\n\nans = 0\nfor i in range(n):\n ans += h[i]\n \nprint(ans)\n ']
['Runtime Error', 'Accepted']
['s949366839', 's232920755']
[3060.0, 26764.0]
[17.0, 186.0]
[388, 201]
p02785
u440161695
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N,K=map(int,input().split())\nH=list(map(int,input().split()))\nHP=sorted(H)\nfor i in range(K):\n del HP[0]\nprint(sum(HP))', 'N,K=map(int,input().split())\nH=list(map(int,input().split()))\nif N==K:\n print(0)\nelse:\n HP=sorted(H,reverse=True)\n del HP[:K]\n print(sum(HP))\n']
['Runtime Error', 'Accepted']
['s592361304', 's636802480']
[26024.0, 26024.0]
[2104.0, 147.0]
[120, 146]
p02785
u442581202
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k=map(int,input().split())\nm = list(map(int,input().split()))\nm.sort(reverse=True)\nprint(k+sum(m[k:]))\n', 'n,k=map(int,input().split())\nm = list(map(int,input().split()))\nm.sort(reverse=True)\nprint(sum(m[k:]))\n']
['Wrong Answer', 'Accepted']
['s545317851', 's653235220']
[26764.0, 26404.0]
[149.0, 152.0]
[105, 103]
p02785
u442877951
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N,K = map(int,input().split())\nH = list(map(int,input().split()))\ni = 0\ncount = 0\nwhile sum(H[N-K]) == 0:\n while H[N-K] == 0:\n count += 1\n while i <= N-K:\n i += 1\nprint(count)', 'N,K = map(int,input().split())\nH = list(map(int,input().split()))\nh = H.sort()\ni = 0\ncount = 0\nwhile sum(h[N-K]) == 0:\n while h[N-K] == 0:\n count += 1\n while i <= N-K:\n i += 1\nprint(count)', 'N,K = map(int,input().split())\nH = list(map(int,input().split()))\nH.sort(reverse=True)\n \nsum = 0\nfor count in range(N):\n if count >= K:\n sum += H[count]\n \nprint(sum)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s164582180', 's382077105', 's154659268']
[26020.0, 26180.0, 26180.0]
[69.0, 146.0, 183.0]
[187, 200, 183]
p02785
u444238096
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int, input().split())\nA = list(map(int, input().split()))\nlistsort=sorted(A, reverse=True)\nprint(listsort)\ndel listsort[0:K]\nprint(sum(listsort))', 'N, K = map(int, input().split())\nA = list(map(int, input().split()))\nlistsort=sorted(A, reverse=True)\ndel listsort[0:K]\nprint(sum(listsort))']
['Wrong Answer', 'Accepted']
['s632072289', 's979654205']
[26024.0, 26024.0]
[178.0, 149.0]
[156, 140]
p02785
u450292714
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['feneck = input().split()\nH = input().split()\nH_i = [int(h) for h in H]\n\nN = int(feneck[0])\nK = int(feneck[1])\n\nlist.sort(H_i, reverse=True)\n\nif K < len(H):\n sum = 0\n H_i = H[K:]\n for hp in H_i:\n hp = int(hp)\n sum += hp\n print(sum)\nelse:\n print(0)', 'feneck = input().split()\nH = input().split()\nH_i = [int(h) for h in H]\n\nN = int(feneck[0])\nK = int(feneck[1])\n\nlist.sort(H_i, reverse=True)\n\nif K < len(H_i):\n sum = 0\n H_i = H_i[K:]\n for hp in H_i:\n hp = int(hp)\n sum += hp\n print(sum)\nelse:\n print(0)']
['Wrong Answer', 'Accepted']
['s840386169', 's219537224']
[28300.0, 27560.0]
[192.0, 188.0]
[257, 261]
p02785
u453055089
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = map(int, input().split())\nh = list(map(int, input().split()))\n\nh = sorted(h)\nprint(h)\nh.reverse()\n\nprint(sum(h[k:]))', 'n, k = map(int, input().split())\nh = list(map(int, input().split()))\n\nh = sorted(h)\n\nh.reverse()\n\nprint(sum(h[k:]))']
['Wrong Answer', 'Accepted']
['s683163731', 's956377824']
[26180.0, 26764.0]
[179.0, 161.0]
[123, 115]
p02785
u460386402
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k=map(int,input().split())\nh=[0]*10**9\nh=list(map(int,input().split()))\nH=max(h)\n\nfor i in range(k):\n H[i]=0\n\nmon=0\nfor i in range(n):\n mon+=h[i]\n \nprint(mon)', 'n,k=map(int,input().split())\nh=list(map(int,input().split()))\nh.sort(reverse=True)\nif n<=k:\n print(0)\n exit()\n \nfor i in range(k):\n h[i]=0\nprint(sum(h))']
['Runtime Error', 'Accepted']
['s729543015', 's730224810']
[3060.0, 31672.0]
[17.0, 119.0]
[163, 156]
p02785
u471593927
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N,K = map(int,input().split())\nH = map(int,input().split()).sort()\n\nprint(sum(H[0:N-K]))', 'N,K = map(int,input().split())\nH = [int(x) for x in input().split()]\nH.sort()\n\nif N >= K:\n print(sum(H[0:N-K]))\nelse:\n print(0)']
['Runtime Error', 'Accepted']
['s476618745', 's718646152']
[19344.0, 26024.0]
[37.0, 164.0]
[88, 133]
p02785
u482789362
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int, input().split())\nH = map(int, input().split())\nH = H[:-K]\nprint(sum(H))', 'N, K = map(int, input().split())\nH = list(map(int, input().split()))\nH.sort()\nif K != 0:\n H = H[:-K]\nprint(sum(H))\n']
['Runtime Error', 'Accepted']
['s972073479', 's593447067']
[20240.0, 26180.0]
[37.0, 153.0]
[87, 118]
p02785
u490489966
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k=map(int,input().split())\nh=list(map(int,input().split()))\nh.sort()\nif n<k:\n print(0)\n print(h)\n\nelse:\n a=h[:-k]\n ans=sum(a)\n print(h,ans)', 'n,k=map(int,input().split())\nh=list(map(int,input().split()))\nh.sort()\nif n<k:\n print(0)\n\nelse:\n a=h[:-k]\n ans=sum(a)', 'n,k=map(int,input().split())\nh=list(map(int,input().split()))\nh.sort()\nif n<k:\n print(0)\nelse:\n if k==0:\n a=h\n else:\n a=h[:-k]\n summ=0\n for i in a:\n summ+=i\n print(summ)']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s411373983', 's775389883', 's883832024']
[26024.0, 25768.0, 26764.0]
[198.0, 151.0, 164.0]
[156, 126, 208]
p02785
u499106786
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = input().split(" ")\nH = list(map(int, input().split()))\nsorted_H = sort(H)\nK = int(K)\nprint(sum(H[:-K]))', 'N, K = input().split(" ")\nH = list(map(int, input().split()))\nH.sort()\nK = int(K)\n\nif K >= N:\n\tprint(0)\nelif: K == 0:\n print(sum(H))\nelse:\n\tprint(sum(H[:-K]))', 'N, K = input().split(" ")\nH = list(map(int, input().split()))\nH.sort()\nK = int(K)\n \nif K >= len(H):\n\tprint(0)\nelif: K == 0:\n\tprint(sum(H))\nelse:\n\tprint(sum(H[:-K]))', 'N, K = input().split(" ")\nH = list(map(int, input().split()))\nH.sort()\nK = int(K)\n\nif K >= len(H):\n\tprint(0)\nelif: K == 0:\n\tprint(sum(H))\nelse:\n\tprint(sum(H[:-K]))', 'N, K = input().split(" ")\nH = list(map(int, input().split()))\nH.sort()\nK = int(K)\n \nif K >= len(H):\n\tprint(0)\nelif: K == 0:\n print(sum(H))\nelse:\n\tprint(sum(H[:-K]))', 'N, K = input().split(" ")\nH = list(map(int, input().split()))\nH.sort()\nK = int(K)\n \nif K >= int(N):\n\tprint(0)\nelif: K == 0:\n\tprint(sum(H))\nelse:\n\tprint(sum(H[:-K]))', 'N, K = input().split(" ")\nH = list(map(int, input().split()))\nH.sort()\nK = int(K)\n\nif K >= int(N):\n\tprint(0)\nelif K == 0:\n\tprint(sum(H))\nelse:\n\tprint(sum(H[:-K]))']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s419320575', 's421173826', 's431990655', 's478886802', 's792284676', 's944583804', 's920434568']
[26764.0, 2940.0, 2940.0, 2940.0, 2940.0, 2940.0, 26180.0]
[68.0, 17.0, 17.0, 17.0, 17.0, 17.0, 150.0]
[110, 161, 164, 163, 167, 164, 162]
p02785
u501265339
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['import heapq\n\ndef heapsort(iterable):\n h = []\n for value in iterable:\n heapq.heappush(h, value)\n return [heapq.heappop(h) for i in range(len(h))]\n\nN, K = map(int, input().split(" "))\nH = list(map(int, input().split(" ")))\n\nheapsort(H)\n# heapq.heapify(H)\n# H.sort(reverse=True)\n\nif K >= N:\n print(0)\nelse:\n for i in range(K):\n del H[i]\n print(sum(H))\n', 'N, K = map(int, input().split())\nH = map(int, input().split())\n\nH.sort(reverse=True)\n\nif K >= N:\n print(0)\nelse:\n print(sum(H[K:]))\n', 'N, K = map(int, input().split())\nH = map(int, input().split())\n\nH.sorted(reverse=True)\n\nif K >= N:\n print(0)\nelse:\n for i in range(K):\n print(sum(H[K:]))\n', 'N, K = map(int, input().split())\nH = map(int, input().split())\n\nH.sort(reverse=True)\n\nif K >= N:\n print(0)\nelse:\n for i in range(K):\n del H[i]\n print(sum(H))\n', 'N, K = map(int, input().split())\nH = map(int, input().split())\n\nH.sorted(reverse=True)\nans=0\n\nif K >= N:\n print(ans)\nelse:\n for i in range(K):\n ans += 1\n', 'N, K = map(int, input().split())\nH = map(int, input().split())\n\nH.sorted(reverse=True)\n\nif K >= N:\n print(0)\nelse:\n print(sum(H[K:]))\n', 'N, K = map(int, input().split())\nH = list(map(int, input().split()))\n\nH.sort(reverse=True)\n\nif K >= N:\n print(0)\nelse:\n print(sum(H[K:]))\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s621671939', 's623070047', 's671020671', 's864663076', 's896635491', 's965612162', 's108544328']
[25896.0, 20240.0, 20240.0, 20980.0, 20240.0, 20980.0, 26024.0]
[2104.0, 37.0, 37.0, 37.0, 38.0, 37.0, 148.0]
[382, 138, 167, 174, 166, 140, 144]
p02785
u506671931
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
["n, k = map(int, input().split())\nb = list(map(int, input().split()))\n\nb.sort(reverse=True)\nans = 0\n\nwhile k > 0:\n if n < 0:\n break\n else:\n del b[:k]\n n -= k\n\nif n == 0:\n print('0')\nelse:\n print(sum(b))", "n, k = map(int, input().split())\nb = list(map(int, input().split()))\n\nb.sort(reverse=True)\nans = 0\n\ndel b[:k]\nn -= k\n\nif n < 0:\n print('0')\nelse:\n print(sum(b))"]
['Wrong Answer', 'Accepted']
['s760658280', 's280663169']
[26764.0, 25768.0]
[145.0, 147.0]
[234, 166]
p02785
u507456172
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N,K=map(int,input().split())\nH=list(map(int,input().split()))\nif N>K:\n H.sort()\n del H[N-K+1:]\n print(sum(H))\nelse:\n print(0)', 'N,K=map(int,input().split())\nH=list(map(int,input().split()))\nif N>K:\n H.sort()\n del H[N-K:]\n print(sum(H))\nelse:\n print(0)']
['Wrong Answer', 'Accepted']
['s262641974', 's026888769']
[26024.0, 26764.0]
[155.0, 149.0]
[129, 127]
p02785
u507621996
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['# coding utf-8\nimport math\nimport sys\n\n\nN, K = map(int, input().rstrip().split())\n\nH = list(map(int, input().rstrip().split()))\nH.sort()\n\nif N > K:\n print(H[:-K])\n ans = sum(H)\nelse:\n ans = 0\n\nprint(ans)\n', '# coding utf-8\nimport math\n\nN, K = map(int, input().rstrip().split())\n\nH = list(map(int, input().rstrip().split()))\nH.sort()\n\nif N > K:\n if K == 0:\n ans = sum(H)\n else:\n ans = sum(H[:-K])\nelse:\n ans = 0\n\nprint(ans)\n']
['Wrong Answer', 'Accepted']
['s649108039', 's182429770']
[27300.0, 27300.0]
[173.0, 148.0]
[213, 238]
p02785
u508061226
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n ,k = input().split();\nn = int(n);\nk = int(k);\n\nH = list(map(int, input().split()));\n\n\nyowa = H.sort(reverse=True)[k+1:];\n\nans = sum(yowa);\n\nprint(ans);', 'n ,k = input().split();\nn = int(n);\nk = int(k);\n\nH = list(map(int, input().split()));\n\n\nH.sort(reverse=True);\nyowa = H[k:];\n\nans = sum(yowa);\n\nprint(ans);']
['Runtime Error', 'Accepted']
['s401308191', 's086032386']
[26764.0, 26764.0]
[152.0, 154.0]
[202, 203]
p02785
u509392332
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int,input().split())\nHi = list(map(int,input().split()))\nHi.sort(reverse=True)\nprint(Hi)\ndel Hi[:K]\nprint(Hi)\nmin_count = sum(Hi)\nprint(min_count)', 'N, K = map(int,input().split())\nHi = list(map(int,input().split()))\nHi.sort(reverse=True)\ndel Hi[:K]\nmin_count = sum(Hi)\nprint(min_count)']
['Wrong Answer', 'Accepted']
['s692735469', 's883852242']
[26764.0, 26024.0]
[189.0, 153.0]
[157, 137]
p02785
u510434738
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = input().split()\nN = int(N)\nK = int(K)\nH = input().split()\nH = [int(h) for h in H]\nH.sort()\nfor k in range(0, K-1):\n H[k] = 0\nprint(sum(H))', 'N, K = input().split()\nN = int(N)\nK = int(K)\nH = input().split()\nH = [int(h) for h in H]\nH.sort(reverse = True)\n# print(H)\nI = K if K <= N else N\nfor i in range(0, I):\n H[i] = 0\n# print(H)\nprint(sum(H))']
['Runtime Error', 'Accepted']
['s548173246', 's532379375']
[26024.0, 26356.0]
[169.0, 173.0]
[148, 205]
p02785
u510582860
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N,K=map(int,input().split())\nH=sorted(list(map(int,input().split())))\nprint(H[:N-K])\nif len(H) < K:\n print(0)\nelse:\n print(sum(H[N-K:]))\n', 'N,K=map(int,input().split())\nH=sorted(list(map(int,input().split())))\nif len(H) < K:\n print(0)\nelse:\n print(sum(H[:N-K]))\n']
['Wrong Answer', 'Accepted']
['s772530167', 's434785826']
[31348.0, 31540.0]
[127.0, 108.0]
[143, 128]
p02785
u514390882
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = map(int, input().split())\n# h = list(map(int, input().split()))\nh = [i for i in range(n)]\nh = sorted(h)\n# print(h[:-1], h)\nif k > len(h):\n print(0)\nelse:\n if k != 0:\n del h[-k:]\n print(sum(h))', 'n, k = map(int, input().split())\nh = list(map(int, input().split()))\n\nh = sorted(h)\n# print(h[:-1], h)\nif k > len(h):\n print(0)\nelse:\n if k != 0:\n del h[-k:]\n print(sum(h))']
['Wrong Answer', 'Accepted']
['s216757312', 's360071841']
[12592.0, 26180.0]
[34.0, 158.0]
[215, 215]
p02785
u516554284
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k=map(int,input().split())\na=list(map(int,input().split()))\n\nif n<=k:\n print(k)\n \nelse:\n a=sorted(a)\n b=n-k\n ans=0\n for x in range(n-k):\n ans+=a[x]\n \n print(ans+k)', 'n,k=map(int,input().split())\na=list(map(int,input().split()))\n\nif n<=k:\n print(0)\n \nelse:\n a=sorted(a)\n b=n-k\n ans=0\n for x in range(n-k):\n ans+=a[x]\n \n print(ans)\n']
['Wrong Answer', 'Accepted']
['s937430569', 's479675416']
[31440.0, 31572.0]
[115.0, 122.0]
[178, 177]
p02785
u516949135
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int,input().split())\nMonsters = list(map(int,input().split()))\nMonsters = sorted(Monsters)\n\nfor i in range(min(K,N)):\n Monsters[i]=0\nprint(sum(Monsters))\n ', 'N, K = map(int,input().split())\nMonsters = list(map(int,input().split()))\nMonsters.sort(reverse=True)\n\nfor i in range(min(K,N)):\n Monsters[i]=0\nprint(sum(Monsters))\n ']
['Wrong Answer', 'Accepted']
['s375200767', 's161081066']
[31620.0, 31588.0]
[128.0, 121.0]
[172, 172]
p02785
u517870745
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = map(int, input().split())\nh = list(map(int, input().split()))\n\nif len(h) <= k:\n\tprint(0)\n\nelse:\n\th.sort(reverse = True)\n\n\tfor i in range(0, k):\n\t\th[i] = 0\n\n\tprint(k)', 'n, k = map(int, input().split())\nh = list(map(int, input().split()))\n\nif len(h) <= k:\n\tprint(len(h))\n\nelse:\n\th.sort(reverse = True)\n\n\tfor i in range(0, k):\n\t\th[i] = 0\n\n\tprint(sum(h) + k)', 'n, k = map(int, input().split())\nh = list(map(int, input().split()))\n\nif len(h) <= k:\n\tprint(0)\n\nelse:\n\th.sort(reverse = True)\n\n\tfor i in range(0, k):\n\t\th[i] = 0\n\n\tprint(sum(h))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s104040335', 's239644972', 's530676178']
[26024.0, 26024.0, 26024.0]
[157.0, 160.0, 163.0]
[172, 186, 177]
p02785
u524489226
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = list(map(int, input().split()))\nlist_h = sorted(list(map(int, input().split())), reverse=True)\n\nans = 0\nfor i in list_h:\n if k > 0:\n k = k - 1\n ans = ans + 1\n else:\n ans = ans + i\nprint(ans)', 'n, k = list(map(int, input().split()))\nlist_h = sorted(list(map(int, input().split())), reverse=True)\n\nans = 0\nfor n, i in enumerate(list_h):\n if k > 0:\n k = k - 1\n list_h[n] = 0\n else:\n break\n\nans = ans + sum(list_h)\nprint(ans)']
['Wrong Answer', 'Accepted']
['s104199526', 's448471263']
[26020.0, 26024.0]
[191.0, 190.0]
[224, 255]
p02785
u527616458
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['a,b = map(int, input().split())\nbox = list(map(int, input().split()))\nbox.sort()\nans = sum(box[b:])\nprint(ans)', 'a,b = map(int, input().split())\nbox = list(map(int, input().split()))\nbox.sort(reverse=True)\nans = sum(box[b:])\nprint(ans)']
['Wrong Answer', 'Accepted']
['s828172410', 's628784838']
[26180.0, 26764.0]
[150.0, 167.0]
[110, 122]
p02785
u530883476
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k=map(int, input().split())\nh=list(map(int,input().split()))\nH=sorted(h,reverse=True)\nif n>=k:\n\tfor i in range(k):\n\t\tH[i]=0\nprint(sum(H))\nelse: \n\tprint(0)', 'n,k=map(int, input().split())\nh=list(map(int,input().split()))\nH=sorted(h,reverse=True)\nif n>=k:\n for i in range(k):\n H[i]=0\n print(sum(H))\nelse: \n print(0)']
['Runtime Error', 'Accepted']
['s044993958', 's494196332']
[3068.0, 26764.0]
[17.0, 163.0]
[156, 157]
p02785
u534634083
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['enemmyCountN,killerTimeK = map(int,input().split())\nenemyHp = input().split()\n\nenemyHp.sort()\nprint(enemyHp)\nresultEnemyCount = enemmyCountN - killerTimeK\ncountNormal = 0\n\n\nfor i in range(resultEnemyCount):\n countNormal += int(enemyHp[i])\n\nprint(countNormal)', 'N,K = input().split()\nH = input().split()\n\nif N < K:\n times = N\nelse:\n times = K\n\nfor i in range(int(times)):\n H.remove(max(H))\n\nprint(sum(H))', 'N,K = input().split()\nH = input().split()\n\nif N < K:\n times = N\nelse:\n times = K\n\nfor i in range(times):\n H.remove(max(H))\n\nprint(sum(H))', 'enemmyCountN,killerTimeK = map(int,input().split())\nenemyHp = input().split()\n\nintEnemyHp = [int(i) for i in enemyHp]\nintEnemyHp.sort()\n\nresultEnemyCount = enemmyCountN - killerTimeK\ncountNormal = 0\n\n\n # print(0)\n\n# else:\nfor i in range(resultEnemyCount):\n countNormal += intEnemyHp[i]\nprint(countNormal)']
['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted']
['s070441313', 's534365486', 's673972313', 's523903918']
[28808.0, 20240.0, 20980.0, 26764.0]
[260.0, 2104.0, 37.0, 182.0]
[261, 151, 146, 343]
p02785
u539517139
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k=map(int,input().split())\nh=list(map(int,input().split()))\nif n<=k:\n print(0)\nelse:\n h.sort()\n print(sum(h[:n-k])', 'n,k=map(int,input().split())\nh=list(map(int,input().split()))\nif n<=k:\n print(0)\nelse:\n h.sort()\n print(sum(h[:n-k]))']
['Runtime Error', 'Accepted']
['s549386160', 's400486265']
[2940.0, 26356.0]
[19.0, 152.0]
[119, 120]
p02785
u540841127
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N,K = map(int,input().split())\nH = sorted(list(map(int,input().split())))\n\nH = H[:K-1]\n\nprint(sum(H))', 'N,K = map(int,input().split())\nH = sorted(list(map(int,input().split())))\n\n', 'N,K = map(int,input().split())\nH = sorted(list(map(int,input().split())))\n\nfor i in range(K):\n if len(H) == 0:\n break\n H.pop()\n\nprint(sum(H))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s031367606', 's045054436', 's954321840']
[26764.0, 26024.0, 25768.0]
[155.0, 150.0, 187.0]
[101, 75, 146]
p02785
u541551314
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['l, k = map(int, input().split(" "))\nif k >= l:\n print(0)\nelse:\n print(sorted(map(int, input().split(" ")))[:l-k])\n', 'l, k = map(int, input().split(" "))\nif k >= l:\n print(0)\nelse:\n print(sum(sorted(map(int, input().split(" ")))[:l-k]))']
['Wrong Answer', 'Accepted']
['s735741759', 's364275545']
[26764.0, 26024.0]
[170.0, 146.0]
[116, 120]
p02785
u542774596
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = map(int, input().split())\nH = list(map(int, input().split()))\n\nH.sort(reverse=True)\nfor i in range(k):\n H[i] = 0\n print(H)\n\nprint(sum(H))', 'n, k = map(int, input().split())\nH = list(map(int, input().split()))\nif k>=n:\n print(0)\nelse:\n H.sort(reverse=True)\n for i in range(k):\n H[i] = 0\n\n print(sum(H))']
['Runtime Error', 'Accepted']
['s686925489', 's258337426']
[152068.0, 31572.0]
[2275.0, 126.0]
[146, 170]
p02785
u543000780
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int, input().split())\nH = list(map(int, input().split()))\nif len(H) <= K:\n print(len(H))\nelse:\n print(K+sum(sorted(H)[:len(H)-K]))', 'N, K = map(int, input().split())\nH = list(map(int, input().split()))\nif len(H) <= K:\n print(0)\nelse:\n print(sum(sorted(H)[:len(H)-K]))\n']
['Wrong Answer', 'Accepted']
['s865629076', 's217488683']
[31436.0, 31452.0]
[103.0, 103.0]
[143, 137]
p02785
u547728429
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['import sys\ninput = sys.stdin.readline\n\nN, K = map(int, input().split())\nH = [int(input()) for _ in range(N)]\n\nif K >= N:\n print(0)\nelse:\n H.sort(reverse=True)\n for i in range(0, K):\n H.pop(i)\n\n print(sum(H))', 'import sys\ninput = sys.stdin.readline\n\nN, K = map(int, input().split())\nH = list(map(int, input().split()))\n\nif K >= N:\n print(0)\nelse:\n H.sort(reverse=True)\n print(sum(H[K:]))']
['Runtime Error', 'Accepted']
['s546768015', 's604647588']
[7868.0, 25888.0]
[37.0, 153.0]
[226, 185]
p02785
u549047581
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N,K = map(int,input().split())\nH = [int(x) for x in input().split()]\nH.sort()\nAns = 0\nfor x in (0,K):\n H.pop()\nfor x in range(0,N):\n Ans = H[x]+Ans\nprint(Ans)', 'N,K = map(int,input().split())\nH = [int(x) for x in input().split()]\n#print(H)\nH.sort()\n#print(H)\nAns = 0\nfor x in range(0,min(K,N)):\n# print(x)\n H.pop()\n#print(H)\nfor x in H:\n Ans = x+Ans\nprint(Ans)']
['Runtime Error', 'Accepted']
['s023873765', 's147622057']
[26024.0, 26764.0]
[191.0, 172.0]
[164, 208]
p02785
u552143188
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int, input().split())\nH = [int(h) for h in input().split()]\nH = list(sorted(H, reverse = True))\nprint(H)\nif len(H) <= K:\n print(0)\nelse:\n del H[0:K]\n print(sum(H))', 'N, K = map(int, input().split())\nH = [int(h) for h in input().split()]\nH = list(sorted(H, reverse = True))\n\nif len(H) <= K:\n print(0)\nelse:\n del H[0:K]\n print(sum(H))']
['Wrong Answer', 'Accepted']
['s520061934', 's937741622']
[26024.0, 26024.0]
[185.0, 169.0]
[177, 169]
p02785
u556225812
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int, input().split())\nlst = list(map(int, input().split()))\nlst.sort(reverse=True)\nans = 0\n\nif N <= K:\n print(N)\nelse:\n print(sum(lst[K:])+K)', 'N, K = map(int, input().split())\nlst = list(map(int, input().split()))\nlst.sort(reverse=True)\nans = 0\n\nif N <= K:\n print(0)\nelse:\n print(sum(lst[K:]))\n\n']
['Wrong Answer', 'Accepted']
['s843593249', 's622818060']
[26180.0, 26764.0]
[150.0, 149.0]
[154, 154]
p02785
u557494880
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N,K = map(int,input().split())\nH = list(map(int,input().split()))\nH.sort()\nans = K\nfor i in range(K):\n H.pop()\nans += sum(H)', 'N,K = map(int,input().split())\nH = list(map(int,input().split()))\nH.sort()\nans = K\nfor i in range(K):\n H.pop()\nans += sum(H)\nprint(ans)', 'N,K = map(int,input().split())\nH = list(map(int,input().split()))\nH.sort()\nans = 0\nfor i in range(min(K,N)):\n H.pop()\nans += sum(H)\nprint(ans)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s208811626', 's650726504', 's185268061']
[26024.0, 26764.0, 26024.0]
[165.0, 163.0, 164.0]
[127, 138, 145]
p02785
u562550538
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k=map(int,input().split())\nhp=list(map(int,input().split()))\nhp.sort(reverse=True)\nprint(sum(hp[-k:]))', 'n,k=map(int,input().split())\nhp=list(map(int,input().split()))\nhp.sort(reverse=True)\nprint(sum(hp[k:]))']
['Wrong Answer', 'Accepted']
['s285580928', 's721341728']
[26024.0, 26024.0]
[152.0, 155.0]
[104, 103]
p02785
u566574814
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k=map(int,input().split())\nh=list(map(int,input().split()))\n\nh.sort(reverse=True)\n\ncnt=0\nfor i in range(1,n):\n cnt += h[i]\n\nprint(cnt+1)', 'n,k=map(int,input().split())\nh=list(map(int,input().split()))\n\nh.sort(reverse=True)\n\n\nprint(sum(h[k:]))']
['Wrong Answer', 'Accepted']
['s978600068', 's414580652']
[26176.0, 26764.0]
[183.0, 156.0]
[139, 114]
p02785
u574437765
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['# coding: utf-8\n# Your code here!\n\nn, k = map(int, input().split())\nhs = list(map(int, input().split()))\nhs.sort()\nif (n <= k):\n print(0)\nelse:\n print(sum(hs[k:]))\n ', 'n, k = map(int, input().split())\nhs = list(map(int, input().split()))\nhs.sort(reverse=True)\nif (n <= k):\n print(0)\nelse:\n print(sum(hs[k:]))\n ']
['Wrong Answer', 'Accepted']
['s077998981', 's280797832']
[26764.0, 26024.0]
[153.0, 152.0]
[168, 145]
p02785
u578647703
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int, input().split())\nH = list(map(int, input().split()))\nH.sort(reverse=True)\nif K <= N and K != 0:\n H.remove(H[:K])\nelif K > N and K != 0:\n H.clear()\nprint(sum(H))', 'N, K = map(int, input().split())\nH = list(map(int, input().split()))\nH.sort(reverse=True)\nif K == 0:\n pass\nelif K <= N:\n H = H[(K+1):]\nelif K > N:\n H.clear()\nprint(sum(H))', 'N, K = map(int, input().split())\nH = list(map(int, input().split()))\nH.sort(reverse=True)\nif K == 0:\n pass\nelif K > N:\n H.clear()\nelse:\n H = H[(K+1):]\ns = sum(H)\nprint(s)', 'N, K = map(int, input().split())\nH = list(map(int, input().split()))\nH.sort()\nif K == 0:\n pass\nelif K > N:\n H.clear()\nelse:\n H = H[:-K]\nprint(sum(H))']
['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted']
['s709849638', 's903462529', 's946672453', 's818508833']
[26024.0, 26180.0, 26024.0, 26764.0]
[155.0, 152.0, 154.0, 153.0]
[182, 180, 179, 158]
p02785
u580873239
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k=map(int,input().split())\nH=list(map(int,input().split()))\nH2=H[::-1]\nfor i in range(k):\n if len(H2)>0:\n H2.pop(len(H2)-1)\nprint(sum(H2))', 'n,k=map(int,input().split())\nH=list(map(int,input().split()))\nH.sort()\nif n>k:\n for i in range(k):\n H.pop(n-i-1)\n ans=sum(H)\nelse:\n ans=0\nprint(ans)']
['Wrong Answer', 'Accepted']
['s626971718', 's225219786']
[26764.0, 26180.0]
[139.0, 186.0]
[150, 164]
p02785
u585348179
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = map(int, input().split())\nh = sorted(map(int, input().split()))\n \nx = 0\nprint(h)\nif n - k <= 0:\n print(0)\nelse:\n for i in range(n-k):\n x += h[i]\n print(x)', 'n, k = map(int, input().split())\nh = sorted(map(int, input().split()))\n \nx = 0\n\nif n - k <= 0:\n print(0)\nelse:\n for i in range(n-k):\n x += h[i]\n print(x)']
['Wrong Answer', 'Accepted']
['s893718664', 's964828584']
[26180.0, 26020.0]
[195.0, 170.0]
[177, 169]
p02785
u590230319
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = map(int, input().split())\n#print("n={}, k={}".format(n,k))\n\nh = input().split()\n#print(h)\n\nhs = sorted(h)\n#print(hs)\n\n\nif n >= k: \n num_mon = n - k \nelse:\n num_mon = 0\nprint(num_mon)\n\n\nmon_att = hs[0:num_mon]\nprint(mon_att)\n\n\nmin_att = sum(map(int, mon_att))\nprint(min_att)', 'n, k = map(int, input().split())\n#print("n={}, k={}".format(n,k))\n\nh = input().split()\n#print(h)\n\nhs = sorted(h)\n#print(hs)\n\n\nmon_att = hs[0:len(hs)+1-k]\n#print(mon_att)\n\n\nmin_att = sum(map(int, mon_att))\nprint(min_att)', 'n, k = map(int, input().split())\n#print("n={}, k={}".format(n,k))\n\nA = list(map(int, input().split()))\n#print(h)\n\nA.sort(reverse=True)\n#print(hs)\n\nprint(sum(A[k:]))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s213996178', 's916953301', 's228555987']
[28684.0, 21160.0, 26764.0]
[223.0, 198.0, 155.0]
[423, 299, 164]
p02785
u598378638
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n , k = map(int, input().split())\nhp = list(map(int, input().split()))\n\nsum_hp = 0\n\nprint(hp)\nhp.sort()\nprint(hp)\n\nfor i in range(k):\n if(len(hp)> 0):\n hp.pop()\n\nprint(hp)\n\nfor j in hp:\n sum_hp = sum_hp + int(j)\n\nprint(str(sum_hp))', 'n , k = map(int, input().split())\nhp = list(map(int, input().split()))\n\nsum_hp = 0\n\n\nhp.sort()\n\n\nfor i in range(k):\n if(len(hp)> 0):\n hp.pop()\n\n\n\nfor j in hp:\n sum_hp = sum_hp + int(j)\n\nprint(str(sum_hp))']
['Wrong Answer', 'Accepted']
['s231051916', 's179248800']
[26352.0, 26024.0]
[254.0, 184.0]
[244, 217]
p02785
u602158689
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
["temp = input().split(' ')\nmonter_count = int(temp[0])\nkill_count = int(temp[1])\n\ntemp = input().split(' ')\n\ntemp = [int(s) for s in temp]\n\ntemp.sort(reverse=True)\ndel(temp[0:monter_count])\nprint(temp.sum())", "import math\n\ntemp = input().split(' ')\nmonter_count = int(temp[0])\nkill_count = int(temp[1])\n \ntemp = input().split(' ')\n\ntemp = [int(s) for s in temp]\n\ntemp.sort(reverse=True)\ndel(temp[0:kill_count])\n\nprint(sum(temp))"]
['Runtime Error', 'Accepted']
['s530485079', 's069193286']
[26180.0, 25764.0]
[149.0, 152.0]
[264, 276]
p02785
u607074939
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N,K = map(int,input().split())\nH = input().split()\nH = [int h for h in H]\nH = sorted(H)\n\nif N > K:\n print(K + sum(H[:H-K]))\nelse:\n print(K)\n', 'N,K = map(int,input().split())\nH = list(map(int, input().split()))\nH = sorted(H)\n\n\nif N > K:\n print(sum(H[:N-K]))\nelse:\n print(0)\n']
['Runtime Error', 'Accepted']
['s641688283', 's851086545']
[2940.0, 26764.0]
[17.0, 157.0]
[146, 137]
p02785
u609258687
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['from heapq import heapify, heappop\nfrom math import ceil\nN, K = map(int, input().split())\nH = list(map(int, input().split()))\nHminus = list(map(lambda x: x*(-1), H))\nHheap = heapify(Hminus)\nfor _ in range(K):\n heappop(Hheap)\nprint(sum(Hheap))', 'from heapq import heapify, heappop\nfrom math import ceil\nN, K = map(int, input().split())\nH = list(map(int, input().split()))\n# N=8\n# K=9\n# H=[7, 9, 3, 2, 3, 8, 4, 6]\n\nHminus = list(map(lambda x: x*(-1), H))\n# print(type(Hminus))\nheapify(Hminus)\n# print(Hminus)\nif K > len(H):\n print(0)\nelse:\n for _ in range(K):\n heappop(Hminus)\n print(sum(Hminus)*(-1))']
['Runtime Error', 'Accepted']
['s210456739', 's884891061']
[27404.0, 27404.0]
[102.0, 258.0]
[245, 370]
p02785
u609502714
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['import math\n\nn,k=map(int,input().split())\nenemys = list(map(int,input().split()))\n\nenemys.sort(reverse=True)\ncount = 0\nfor e in enemys:\n if(k > 0):\n count += 1\n k -= 1\n else:\n count += e\n\nprint(count)\n\n', 'import math\n\nn,k=map(int,input().split())\nenemys = list(map(int,input().split()))\n\nenemys.sort(reverse=True)\ncount = 0\nfor e in enemys:\n if(k > 0):\n k -= 1\n else:\n count += e\n\nprint(count)\n\n']
['Wrong Answer', 'Accepted']
['s889980069', 's261884152']
[27300.0, 25740.0]
[192.0, 177.0]
[213, 198]
p02785
u612975321
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['import sys\ninput = sys.stdin.buffer.readline\ndef MAP(): return map(int, input().split())\ndef LIST(): return list(map(int, input().split()))\n\nn, k = MAP()\nh = LIST()\nh.sort()\n\nif k >= n:\n print(0)\nelse:\n print(sum(h[k:]))', 'import sys\ninput = sys.stdin.buffer.readline\ndef MAP(): return map(int, input().split())\ndef LIST(): return list(map(int, input().split()))\n\nn, k = MAP()\nh = LIST()\nh.sort(reverse=True)\n\nif k >= n:\n print(0)\nelse:\n print(sum(h[k:]))\n']
['Wrong Answer', 'Accepted']
['s425508025', 's249200345']
[29296.0, 29204.0]
[101.0, 105.0]
[226, 239]
p02785
u619455726
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['# -*- coding: utf-8 -*-\nn,k=map(int, input().split())\nh=list(map(int, input().split()))\nb =sorted(h)[0:-n]\n\n\nprint(sum(b))', '# -*- coding: utf-8 -*-\nn,k=map(int, input().split())\nh=list(map(int, input().split()))\nb =sorted(h)\nif k != 0:\n b = b[:-k]\n\nprint(sum(b))']
['Wrong Answer', 'Accepted']
['s447048475', 's691271679']
[26024.0, 26180.0]
[143.0, 154.0]
[135, 154]
p02785
u619850971
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k = map(int, input().split())\nL = list(map(int,input().split()))\nans = 0\nS = sorted(L,reverse=True)\nprint(S)\nfor i in range(n):\n if k > 0:\n # ans += 1 \n k = k-1\n elif k == 0:\n ans = ans+S[i]\nprint(ans)', 'n,k = map(int, input().split())\nL = list(map(int,input().split()))\nans = 0\nS = sorted(L)\nprint(S)\nfor i in range(n):\n if k > 0:\n del S[-1]\n k = k-1\nprint(S)\nprint(sum(S))', 'n,k=map(int,input().split())\nh=list(map(int,input().split()))\nif n<=k:print(0);exit()\nh.sort(reverse=1)\nprint(sum(h[k:]))\n']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s239636878', 's661156768', 's918507346']
[26024.0, 26024.0, 26180.0]
[231.0, 209.0, 152.0]
[228, 187, 122]
p02785
u624190157
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = map(int, input().split())\nls = list(map(int, input().split()))\n\ndef merge_sort(arr):\n if len(arr) <= 1:\n return arr\n\n mid = len(arr) // 2\n \n left = arr[:mid]\n right = arr[mid:]\n\n \n left = merge_sort(left)\n right = merge_sort(right)\n\n \n return merge(left, right)\n\n\ndef merge(left, right):\n merged = []\n l_i, r_i = 0, 0\n\n \n while l_i < len(left) and r_i < len(right):\n \n if left[l_i] <= right[r_i]:\n merged.append(left[l_i])\n l_i += 1\n else:\n merged.append(right[r_i])\n r_i += 1\n\n \n if l_i < len(left):\n merged.extend(left[l_i:])\n if r_i < len(right):\n merged.extend(right[r_i:])\n return merged\n\nll = merge_sort(ls)\nprint(sum(ll[:n-k-1]))', 'n, k = map(int, input().split())\nls = list(map(int, input().split()))\n\ndef merge_sort(arr):\n if len(arr) <= 1:\n return arr\n\n mid = len(arr) // 2\n \n left = arr[:mid]\n right = arr[mid:]\n\n \n left = merge_sort(left)\n right = merge_sort(right)\n\n \n return merge(left, right)\n\n\ndef merge(left, right):\n merged = []\n l_i, r_i = 0, 0\n\n \n while l_i < len(left) and r_i < len(right):\n \n if left[l_i] <= right[r_i]:\n merged.append(left[l_i])\n l_i += 1\n else:\n merged.append(right[r_i])\n r_i += 1\n\n \n if l_i < len(left):\n merged.extend(left[l_i:])\n if r_i < len(right):\n merged.extend(right[r_i:])\n return merged\n\nll = merge_sort(ls)\nif n <= k:\n print(0)\nelse:\n print(sum(ll[:n-k]))']
['Wrong Answer', 'Accepted']
['s890870327', 's199649748']
[25768.0, 26024.0]
[1282.0, 1284.0]
[1181, 1213]
p02785
u625255205
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['#n = int(input())\nn,k = map(int,input().split())\nh_L = list(map(int,input().split()))\n\nh_L.sort(reverse=True)\n#print(h_L)\nif k ==0:\n print(sum(h_L))\nelse:\n print(sum(h_L[k+1:]))', '#n = int(input())\nn,k = map(int,input().split())\nh_L = list(map(int,input().split()))\n\nh_L.sort(reverse=True)\n#print(h_L)\nif k ==0:\n print(sum(h_L))\nelse:\n print(sum(h_L[k:]))']
['Wrong Answer', 'Accepted']
['s587813350', 's749828359']
[26020.0, 26024.0]
[151.0, 154.0]
[183, 181]
p02785
u629560745
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int,input().split())\nH = list(map(int,input().split()))\nresult = 0\nif len(H) <= K:\n print(result)\nelse:\n H.sort()\n result = sum(H[0:N-K-1])\n print(result)', 'N, K = map(int,input().split())\nH = list(map(int,input().split()))\nresult = 0\nif len(H) <= K:\n print(result)\nelse:\n H.sort()\n result = sum(H[0:N-K])\n print(result)']
['Wrong Answer', 'Accepted']
['s491755465', 's106836413']
[26020.0, 26180.0]
[151.0, 150.0]
[177, 175]
p02785
u630096262
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int, input().split())\nH = sorted(list(map(int, input().split())), reverse=True)\nif N <= K:\n print(0)\nelse:\n print(sum(H[K:-1]))', 'N, K = map(int, input().split())\nH = [int(N) for N in input().split()]\nH.sort(reverse=True)\nif N <= K:\n print(0)\nelse:\n for i in range(0, K):\n H[i] = 0\n print(sum(H))\n']
['Wrong Answer', 'Accepted']
['s919293849', 's921443360']
[26764.0, 25768.0]
[152.0, 167.0]
[144, 183]
p02785
u631579948
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['a,b=map(int,input().split())\nn=list(map(int,input().split()))\nn.sort(reverse=True)\nn[0:b-1]=[]\nprint(sum(n)) \n', 'a,b=map(int,input().split())\nn=list(map(int,input().split()))\nn.sort(reverse=True)\nn[0:b]=[]\nprint(sum(n)) \n']
['Wrong Answer', 'Accepted']
['s346245964', 's489006477']
[26024.0, 26024.0]
[152.0, 145.0]
[111, 109]
p02785
u638720739
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['s = []\nfor i in range(2):\n s.append(input().split())\nn = int(s[0][0])\nk = int(s[0][1])\nanswer = 0\nhs = s[1]\nprint(hs)\nh = [int(a) for a in hs]\nprint(h)\nh.sort()\nprint(h)\nh.reverse()\nif(k<n):\n for i in range(k,n):\n answer = answer + h[i]\nprint(answer)', 's = []\nfor i in range(2):\n s.append(input().split())\nn = int(s[0][0])\nk = int(s[0][1])\nanswer = 0\nhs = s[1]\nh = [int(a) for a in hs]\nh.sort()\nh.reverse()\nif(k<n):\n for i in range(k,n):\n answer = answer + h[i]\nprint(answer)']
['Wrong Answer', 'Accepted']
['s076373541', 's330113604']
[40524.0, 28012.0]
[249.0, 177.0]
[263, 235]
p02785
u643081547
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N,K = map(int,input().split())\nH = list(map(int,input().split()))\nH.sort()\nprint(sum(H[:1-K]))', 'N,K = map(int,input().split())\nH = list(map(int,input().split()))\nH.sort(reverse=True)\nprint(sum(H[K:]))']
['Wrong Answer', 'Accepted']
['s036611306', 's378146305']
[25768.0, 26764.0]
[149.0, 154.0]
[94, 104]
p02785
u644546699
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['import sys\n\ndef propare():\n def iterate_tokens():\n for line in sys.stdin:\n for word in line.split():\n yield word\n tokens = iterate_tokens()\n N = int(next(tokens))\n K = int(next(tokens))\n H_list = []\n for i in range(N):\n H_list.append(int(next(tokens)))\n\n solve(N, K, H_list)\n\ndef solve(H: int, N: int, H_list: list):\n H_ranking_list = sorted(H_list, reverse=True)\n if N != 0:\n H_ranking_list = H_ranking_list[N-1:]\n\n count = sum(H_ranking_list)\n\n print(count)\n\n return\n \nif __name__ == "__main__":\n propare()', 'import sys\n\ndef propare():\n def iterate_tokens():\n for line in sys.stdin:\n for word in line.split():\n yield word\n tokens = iterate_tokens()\n N = int(next(tokens))\n K = int(next(tokens))\n H_list = []\n for i in range(N):\n H_list.append(int(next(tokens)))\n\n solve(N, K, H_list)\n\ndef solve(H: int, N: int, H_list: list):\n H_ranking_list = sorted(H_list, reverse=True)\n H_ranking_list = H_ranking_list[N:]\n\n count = sum(H_ranking_list)\n\n print(count)\n\n return\n \nif __name__ == "__main__":\n propare()']
['Wrong Answer', 'Accepted']
['s530010406', 's418326750']
[30776.0, 30592.0]
[186.0, 190.0]
[594, 573]
p02785
u652569315
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k=map(int,input().split())\nh=sorted(list(map(int,input().split())))\nans=0\nfor i in range(k):\n ans+=h[i]\nprint(ans)', 'n,k=map(int,input().split())\nh=sorted(list(map(int,input().split())))\nans=0\nif k>=n:\n print(0)\nelse:\n for i in range(n-k):\n ans+=h[i]\n print(ans)']
['Runtime Error', 'Accepted']
['s043183253', 's922527892']
[26024.0, 25768.0]
[190.0, 172.0]
[117, 151]
p02785
u652656291
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k = map(int,input().split())\nl = list(map(int,input().split()))\nl.sort()\nif n-k+1 <= 0:\n print(0)\n quit()\nelse:\n L = l[0:n-K+1]\n L_sum = sum(L)\n print(L_sum)', 'n,k = map(int,input().split())\nl = list(map(int,input().split()))\nl.sort()\nL = l[0:n-K+1]\nL_sum = sum(L)\nprint(L_sum)', 'n,k = map(int,input().split())\nl = list(map(int,input().split()))\nl.sort()\nL = l[0,n-K+1]\nL_sum = sum(L)\nprint(L_sum)', 'n,k = map(int,input().split())\nl = list(map(int,input().split()))\nl.sort()\nif len(l) > k:\n print(sum(l[:n-k]))\nelse:\n print(0)\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s515445491', 's546164293', 's958754210', 's109332860']
[26764.0, 26024.0, 26180.0, 26024.0]
[149.0, 150.0, 171.0, 151.0]
[164, 117, 117, 133]
p02785
u655048024
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k = map(int,input().split())\nh = list(map(int,input().split()))\nh.sort(reverce=True):\nans = 0\nif(k>=n):\n ans = 0\nelse:\n for i in range(k,n):\n ans += h[i]\nprint(ans)\n', 'n,k = map(int,input().split())\nh = list(map(int,input().split()))\nh.sort(reverse=True):\nans = 0\nfor i in range(k,n):\n ans += h[i]\nprint(ans)\n', 'n,k = map(int,input().split())\nh = list(map(int,input().split()))\nh.sort(reverse==True):\nans = 0\nfor i in range(k,n):\n ans += h[i]\nprint(ans)', 'n,k = map(int,input().split())\nh = list(map(int,input().split()))\nh.sort(reverce=True)\nans = 0\nif(k>=n):\n ans = 0\nelse:\n for i in range(k,n):\n ans += h[i]\nprint(ans)\n', 'n,k = map(int,input().split())\nh = list(map(int,input().split()))\nh.sort(reverse=True)\nans = 0\nif(k>=n):\n ans = 0\nelse:\n for i in range(k,n):\n ans += h[i]\nprint(ans)\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s360144945', 's500090245', 's516604772', 's973792757', 's994788894']
[8896.0, 8952.0, 8868.0, 31376.0, 31748.0]
[25.0, 27.0, 23.0, 73.0, 124.0]
[172, 142, 142, 171, 171]
p02785
u655110382
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int, input().split())\nH = sorted([int(x) for x in input().split()])[::-1]\nprint(sum(H[N:]))\n', 'N, K = map(int, input().split())\nH = sorted([int(x) for x in input().split()])[::-1]\nprint(sum(H[K:]))\n']
['Wrong Answer', 'Accepted']
['s412864823', 's655504103']
[26024.0, 26024.0]
[161.0, 164.0]
[103, 103]
p02785
u665745717
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['s = input().split()\nN = int(s[0])\nK = int(s[1])\n\nH = input().split()\n\nH_s = sorted(H, reverse=True)\nH_s[:N] = 0\n\nprint(sum(H_s))\n', 's = input().split()\nN = int(s[0])\nK = int(s[1])\n\nH = list(map(int, input().split()))\n\nH_s = sorted(H, reverse=True)\nH_s[:N] = 0\n\nprint(sum(H_s))\n', 's = input().split()\nN = int(s[0])\nK = int(s[1])\n\nH = list(map(int, input().split()))\nH_s = sorted(H, reverse=True)\n\nprint(sum(H_s[K:]))\n']
['Runtime Error', 'Runtime Error', 'Accepted']
['s157936641', 's722693756', 's584342590']
[20240.0, 26024.0, 26016.0]
[181.0, 150.0, 153.0]
[129, 145, 136]
p02785
u666961261
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['a,b = map(int,input().split())\nN = list(map(int,input().split()))\nN.sort()\nprint(sum(N))', 'a,b = map(int,input().split())\nN = list(map(int,input().split()))\nN.sort()\nfor i in range(b):\n if N:\n N.pop()\nprint(sum(N))']
['Wrong Answer', 'Accepted']
['s999688178', 's518746408']
[26764.0, 26024.0]
[163.0, 179.0]
[88, 133]
p02785
u670180528
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k,*a=map(int,open(0).read().split())\na.sort()\na+=[0]\nprint(sum(a[:~k])+k)', 'n,k,*a=map(int,open(0).read().split())\na.sort()\na+=[0]\nprint(sum(a[:~k]))']
['Wrong Answer', 'Accepted']
['s286556257', 's217353610']
[25180.0, 25180.0]
[150.0, 150.0]
[75, 73]
p02785
u670942818
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = [int(_) for _ in input().split()]\nH = [int(_) for _ in input().split()]\nlist_H = sorted(H, reverse=True)\nfor k in range(K):\n list_H.pop(k)\nattack = 0\nfor i in H:\n attack += i\nprint(attack)\n', 'N, K = [int(_) for _ in input().split()]\nH = [int(_) for _ in input().split()]\nH.sort(reverse=True)\nprint(sum(H[K:]))\n']
['Runtime Error', 'Accepted']
['s917312637', 's438740963']
[25768.0, 26180.0]
[2104.0, 158.0]
[202, 118]
p02785
u676258045
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k = map(int,input().split())\nh = list(map(input().split())\nh.sort()\nans = int(0)\nif k >= n:\n print(ans)\nelse:\n for i in range(n - k):\n ans += int(h[i])\n print(ans)', 'n,k = map(int,input().split())\nh = list(input().split())\nh.sort()\nans = int(0)\nif k>=n:\n print(ans)\nelse:\n\tfor i in range(n - k):\n \tans += int(h[i])\n\tprint(ans)\n', 'n,k = map(int,input().split())\nh = list(map(input().split()))\nh.sort()\nans = int(0)\nfor i in range(len(h) - k):\n ans += int(h[i])\nprint(ans)', 'n,k = map(int,input().split())\nh = list(map(int,input().split()))\nh.sort()\nans = int(0)\nfor i in range(len(h) - k):\n ans += int(h[i])\nprint(ans)\n']
['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted']
['s429009026', 's536407314', 's688299443', 's065040998']
[2940.0, 2940.0, 20240.0, 26024.0]
[17.0, 17.0, 38.0, 184.0]
[181, 165, 143, 148]
p02785
u690833702
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['import math\n\ndef main():\n N, K = map(int, input().split())\n H = list(map(int, input().split()))\n \n if K >= N:\n print(0)\n return\n \n ans = 0\n l = sorted(H, reverse=True)\n \n del l[:K]\n print(l)\n \n ans += sum(l)\n \n print(ans)\n \n \nmain()', 'import math\n\ndef main():\n N, K = map(int, input().split())\n H = list(map(int, input().split()))\n \n if K >= N:\n print(0)\n return\n \n \n l = sorted(H, reverse=True)\n \n \n # print(l)\n \n # ans += sum(l)\n \n print(sum(l[K:]))\n #print(ans)\n \n \nmain()']
['Wrong Answer', 'Accepted']
['s290932932', 's780719986']
[33024.0, 33012.0]
[120.0, 103.0]
[254, 282]
p02785
u692311686
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N,K=map(int,input().split())\nH=list(map(int,input().split()))\nH.sort()\nif K>=N:\n print(0)\nelse:\n H=H[K:]\n print(sum(H))', 'N,K=map(int,input().split())\nH=list(map(int,input().split()))\nH.sort()\nif K>=N:\n print(0)\nelif K==0:\n print(sum(H))\nelse:\n H=H[:-K]\n print(sum(H))\n']
['Wrong Answer', 'Accepted']
['s894123881', 's844807910']
[26180.0, 26024.0]
[152.0, 148.0]
[122, 151]
p02785
u697601622
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int, input().split())\nH = input().split()\ntotal=0\n\nif(K==len(H)):\n print(0)\nelse:\n temp = sorted(H)\n while K>0:\n temp=temp[:-1]\n K-=1\n for i in temp:\n total+=i\n print(total)\n ', 'N, K = map(int, input().split())\nHs = map(int,input().split())\nprint(sum(sorted(Hs, reverse=True)[K::]))']
['Runtime Error', 'Accepted']
['s489941005', 's093644600']
[22768.0, 26764.0]
[2105.0, 146.0]
[201, 104]
p02785
u699912843
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = map(int, input().split())\nh = list(map(int, input().split()))\n\nh.sort(reverse=True)\ncount = 0\n\nfor hp in h:\n if k >= 1:\n k -= 1\n h.pop(0)\n else:\n count += hp\n\nprint(count)', "n, k = map(int, input().split())\nh = list(map(int, input().split()))\n\n\nh.sort()\ncount = 0\nn -= k\nif n <= 0:\n print('0')\nelse:\n for i in range(n):\n count += h[i]\n\n print(count)"]
['Wrong Answer', 'Accepted']
['s389932486', 's375545064']
[26180.0, 26024.0]
[2108.0, 171.0]
[205, 191]
p02785
u699944218
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = list(map(int64_t,input().split()))\nk = K - 1\nH = list(map(int64_t,input().split()))\nHs = sorted(H,reverse = True)\nfor i in range(0,K):\n Hs[i] = 0\nprint(sum(Hs))', 'N, K = list(map(int,input().split()))\nk = K + 1\nhp = 0\nH = list(map(int,input().split()))\nHs = sorted(H,reverse = True)\nfor i in range(0,K):\n Hs[i] = 0\nfor i in range(k,N):\n hp += Hs[i]', 'N, K = list(map(int,input().split()))\nk = K - 1\nH = list(map(int,input().split()))\nHs = sorted(H,reverse = True)\nif K <= N:\n for i in range(0,K):\n Hs[i] = 0\n print(sum(Hs))\nif K > N:\n print(0)']
['Runtime Error', 'Runtime Error', 'Accepted']
['s229877509', 's474107447', 's395795081']
[3060.0, 25872.0, 26180.0]
[18.0, 180.0, 164.0]
[168, 187, 198]
p02785
u700929101
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['x = input().split(" ")\nn = int(x[0])\nk = int(x[1])\nh = list(map(int,input().split(" ")))\n\nh.sort(reverse=True)\nprint(h)\n\nans = 0\nif k >= n:\n print(0)\nelse:\n for i in range(k,n):\n ans += h[i]\n print(ans)', 'x = input().split(" ")\nn = int(x[0])\nk = int(x[1])\nh = list(map(int,input().split(" ")))\n\nh.sort(reverse=True)\n\nans = 0\nif k >= n:\n print(0)\nelse:\n for i in range(k,n):\n ans += h[i]\n print(ans)']
['Wrong Answer', 'Accepted']
['s164500915', 's025914594']
[26352.0, 26764.0]
[192.0, 171.0]
[218, 209]
p02785
u703969935
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N,K = map(int, input().split())\nH = list(map(int, input().split()))\n\nH.sort(reverse=True)\n\nif N <= K:\n print(0)\nelse:\n del l[0:K]\n print(sum(H))', 'N,K = map(int, input().split())\nH = list(map(int, input().split()))\n \nH.sort(reverse=True)\n \nif N <= K:\n print(0)\nelse:\n del H[0:K]\n print(sum(H))']
['Runtime Error', 'Accepted']
['s656518077', 's037520710']
[26180.0, 26180.0]
[146.0, 147.0]
[147, 149]
p02785
u706330549
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['import math\n\nn, k = [int(x) for x in input().split()]\n\nh_n = list(map(int, input().split()))\n\nif n <= k:\n print("0")\n\ns_n = sorted(h_n)\n\nlog_sum = math.log(sum(s_n[:n - k]))\n\nprint(math.exp(log_sum))', 'n, k = [int(x) for x in input().split()]\n\nh_n = list(map(int, input().split()))\n\nif n <= k:\n print("0")\nelse:\n s_n = sorted(h_n, reverse=True)\n\n print(sum(s_n[:n - k]))', 'n, k = [int(x) for x in input().split()]\n\nh_n = list(map(int, input().split()))\n\nif n <= k:\n print("0")\nelse:\n print(sum(sorted(h_n)[:n - k]))']
['Runtime Error', 'Wrong Answer', 'Accepted']
['s068762529', 's113402399', 's200812134']
[27300.0, 26024.0, 26024.0]
[156.0, 154.0, 146.0]
[202, 177, 148]
p02785
u711626986
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['a, b=map(int,input().split())\nl=list(map(int,input().split()))\nif a<b:\n print(0)\nelif a>b:\n l.sort()\n n=l[b:]\n s=sum(n)\n print(s)', 'a, b=map(int,input().split())\nl=list(map(int,input().split()))\nif a<=b:\n print(0)\nelif a>b:\n l.sort(reverse=True)\n n=l[b:]\n s=sum(n)\n print(s)\n']
['Wrong Answer', 'Accepted']
['s107085613', 's330632364']
[26764.0, 26024.0]
[154.0, 152.0]
[134, 148]
p02785
u715005228
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = map(int, input().split())\nh = list(map(int,input().split()))\n\nh.sort(reverse = True)\nfor i in range(k-1):\n h[i] = 0\nprint(sum(h))', 'n, k = map(int, input().split())\nh = list(map(int,input().split()))\n\nh.sort(reverse = True)\nprint(sum(h[k::]))']
['Runtime Error', 'Accepted']
['s522436668', 's852584974']
[26764.0, 26024.0]
[162.0, 152.0]
[139, 110]
p02785
u721425712
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = map(int, input().split())\nh = list(map(int, input().split()))\n\nh_ = sorted(h)\n\nfor i in range(k):\n h_.pop()\n\ns = [0]*(len(h_)+1)\nfor j in range(len(h_)):\n s[i+1] = s[i] + h_[i]\n\nprint(s[-1])', 'n, k = map(int, input().split())\nh = list(map(int, input().split()))\n \nh_ = sorted(h)\n \nfor i in range(k):\n if len(h_) > 0:\n h_.pop()\n \ns = [0]*(len(h_)+1)\nfor j in range(len(h_)):\n s[j+1] = s[j] + h_[j]\n\nprint(s[-1])']
['Runtime Error', 'Accepted']
['s942274801', 's204579839']
[26764.0, 26180.0]
[192.0, 196.0]
[203, 233]
p02785
u723345499
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = map(int, input().split())\nh = list(map(int, input().split()))\n\nh = sorted(h)\nH = h[k:]\nsum_ = sum(H)\nprint(sum_)', 'n, k = map(int, input().split())\nh = list(map(int, input().split()))\n\nh = sorted(h, reverse=True)\nH = h[k:]\nsum_ = sum(H)\nprint(sum_)']
['Wrong Answer', 'Accepted']
['s469286414', 's147284147']
[26180.0, 26764.0]
[155.0, 153.0]
[119, 133]
p02785
u723711163
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = list(map(int, input().split()))\nH = list(map(int, input().split()))\n\nprint(sorted(H)[::-1][K:])', 'N, K = list(map(int, input().split()))\nH = list(map(int, input().split()))\n\nprint(sum(sorted(H)[::-1][K:]))']
['Wrong Answer', 'Accepted']
['s700462530', 's371481985']
[26024.0, 26024.0]
[167.0, 155.0]
[102, 107]
p02785
u724088399
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N,K = map(int,input().split())\nenemys = list(map(int,input().split()))\nenemys = sorted(enemys)\nif K >= len(enemys):\n print(0)\nelse:\n enemys = enemys[K:]\n print(sum(enemys))', 'N,K = map(int,input().split())\nenemys = list(map(int,input().split()))\nenemys = sorted(enemys,reverse = True)\nif K >= len(enemys):\n print(0)\nelse:\n enemys = enemys[K+1:]\n print(sum(enemys))', 'N,K = map(int,input().split())\nenemys = list(map(int,input().split()))\nenemys = sorted(enemys,reversed = True)\nif K >= len(enemys):\n print(0)\nelse:\n enemys = enemys[K+1:]\n print(sum(enemys))', 'N,K = map(int,input().split())\nenemys = list(map(int,input().split()))\nenemys = sorted(enemys,reverse = True)\nif K >= N:\n print(0)\nelif K == 0:\n print(sum(enemys))\nelse: \n enemys = enemys[K:]\n print(sum(enemys))']
['Wrong Answer', 'Wrong Answer', 'Runtime Error', 'Accepted']
['s008952959', 's614914245', 's827662625', 's848923867']
[31428.0, 31592.0, 31588.0, 31612.0]
[106.0, 113.0, 74.0, 107.0]
[175, 192, 193, 216]
p02785
u725133562
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,k = map(int, input().split())\nh = list(map(int, input().split()))\nhsorted = sorted(h)\nif k>=n:\n print(0)\nelse:\n print(sum(hsorted[k:n]))', 'n,k = map(int, input().split())\nh = list(map(int, input().split()))\nhsorted = sorted(h, reverse=True)\nif k>=n:\n print(0)\nelse:\n print(sum(hsorted[k:n]))']
['Wrong Answer', 'Accepted']
['s427454159', 's704114349']
[26024.0, 26024.0]
[157.0, 151.0]
[144, 158]
p02785
u729083717
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['import numpy as np\nN, K = map(int,input().split())\nH = np.array(list(map(int,input().split())))\n\nif K >= N:\n print(0)\nelif K == 0:\n answer = np.sum(H)\n print(answer)\nelse:\n ind = np.argpartition(H, -K)[-K:]\n print(ind)\n top_k = H[ind]\n answer = np.sum(H) - np.sum(top_k)\n print(answer)', 'if K >= N:\n print(0)\nelif K == 0:\n answer = np.sum(H)\n print(answer)\nelse:\n ind = np.argpartition(H, -K)[-K:]\n print(ind)\n top_k = H[ind]\n answer = np.sum(H) - np.sum(top_k)\n print(answer)', 'import numpy as np\nN, K = map(int,input().split())\nH = np.array(list(map(int,input().split())))\n\nif K >= N:\n print(0)\nelif K == 0:\n answer = np.sum(H)\n print(answer)\nelse:\n ind = np.argpartition(H, -K)[-K:]\n top_k = H[ind]\n answer = np.sum(H) - np.sum(top_k)\n print(answer)']
['Wrong Answer', 'Runtime Error', 'Accepted']
['s155292861', 's659352812', 's703675437']
[34208.0, 3064.0, 34180.0]
[219.0, 18.0, 221.0]
[309, 212, 294]
p02785
u729119068
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N,A=map(int,input().split())\nB=sorted(list(int(input()) for i n range(N)))\nfor j in range(A):\n B.pop()\nprint(sum(B))', 'N,A=map(int,input().split())\nB=sorted(list(map(int,input().split())))\nfor j in range(A):\n if B!=[]: B.pop()\nprint(sum(B))']
['Runtime Error', 'Accepted']
['s450331009', 's223654680']
[8948.0, 31440.0]
[23.0, 128.0]
[119, 124]
p02785
u732034233
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['class Main:\n s = list(map(int, input().split()))\n n = s[0]\n k = s[1]\n sum = 0\n ksum=0\n list = [int(i) for i in input().split()]\n list = sorted(1, reverse=True)\n list[:k]\n for num in list:\n sum += num\n for knum in list[:k]:\n ksum += knum\n print(sum-ksum)', 'class Main:\n s = list(map(int, input().split()))\n n = s[0]\n k = s[1]\n sum = 0\n kSum = 0\n list = [int(i) for i in input().split()]\n newList = sorted(list, reverse=True)\n list[:k]\n for num in newList:\n sum += num\n for kNum in newList[:k]:\n kSum += kNum\n print(sum-kSum)']
['Runtime Error', 'Accepted']
['s288584430', 's108214116']
[26024.0, 26356.0]
[75.0, 209.0]
[300, 314]
p02785
u732870425
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = map(int, input().split())\nH = list(map(int, input().split()))\n\nH.sort()\n\ncnt = 0\nfor i in range(N):\n if K > 0:\n K -= 1\n else:\n cnt += H[i]\n\nprint(cnt)', 'N, K = map(int, input().split())\nH = list(map(int, input().split()))\n\nH = sorted(H)[::-1]\n\ncnt = 0\nfor i in range(N):\n if K > 0:\n K -= 1\n else:\n cnt += H[i]\n\nprint(cnt)']
['Wrong Answer', 'Accepted']
['s408998050', 's790122311']
[25768.0, 26180.0]
[187.0, 186.0]
[177, 188]
p02785
u736470924
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
["N, K = map(int, input().split())\nif N <= K:\n print('0')\n return\nH = sorted(list(map(int, input().split())))\nif K == 0:\n print(sum(H))\nelse:\n print(sum(H[:K + 1]))\n", "N, K = map(int, input().split())\nH = sorted(list(map(int, input().split())))\nif N <= K:\n print('0')\nelif K == 0:\n print(sum(H))\nelse:\n print(sum(H[:N - K]))\n"]
['Runtime Error', 'Accepted']
['s293800987', 's616429811']
[2940.0, 26180.0]
[17.0, 157.0]
[175, 166]
p02785
u740232619
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N, K = int(input().split())\nH = []\nH = int(input().split())\nlist.sort(H, reverse = True)\nANS = 0\nfor i in range(K, N):\n ANS += H[i]\nprint(ANS)', 'N, K = map(int, input().split())\nH = list(map(int, input().split()))\nlist.sort(H, reverse = True)\nANS = 0\nfor i in range(K, N):\n ANS += H[i]\nprint(ANS)']
['Runtime Error', 'Accepted']
['s408733312', 's818450876']
[3060.0, 26024.0]
[17.0, 174.0]
[145, 155]
p02785
u746206084
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n,m = map(int,input().split())\nli=list(map(int,input().split()))\nif m>=n:\n print(0)\nelse:\n sort(li)\n print(sum(li[n-m:]))', 'n,m = map(int,input().split())\nli=list(map(int,input().split()))\nif m>=n:\n print(0)\nelse:\n li.sort()\n print(sum(li[:n-m]))']
['Runtime Error', 'Accepted']
['s209666748', 's934832383']
[26020.0, 26180.0]
[69.0, 153.0]
[130, 131]
p02785
u746849814
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['monster_num, special_num = input().split()\nmonster_list = [input() for _ in range(monster_num)]\n\n\nmonster_list = sorted(monster_list)\n\nfor _ in range(special_num):\n monster_list = monster_list[:-1]\n \nprint(sum(monster_list))\n ', 'monster_num, special_num = map(int ,input().split())\nmonster_list = list(map(int, input().split()))\n \nmonster_list = sorted(monster_list)[::-1]\n \nmonster_list = monster_list[special_num:]\n \nprint(sum(monster_list))']
['Runtime Error', 'Accepted']
['s517740219', 's779632223']
[2940.0, 26024.0]
[19.0, 157.0]
[229, 215]
p02785
u748999254
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N,K=map(int,input().split())\nif K>=N:\n\tprint(0)\n\tquit()\nL = [int(x) for x in input().split()]\nL.sort()\nif K:\n\tprint(sum(L[:-K]))\nprint(sum(L))', 'n,k=map(int,input().split())\nh=[int(i) for i in input().split()]\nif k>=n:\n print(0)\nelse:\n print(sum(sorted(h)[k:]))', 'n,k=map(int,input().split())\nh=[int(i) for i in input().split()]\nh.sort(reverse=True)\n\nif k>=n:\n print(0)\nelse:\n print(sum(h[k:]))']
['Wrong Answer', 'Wrong Answer', 'Accepted']
['s509252750', 's522644668', 's288304979']
[26016.0, 26180.0, 26024.0]
[161.0, 155.0, 159.0]
[142, 122, 136]
p02785
u754022296
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['n, k = map(int, input().split())\nH = sorted(list(map(int, input().split())))\nif n <= k:\n print(0)\nelse:\n print(sum(H[:k]))', 'n, k = map(int, input().split())\nH = sorted(list(map(int, input().split())))\nif n <= k:\n print(0)\nelse:\n print(sum(H[:n-k]))']
['Wrong Answer', 'Accepted']
['s775958541', 's224497317']
[26024.0, 26180.0]
[158.0, 158.0]
[124, 126]
p02785
u756399469
2,000
1,048,576
Fennec is fighting with N monsters. The _health_ of the i-th monster is H_i. Fennec can do the following two actions: * Attack: Fennec chooses one monster. That monster's health will decrease by 1. * Special Move: Fennec chooses one monster. That monster's health will become 0. There is no way other than Attack and Special Move to decrease the monsters' health. Fennec wins when all the monsters' healths become 0 or below. Find the minimum number of times Fennec needs to do Attack (not counting Special Move) before winning when she can use Special Move at most K times.
['N,K=map(int,input().split())\nH=[map(int,input().split())]\n\n\nif N<=K:\n print(0)\nelse:\n H.sort()\n a=sum(H[0:N-K])\n print(a)', 'N,K=map(int,input().split())\nH=list(map(int,input().split()))\n\nif N<=K:\n print(0)\nelse:\n H.sort()\n a=sum(H[0:N-K])\n print(a)\n']
['Runtime Error', 'Accepted']
['s005742499', 's198017621']
[20980.0, 26180.0]
[37.0, 151.0]
[125, 129]