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 | u756693875 | 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\nl = h[0:(n-k)+1]\n\nprint(sum(l))', "n,k = map(int,input().split())\nh = list(map(int,input().split()))\n\nif n < k:\n print('0')\nelse:\n h.sort()\n l = h[0:(n-k)]\n\n print(sum(l))"] | ['Wrong Answer', 'Accepted'] | ['s509153200', 's909812687'] | [25768.0, 26180.0] | [76.0, 155.0] | [98, 148] |
p02785 | u757274384 | 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()\nH.reverse()\n\nif n <= k:\n print(0)\nelse:\n print(sum(H[k+1:len(H)]))', 'n,k = map(int, input().split())\nH = list(map(int, input().split()))\n\nH.sort()\nH.reverse()\n\nif n <= k:\n print(0)\nelse:\n print(sum(H[k:n]))\n'] | ['Wrong Answer', 'Accepted'] | ['s545426271', 's111917563'] | [26024.0, 26024.0] | [151.0, 148.0] | [146, 140] |
p02785 | u757420987 | 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. | ['hi = list(map(int, input().split()))\nhi.sort(reverse=True)\ndel hi[:k]\n\nnum = 0\nif hi == []:\n print(0)\nelse:\n for i in hi:\n num += i\n print(num)\n', 'import sys\n\nsys.setrecursionlimit(10**9)\n\nh, k = map(int, input().split())\nhi = list(map(int, input().split()))\nhi.sort(reverse=True)\ndel hi[:k]\n\nnum = 0\nif hi == []:\n print(0)\nelse:\n for i in hi:\n num += i\n print(num)\n'] | ['Runtime Error', 'Accepted'] | ['s528085415', 's932992701'] | [3060.0, 26024.0] | [18.0, 162.0] | [160, 235] |
p02785 | u763380276 | 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())\nhps=list(map(int,input().split()))\nhps.sort()\nif k>n:\n print(n)\nelif k==n:\n print(k)\nelse:\n ans=k\n for i in range(k):\n hps.pop()\n ans+==sum(hps)\n print(ans)', 'n,k=map(int,input().split())\nhps=list(map(int,input().split()))\nhps.sort()\nif k>n:\n print(0)\nelif k==n:\n print(0)\nelse:\n ans=0\n for i in range(k):\n hps.pop()\n ans+=sum(hps)\n print(ans)'] | ['Runtime Error', 'Accepted'] | ['s278218382', 's318736368'] | [2940.0, 26024.0] | [17.0, 164.0] | [194, 193] |
p02785 | u764773675 | 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,k = map(int,input().split(" "))\nhp = list(map(int,input().split(" ")))\nhp = sorted(hp, reverse = True)\nprint(hp)\ntotal = 0\nfor i in hp:\n total += i\n \ns = 0\nfor i in range(k):\n if s <= len(hp) - 1:\n total -= hp[s]\n s += 1\n\nprint(total)\n ', 'monster_num,k = map(int,input().split(" "))\nhp = list(map(int,input().split(" ")))\nhp = sorted(hp, reverse = True)\n\ntotal = 0\nfor i in hp:\n total += i\n \ns = 0\nfor i in range(k):\n if s <= len(hp) - 1:\n total -= hp[s]\n s += 1\n\nprint(total)\n '] | ['Wrong Answer', 'Accepted'] | ['s057400834', 's742089090'] | [26360.0, 26024.0] | [274.0, 255.0] | [274, 265] |
p02785 | u766393261 | 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()))\nans=0\nH.sort()\nfor i in range(N):\n if i>=N-K:\n ans+=1\n else:\n ans+=H[i]\nprint(ans)', 'N,K=map(int,input().split())\nH=list(map(int,input().split()))\nans=0\nH.sort()\nfor i in range(N):\n if i>=N-K:\n ans+=0\n else:\n ans+=H[i]\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s139434506', 's502646697'] | [26180.0, 26024.0] | [191.0, 201.0] | [164, 164] |
p02785 | u768559443 | 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()))[::-1]\nans=0\nfor i in range(k+1,n-k):\n ans+=i\nprint(ans)', 'n,k=map(int,input().split())\nh=sorted(map(int,input().split()))[::-1]\nans=0\nfor i in range(k,n):\n ans+=h[i]\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s902098798', 's811539721'] | [26180.0, 26024.0] | [160.0, 176.0] | [120, 119] |
p02785 | u771167374 | 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 :\n print(0)\nelse :\n sm = 0\n for i in range(n-k):\n sm += l[i]\n pritn(sm)', 'n, k = map(int, input().split())\nl = list(map(int, input().split()))\nl = sorted(l)\nif n<=k :\n print(0)\nelse :\n sm = 0\n for i in range(n-k):\n sm += l[i]\n pritn(sm)', 'n, k = map(int, input().split())\nl = list(map(int, input().split())).sort()\nif n<=k :\n print(0)\nelse :\n sm = 0\n for i in range(n-k):\n sm += l[i]\n pritn(sm)', 'n, k = map(int, input().split())\nl = list(map(int, input().split()))\nl.sort()\nif n<=k :\n print(0)\nelse :\n sm = 0\n for i in range(n-k):\n sm += l[i]\n print(sm)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s517219878', 's832086445', 's937113770', 's631443167'] | [26024.0, 26024.0, 26024.0, 26764.0] | [167.0, 172.0, 144.0, 172.0] | [176, 181, 174, 176] |
p02785 | u772029934 | 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())\nli = sorted(list(map(int,input().split())),reverse=True)\ndel(li[:K])\nsum(li)', 'N,K = map(int,input().split())\nli = sorted(list(map(int,input().split())),reverse=True)\ndel(li[:K])\nprint(sum(li))'] | ['Wrong Answer', 'Accepted'] | ['s907781760', 's033243690'] | [26764.0, 26180.0] | [153.0, 151.0] | [109, 116] |
p02785 | u776929617 | 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. | ['src/contest/abc/abc153/c.py', '\nn, k = list(map(int, input().split()))\n\nh = list(map(int, input().split()))\n\nh.sort(reverse=True)\n\nprint(sum(h[min(n,k):]))\n'] | ['Runtime Error', 'Accepted'] | ['s443417123', 's725753763'] | [2940.0, 26764.0] | [17.0, 153.0] | [27, 125] |
p02785 | u779728630 | 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, K = map(int, input().split())\nA = list(map(int, input().split()))\n\nA.sort()\n\nans = 0\n\nfor i in range( N - K ):\n ans += A[i]\n \nprint(ans)', 'H, K = map(int, input().split())\nA = list(map(int, input().split()))\n\nA.sort()\n\nans = 0\n\nfor i in range( H - K ):\n ans += A[i]\n \nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s279323502', 's126048934'] | [26024.0, 26180.0] | [148.0, 174.0] | [141, 141] |
p02785 | u780962115 | 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,n=map(int,input().split())\nlists=list(map(int,input().split()))\nif h>sum(lists):\n print("No")\nelse:\n print("Yes")', 'n,k=map(int,input().split())\nlists=list(map(int,input().split()))\nlists=sorted(lists)\nif len(lists)<=k:\n print(0)\nelif len(lists)>k:\n sub=lists[:len(lists)-k]\n print(sum(sub))'] | ['Wrong Answer', 'Accepted'] | ['s443180726', 's766592747'] | [26020.0, 26180.0] | [70.0, 174.0] | [121, 184] |
p02785 | u784022244 | 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 N<=K:\n print(0)\nelif K==0:\n print(sum(H))\nelse:\n for i in range(K):\n maxh=max(H)\n H=H.remove(maxh)\n print(sum(H))\n\n\n', 'N, K=map(int, input().split())\nH=list(map(int, input().split()))\n\nif N<=K:\n print(0)\nelse:\n for i in range(K):\n maxh=max(H)\n H=H.remove(maxh)\n print(sum(H))\n\n\n', 'N, K=map(int, input().split())\nH=list(map(int, input().split()))\n\nif N<=K:\n print(0)\nelse:\n for i in range(K):\n maxh=max(H)\n H=H.remove(maxh)\n print(len(H))\n', 'N, K=map(int, innput().split())\nH=list(map(int, input().split()))\n\nif N<=K:\n print(0)\nelse:\n for i in range(K):\n maxh=max(H)\n H=H.remove(maxh)\n print(len(H))', 'N, K=map(int, input().split())\nH=list(map(int, input().split()))\n\nif N<=K:\n print(0)\nelif K==0:\n print(sum(H))\nelse:\n H=sorted(H)\n print(sum(H[:len(H)-K]))\n\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s303841310', 's388608460', 's447861347', 's467742204', 's477787101'] | [26024.0, 26764.0, 26024.0, 2940.0, 26764.0] | [71.0, 75.0, 71.0, 17.0, 151.0] | [195, 168, 166, 166, 161] |
p02785 | u789896699 | 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. | ['input_num=input()\nn=input_num.split()\nnum = list(map(int,n))\n\nif len(num)-2<=num[1]:\n print(0)\nelse:\n a=num[2:]\n a.sort(reverse=True)\n b=a[num[1]:]\n print(sum(b))', 'input_num=[input() for i in range(2)]\n\nn=input_num[0].split()\nn=list(map(int,n))\na=input_num[1].split()\na=list(map(int,a))\n \nif len(a)<=n[1]:\n print(0)\nelse:\n a.sort(reverse=True)\n b=a[n[1]:]\n print(sum(b))'] | ['Wrong Answer', 'Accepted'] | ['s143272302', 's983615688'] | [3060.0, 28916.0] | [17.0, 158.0] | [167, 214] |
p02785 | u790493075 | 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()))\n\nhissatsu = n-k\n\nif hissatsu <= 0:\n print(0)\nelse:\n print(sum(monsters[-hissatsu:]))', 'n, k = map(int, input().split())\nmonsters = list(map(int, input().split()))\n\nhissatsu = n-k\n\nif hissatsu <= 0:\n print(0)\nelse:\n monsters.sort(reverse=True)\n print(sum(monsters[-hissatsu:]))'] | ['Wrong Answer', 'Accepted'] | ['s948328946', 's361116933'] | [26024.0, 26016.0] | [71.0, 149.0] | [162, 192] |
p02785 | u796708718 | 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. | ['HK = list(map(int,input().split(" ")))\nHP = list(map(int,input().split(" ")))\nH = HK[0]\nK = HK[1]\nHP.reverse()\nsum_a = sum(HP[K:N])\nprint(sum_a)', 'HK = list(map(int,input().split(" ")))\nHP = list(map(int,input().split(" ")))\nH = HK[0]\nK = HK[1]\nHP.sort(reverse=Ture)\nsum_a = sum(HP[K:N])\nprint(sum_a)', 'HK = list(map(int,input().split(" ")))\nHP = list(map(int,input().split(" ")))\nH = HK[0]\nK = HK[1]\nHP.sort(reverse=True)\nsum_a = sum(HP[K:N])\nprint(sum_a)', 'HK = list(map(int,input().split(" ")))\nHP = list(map(int,input().split(" ")))\nH = HK[0]\nK = HK[1]\nHP.reverse()\nsum_a = sum(HP[K:N])\nprint(sum_a)', 'HK = list(map(int,input().split(" ")))\nHP = list(map(int,input().split(" ")))\nH = HK[0]\nK = HK[1]\nHP.sort(reverse=True)\nsum_a = sum(HP[K:])\nprint(sum_a)'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s064242260', 's745516949', 's923783847', 's997881635', 's263430936'] | [26360.0, 26024.0, 26764.0, 26024.0, 26176.0] | [68.0, 70.0, 159.0, 68.0, 152.0] | [144, 153, 153, 144, 152] |
p02785 | u798260206 | 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())\nhn = list(map(int,input().split()))\nhn_s = hn.sort()\nattack = 0\n\nif k>=n:\n print("0")\n\nelif k<n:\n for _ in range(n-k):\n hn_s.pop(-1)\n print(str(sum(hn_s)))', 'n,k = map(int,input().split())\nhn = sorted(list(map(int,input().split())))\n\nattack = 0\n\nif k>=n:\n print(attack)\n\nelif k<n:\n print(sum(hn[0:n-k]))'] | ['Runtime Error', 'Accepted'] | ['s784878635', 's134726481'] | [25768.0, 26180.0] | [150.0, 153.0] | [192, 147] |
p02785 | u799635973 | 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, N = map(int, input().split())\nA = [int(x) for x in input().split()]\nprint(A)\nlist2 = sorted(A, reverse=True) \nprint(list2)\nif N>0:\n del list2[0:N]\n print(list2)\n print(sum(list2))\nelif N<0:\n print(sum(A))', 'H, N = map(int, input().split())\nA = [int(x) for x in input().split()]\nlist2 = sorted(A, reverse=True) \n\nif N>H:\n print(0)\nelif N>0:\n del list2[0:N]\n print(sum(list2))\nelif N<=0:\n print(sum(A))'] | ['Wrong Answer', 'Accepted'] | ['s133954267', 's195372357'] | [27960.0, 26180.0] | [219.0, 157.0] | [239, 225] |
p02785 | u805552010 | 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. | ['\nn,k = map(int,input().split())\nh = list(map(int,input().split()))\n\n\n\nh.sort(reverse = True)\n\nif n <= k:\n print(0)\n\nelse:\n for i in range(k):\n s[i] = 0\nprint(sum(s))', '\nn,k = map(int,input().split())\nh = list(map(int,input().split()))\n\n\n\nh.sort(reverse = True)\n\nif n <= k:\n print(0)\n\nelse:\n for i in range(k):\n h[i] = 0\n print(sum(h))'] | ['Runtime Error', 'Accepted'] | ['s245226970', 's213043949'] | [26764.0, 26764.0] | [151.0, 165.0] | [421, 425] |
p02785 | u809816772 | 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(input().split())\n\nH.sort(reverse=True)\nprint(sum(H[K:]))', 'N, K = map(int,input().split())\nH = list(map(int,input().split()))\n\nH.sort(reverse=True)\nprint(sum(H[K:]))'] | ['Runtime Error', 'Accepted'] | ['s058918435', 's838117314'] | [20980.0, 26024.0] | [183.0, 155.0] | [97, 106] |
p02785 | u813098295 | 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\n#include <algorithm>\n\nusing namespace std;\n\nint main() {\n int n, k;\n cin >> n >> k;\n\n vector<int> h(n);\n for (int i = 0; i < n; i++) {\n cin >> h[i];\n }\n sort(h.begin(), h.end(), greater<int>());\n\n int ans = 0;\n for (int i = 0; i < n; i++) {\n if (i < k) {\n ans++;\n } else {\n ans += h[i];\n }\n }\n cout << ans << endl;\n return 0;\n}', '#!/usr/bin/env python3\n\nn, k = map(int, input().split())\nh = sorted(map(int, input().split()), reverse=True)\n\nprint(sum(h[k:]))\n\n\n'] | ['Runtime Error', 'Accepted'] | ['s782737586', 's957115753'] | [2940.0, 26024.0] | [17.0, 149.0] | [398, 130] |
p02785 | u814265211 | 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 n <= k:\n print(0)\nelif k == 0:\n print(sum(h))\nelse:\n h.sort()\n print(h[:-k])\n print(sum(h[:-k]))\n', 'n, k = map(int, input().split())\nh = list(map(int, input().split()))\n\nh.sort(reverse=True)\nprint(sum(h[k:]))'] | ['Wrong Answer', 'Accepted'] | ['s851293608', 's796891905'] | [26180.0, 26024.0] | [170.0, 152.0] | [185, 108] |
p02785 | u815304751 | 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,n = map(int,input().split())\na_ = list(map(int,input().split()))\n\na_.sort()\nfor i in range(n):\n a_[i] = 0\nprint(sum(a_))\n', 'n,k = map(int,input().split())\nh_ = list(map(int,input().split()))\n\nif len(h_) <= k:\n print(0)\nelse:\n h_.sort(reverse = True)\n for i in range(k):\n h_[i] = 0\n print(sum(h_))\n'] | ['Runtime Error', 'Accepted'] | ['s075250336', 's146044798'] | [26764.0, 26020.0] | [160.0, 163.0] | [126, 192] |
p02785 | u823885866 | 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\nn, k = map(int, sys.stdin.readline().split())\nli = list(map(int, sys.stdin.readline().split()))\nl = len(li)\nt = 0\nif l > k:\n li.sort().reverse()\n t = sum(li[k:])\nprint(t)\n ', 'import sys\nn, k = map(int, sys.stdin.readline().split())\nli = list(map(int, sys.stdin.readline().split()))\nl = len(li)\nt = 0\nif l > k:\n li.sort()\n li.reverse()\n t = sum(li[k:])\nprint(t)\n \n'] | ['Runtime Error', 'Accepted'] | ['s792682147', 's526415679'] | [25744.0, 25744.0] | [146.0, 148.0] | [186, 192] |
p02785 | u824734140 | 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 collections import deque\n\nh, k, *a = map(int, open(0).read().split())\nif h <= k:\n print(k)\n exit()\n\na.sort()\nq = deque(a)\n\n[q.pop() for _ in range(k)]\nprint(q)\nprint(sum(q))\n', 'from collections import deque\n\n# ans = True\n# print(["Yes", "No"][ans])\n\nh, k, *a = map(int, open(0).read().split())\nk = min(h,k)\n\na.sort()\nfor _ in range(k):\n a.pop()\n\nprint(sum(a))\n\n\n'] | ['Wrong Answer', 'Accepted'] | ['s438772695', 's674879216'] | [26020.0, 26020.0] | [186.0, 165.0] | [185, 188] |
p02785 | u831752983 | 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())\na=list(map(int,input().split()))\na.sort()\n\nif n<=m:\n print(0)\nelse:\n a=a[-(n-m):]\n print(sum(a))\n', 'n,m=map(int,input().split())\na=list(map(int,input().split()))\na.sort()\n\nif n<=m:\n print(0)\nelif m==0:\n print(sum(a))\nelse:\n a=a[:-m]\n print(sum(a))\n'] | ['Wrong Answer', 'Accepted'] | ['s961331422', 's033374941'] | [26180.0, 26180.0] | [148.0, 149.0] | [129, 152] |
p02785 | u835322333 | 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\nsort = sorted(H, reverse = True)\nprint(sort)\n\nans = 0\nfor i in range(N):\n if i+1 > K:\n ans += sort[i]\n \nprint(ans)', 'N,K = map(int,input().split())\nH = list(map(int,input().split()))\n\nsort = sorted(H, reverse = True)\nans = 0\nfor i in range(N):\n if i+1 > K:\n ans += sort[i]\n \nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s446111417', 's766456680'] | [26024.0, 26024.0] | [210.0, 186.0] | [194, 181] |
p02785 | u848512577 | 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())\nList = list(map(int, input().split()))\n\n\nremain_monster = N - K\nnew_list = sorted(List, reverse=True)\n\nmonsterHP = sum(new_list[remain_monster:])\n\nprint(monsterHP)', 'import sys\nsys.setrecursionlimit(100000) \n\nN, K = map(int, input().split())\nList = list(map(int, input().split()))\nA = 0\n\nremain_monster = N - K\nnew_list = sorted(List, reverse=True)\n\nmonsterHP = sum(new_list[remain_monster:])\n\nprint(monsterHP)', 'N, K = map(int, input().split())\nList = list(map(int, input().split()))\n\n\nremain_monster = N - K\nif remain_monster <= 0:\n monsterHP = 0\n\nelse:\n new_list = sorted(List, reverse=True)\n\n monsterHP = sum(new_list[-remain_monster:])\n\nprint(monsterHP)\n\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s171548136', 's608715903', 's599843542'] | [25768.0, 26180.0, 26180.0] | [153.0, 156.0, 150.0] | [196, 244, 256] |
p02785 | u852437863 | 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\n\ndef InS(): return input()\n\n\ndef InL(): return list(map(int, input().split()))\n\n\ndef InI(): return int(input())\n\n\nN, K = InL()\nH = InL().sort()\n\nif K >= N:\n print(0)\n sys.exit()\n\nprint(sum(H[0:N-K]))\n', 'import sys\n\n\ndef InS(): return input()\n\n\ndef InL(): return list(map(int, input().split()))\n\n\ndef InI(): return int(input())\n\n\nN, K = InL()\nH = InL()\nH.sort()\n\nif K >= N:\n print(0)\n sys.exit()\nelse:\n print(sum(H[0:N-K]))\n'] | ['Runtime Error', 'Accepted'] | ['s799745761', 's942948590'] | [26024.0, 25876.0] | [155.0, 151.0] | [218, 229] |
p02785 | u857070771 | 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(int(x) for x in input().split())\ns=0\nif k <= n:\n\tprint(s)\nelse:\n\ti for i in range(n-k):\n\t\ts += i\n\t\tprint(s)', 'n,k=map(int,input().split())\na=list(int(x) for x in input().split())\na.sort(reverse = True)\ns=0\nif k <= n:\n\tprint(0)\nelse:\n\t\ts = sum(a[:n-k])\n\t\tprint(s)', 'n,k=map(int,input().split())\na=list(int(x) for x in input().split())\na.sort()\ns=0\nif k <= n:\n\tprint(0)\nelse:\n\t\ts = sum(a[:n-k])\n\t\tprint(s)\n', 'n,k=map(int,input().split())\na=list(int(x) for x in input().split())\na.sort()\ns=0\nif n <= k:\n\tprint(0)\nelse:\n\t\ts = sum(a[:n-k])\n\t\tprint(s)\n'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s432202885', 's481941789', 's952637782', 's430691435'] | [2940.0, 26024.0, 26024.0, 25768.0] | [17.0, 161.0, 162.0, 167.0] | [143, 152, 139, 139] |
p02785 | u857330600 | 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(N)\nprint(K)\ns=0\nif N<=K:\n print(0)\nelse:\n for i in range(H-N)\n s+=H[i]\n print(s)', 'N,K=map(int,input().split())\nH=list(map(int,input().split()))\nH.sort()\nprint(H)\ns=0\nif N<=K:\n print(0)\nelse:\n for i in range(N-K):\n s+=H[i]\n print(s)', 'N,K=map(int,input().split())\nH=list(map(int,input().split())\nprint(N)\nprint(K)\ns=0\nif N<=K:\n print(0)\nelse:\n for i in range(H-N)\n s+=H[i]\n print(s)', 'N,K=map(int,input().split())\nH=list(map(int,input().split()))\ns=0\nif N<=K:\n print(0)\nelse:\n for i in range(H-N):\n s+=H[i]\n print(s)', 'N,K=map(int,input().split())\nH=list(map(int,input().split()))\nI=sorted(H)\nprint(H)\nprint(I)\ns=0\nif N<=K:\n print(0)\nelse:\n for i in range(N-K):\n s+=I[i]\n print(s)', 'N,K=map(int,input().split())\nH=list(map(int,input().split()))\nI=sorted(H)\ns=0\nif N<=K:\n print(0)\nelse:\n for i in range(N-K):\n s+=I[i]\n print(s)'] | ['Runtime Error', 'Wrong Answer', 'Runtime Error', 'Runtime Error', 'Wrong Answer', 'Accepted'] | ['s026191309', 's457477684', 's655858445', 's828296796', 's981117613', 's890296981'] | [2940.0, 26764.0, 2940.0, 25768.0, 26444.0, 26024.0] | [18.0, 199.0, 17.0, 69.0, 225.0, 174.0] | [154, 155, 153, 137, 167, 149] |
p02785 | u860002137 | 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 len(h) <= k:\n print(0)\nelse:\n for _ in range(k):\n h.pop()\n print(sum(h))', 'n, k = map(int, input().split())\nh = list(map(int, input().split()))\nh.sort()\nif len(h) <= k:\n print(0)\nelse:\n for _ in range(k):\n h.pop()\n print(sum(h))'] | ['Wrong Answer', 'Accepted'] | ['s943513902', 's008646153'] | [26764.0, 26764.0] | [162.0, 168.0] | [181, 169] |
p02785 | u860234244 | 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)\nfor i in range(K):\n H.remove(H[i])\nsum_ = sum(H)\npint(sum)', 'N, K = map(int, input().split())\nA = list(map(int, input().split()))\n\nA.sort(reverse=True)\nprint(sum(A[K:]))'] | ['Runtime Error', 'Accepted'] | ['s553302373', 's298938655'] | [26764.0, 26024.0] | [2105.0, 153.0] | [162, 108] |
p02785 | u860966226 | 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. | ['data = input().split()\n \nn = int(data[0])\nk = int(data[1])\n\nhpstr = input().split()\nhp = []\n\nfor i in range(n):\n hp.append(int(hpstr[i]))\n\nhp.sort()\n\nprint(hp)\n\nans = 0\nfor i in range(n - k):\n ans += hp[i]\n \nprint(ans)\n', 'data = input().split()\n \nn = int(data[0])\nk = int(data[1])\n \nhpstr = input().split()\nhp = []\n \nfor i in range(n):\n hp.append(int(hpstr[i]))\n \nhp.sort()\n \nans = 0\nfor i in range(n - k):\n ans += hp[i]\n \nprint(ans)\n'] | ['Wrong Answer', 'Accepted'] | ['s556635172', 's659735713'] | [33064.0, 26556.0] | [234.0, 212.0] | [221, 214] |
p02785 | u867826040 | 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)\nprint(sum(h[k:]), h)', 'n, k = map(int, input().split())\nh = list(map(int, input().split()))\nh.sort(reverse=True)\nprint(sum(h[k:]))'] | ['Wrong Answer', 'Accepted'] | ['s496551347', 's029359235'] | [26764.0, 25768.0] | [173.0, 157.0] | [110, 107] |
p02785 | u870559097 | 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())\nList=sorted(list(map(int,input().split())))\na = 0\nfor i in range(N - k):\n a = a + List[i]\nprint(a)', 'N, K=map(int, input().split())\nList=sorted(list(map(int,input().split())))\na = 0\nfor i in range(N - K):\n a = a + List[i]\nprint(a)'] | ['Runtime Error', 'Accepted'] | ['s738178260', 's043095025'] | [26360.0, 26764.0] | [152.0, 173.0] | [130, 130] |
p02785 | u881214802 | 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=sorted(list(map(int,input().split())),reverse=True)[k-1:]\nprint(sum(a))', 'n,k=map(int,input().split())\na=sorted(list(map(int,input().split())),reverse=True)[k:]\nprint(sum(a))'] | ['Wrong Answer', 'Accepted'] | ['s840991986', 's400997522'] | [26024.0, 26180.0] | [157.0, 151.0] | [102, 100] |
p02785 | u884601206 | 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()\nh=[::-1]\nif k!=0:\n for i in range(k):\n h[i]=0\n\n \nprint(sum(h))\n', 'n,k=map(int,input().split())\nh=list(map(int,input().split()))\nh.sort()\nh=h[::-1]\n\nif k>=n:\n print(0)\n \nelif k!=0:\n for i in range(k):\n h[i]=0\n print(sum(h))\n\nelse:\n print(sum(h))\n \n\n\n\n\n'] | ['Runtime Error', 'Accepted'] | ['s081548638', 's394435539'] | [2940.0, 26180.0] | [17.0, 166.0] | [139, 194] |
p02785 | u890183245 | 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, K = map(int, input().split())\narray = list(map(int, input().split()))\nA = sorted(array, reverse=True)\ndel A[0:K-1]\nprint(sum(A))\n', 'H, K = int(input().split())\narray = list(map(int, input().split()))\nA = sorted(array, reverse=True)\ndel A[0:K-1]\nprint(sum(A))', 'H, K = map(int, input().split())\narray = list(map(int, input().split()))\nA = sorted(array, reverse=True)\ndel A[0:K]\nprint(sum(A))'] | ['Wrong Answer', 'Runtime Error', 'Accepted'] | ['s564795860', 's903336700', 's041464592'] | [26024.0, 3060.0, 26024.0] | [154.0, 17.0, 148.0] | [132, 126, 129] |
p02785 | u891876269 | 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())\nHlist = list(map(int, input().split()))\nHlist.sort(reverse=True)\n'''\nprint(Hlist)\n'''\nif K == 0:\n print(sum(Hlist))\nelif K == 1:\n del Hlist[0]\n print(Hlist)\n print(sum(Hlist))\nelse:\n del Hlist[0:K-1]\n print(Hlist)\n print(sum(Hlist))", 'N, K = map(int, input().split())\nHlist = list(map(int, input().split()))\nHlist.sort(reverse=True)\nif K == 0:\n print(sum(Hlist))\nelse:\n Hlist[0:K] = []\n print(sum(Hlist))\n'] | ['Wrong Answer', 'Accepted'] | ['s271737378', 's865471402'] | [26024.0, 26764.0] | [162.0, 149.0] | [272, 336] |
p02785 | u891945807 | 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 = input().rstrip()\nn = N[0]\nk = N[1]\n\nh = list(map(int,input().split()))\nh.sort(reverse=True)\n\nm = 0\nhit = 0\nif k >= n :\n m = n\nelse:\n for i in range(k,n):\n hit += h[i]\n \n m = k + hit\n \nprint(m)', 'N = list(map(int,input().rstrip().split()))\nn = N[0]\nk = N[1]\n\nh = list(map(int,input().split()))\nh.sort(reverse=True)\n\nm = 0\nhit = 0\nif k >= n :\n m = 0\nelse:\n for i in range(k,n):\n hit += h[i]\n \n m = hit\nprint(type(m))\nprint(m)', 'N = list(map(int,input().rstrip().split()))\nn = N[0]\nk = N[1]\n\nh = list(map(int,input().split()))\nh.sort(reverse=True)\n\nm = 0\nhit = 0\nif k >= n :\n m = n\nelse:\n for i in range(k,n):\n hit += h[i]\n \n m = k + hit\n \nprint(m)', 'N = list(map(int,input().rstrip().split()))\nn = N[0]\nk = N[1]\n\nh = list(map(int,input().split()))\nh.sort(reverse=True)\n\nm = 0\nhit = 0\nif k >= n :\n m = 0\nelse:\n for i in range(k,n):\n hit += h[i]\n \n m = hit\nprint(m)'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s039479047', 's163942409', 's487116319', 's716816464'] | [26360.0, 26180.0, 26764.0, 26180.0] | [145.0, 169.0, 169.0, 169.0] | [204, 235, 227, 220] |
p02785 | u895592784 | 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(' ')))\nif(K >= N):\n print(0)\n exit(0)\nfor j in range(K):\n H[K - j - 1] = 0\nprint(sum(H))", "N, K = map(int, input().split(' '))\nH = sorted(map(int, input().split(' ')))\nprint(H)\nif(K >= N):\n print(0)\n exit(0)\nfor j in range(K):\n H[N - j - 1] = 0\nprint(sum(H))", "N, K = map(int, input().split(' '))\nH = sorted(map(int, input().split(' ')))\nif(K >= N):\n print(0)\n exit(0)\nfor j in range(K):\n H[N - j - 1] = 0\nprint(sum(H))"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s164026370', 's704503976', 's107674353'] | [26764.0, 25768.0, 26764.0] | [174.0, 196.0, 176.0] | [167, 176, 167] |
p02785 | u904639778 | 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_arr = list(map(int, input().split(' '))).sorted(reverse=True)\n\nif n <= k:\n print('0')\nelse:\n print(sum(h_arr[k:]))", "n, k = list(map(int, input().split(' ')))\nh_arr = sorted(list(map(int, input().split(' '))),reverse=True)\n \nif n <= k:\n print('0')\nelse:\n print(sum(h_arr[k:]))"] | ['Runtime Error', 'Accepted'] | ['s276265591', 's950513285'] | [26020.0, 26024.0] | [68.0, 153.0] | [160, 161] |
p02785 | u905743924 | 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()], inverse=True)\nif K >= len(H):\n print('0')\nelse:\n print(sum(H[K:]))", "N, K = map(int, input().split())\nH = sorted([int(x) for x in input().split()])[::-1]\nif K >= len(H):\n print('0')\nelse:\n print(sum(H[K:]))"] | ['Runtime Error', 'Accepted'] | ['s900820084', 's143717792'] | [26764.0, 26764.0] | [74.0, 169.0] | [151, 143] |
p02785 | u907223098 | 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(i) for i in input().split())\nh=[0 for i in range(k)]\np=0\nfor i in input().split():\n p+=i\n if h[0]<i:\n h[0]=i\n h.sort()\nprint(p-sum(h))', 'n,k=(int(i) for i in input().split())\nh=[0 for i in range(k)]\np=0\nfor i in input().split():\n p+=int(i)\n try:\n if h[0]<i:\n h[0]=int(i)\n h.sort()\n except IndexError:\n continue\nprint(p-sum(h))', 'n,k=(int(i) for i in input().split())\nh=[]\nfor i in input().split():\n h.append(int(i))\nh.sort()\nfor i in range(k):\n h.pop(-1)\nprint(sum(h)+k)', 'n,k=(int(i) for i in input().split())\nh=[]\nfor i in input().split():\n h.append(int(i))\nh.sort()\nif k!=0:\n\tfor i in range(min(n,k)):\n \t h.pop(-1)\nprint(sum(h))\n'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s257979376', 's385049885', 's981737475', 's494069326'] | [21588.0, 21588.0, 26180.0, 26764.0] | [43.0, 135.0, 205.0, 196.0] | [151, 214, 143, 161] |
p02785 | u907446975 | 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=input().split()\n(n,m)=map(int,a)\nb=input().split()\nb1=list(map(int,b))\nb1=sorted(b1)\nfor i in range(m):\n b1[i]=0\n if i==len(b1)-1:\n break\n\nprint(sum(b1))', 'a=input().split()\n(n,m)=map(int,a)\nb=input().split()\nb1=list(map(int,b))\nb1=sorted(b1)\nfor i in range(m):\n b1[len(b)-1-i]=0\n if i==len(b1)-1:\n break\n\nprint(sum(b1))'] | ['Wrong Answer', 'Accepted'] | ['s740336384', 's915005889'] | [28088.0, 28092.0] | [200.0, 224.0] | [168, 177] |
p02785 | u912359563 | 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()))\nA.sort()\nS = 0\nfor i in range(0, K):\n if not A.empty():\n A.pop_back()\nprint(sum(A))', 'N, K = map(int, input().split())\nA = list(map(int, input().split()))\nA.sort()\nS = 0\nfor i in range(0, K):\n if len(A) > 0:\n A.pop(-1)\nprint(sum(A))'] | ['Runtime Error', 'Accepted'] | ['s407633724', 's153632106'] | [26764.0, 26020.0] | [147.0, 192.0] | [156, 156] |
p02785 | u920032768 | 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 = list(map(int, input().split())).sort()\nprint(sum(h[:-k]))', 'n, k = map(int, input().split())\nif n <= k:\n print(0)\n exit()\nh = list(map(int, input().split())).sort()\nprint(sum(h[:-k]))', 'n, k = map(int, input().split())\nh = list(map(int, input().split()))\nif n <= k:\n print(0)\nelif k == 0:\n print(sum(h))\nelse:\n h = sorted(list(map(int, input().split())))\n print(sum(h[:n-k]))', 'n, k = map(int, input().split())\nif n <= k:\n print(0)\nelse:\n h = list(map(int, input().split())).sort()\n print(sum(h[:-k]))', 'n, k = map(int, input().split())\nh = list(map(int, input().split()))\nif n <= k:\n print(0)\nelif k == 0:\n print(sum(h))\nelse:\n h = sorted(h)\n print(sum(h[:n-k]))'] | ['Runtime Error', 'Runtime Error', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s060880375', 's770353743', 's808435178', 's988053953', 's854799629'] | [2940.0, 26024.0, 26024.0, 26024.0, 26180.0] | [17.0, 147.0, 69.0, 142.0, 151.0] | [125, 125, 193, 126, 163] |
p02785 | u923657126 | 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()))\nhsort = sorted(h)\nans = sum(hsort[k-n:])\nprint(ans)', 'n, k = map(int,input().split())\nh = list(map(int,input().split()))\nhsort = sorted(h)\nans = sum(hsort[n-k-1:])\nprint(ans)', 'n, k = map(int,input().split())\nh = list(map(int,input().split()))\nh.sort(reverse=True)\nans = sum(h[k:])\nprint(ans)'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s071314515', 's579293442', 's407016456'] | [26024.0, 26024.0, 26764.0] | [157.0, 152.0, 155.0] | [118, 120, 115] |
p02785 | u928784113 | 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()\nfor i in range(k):\n h[i] = 0\nprint(sum(h))', 'n,k = map(int,input().split())\nh = list(map(int,input().split()))\nh.sort(reverse = True)\nfor i in range(min(n,k)):\n h[i] = 0\nprint(sum(h))'] | ['Runtime Error', 'Accepted'] | ['s911837312', 's608127475'] | [26024.0, 25768.0] | [160.0, 170.0] | [120, 141] |
p02785 | u932868243 | 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)\ndel h[5]\nprint(sum(h))', 'n,k=map(int,input().split())\nh=list(map(int,input().split()))\nh.sort(reverse=True)\ndel h[:k]\nprint(sum(h))'] | ['Runtime Error', 'Accepted'] | ['s322260865', 's325865620'] | [26024.0, 26024.0] | [154.0, 144.0] | [105, 106] |
p02785 | u933717615 | 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\nans = 0\nif K>=N:\n print(ans)\nelse:\n H = H.sort(reverse=True)\n for i in range(K, N):\n ans += H[i]\n print(ans)', 'N, K = map(int, input().split())\nH = list(map(int, input().split()))\n\nans = 0\nif K>=N:\n print(ans)\nelse:\n H.sort(reverse=True)\n for i in range(K, N):\n ans += H[i]\n print(ans)'] | ['Runtime Error', 'Accepted'] | ['s944015493', 's601194275'] | [26024.0, 26180.0] | [146.0, 172.0] | [185, 181] |
p02785 | u939633554 | 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())\nHs = map(int,input().split())\nprint(sum(sorted(Hs, reverse=True)[K::])', 'N, K = map(int, input().split())\nHs = map(int,input().split())\nprint(sum(sorted(Hs, reverse=True)[K::]))'] | ['Runtime Error', 'Accepted'] | ['s758137232', 's994946124'] | [2940.0, 26024.0] | [18.0, 148.0] | [103, 104] |
p02785 | u944643608 | 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 K >= N:\n print(0)\nelse:\n H.sort\n print(sum(H[0:N-K])', 'N, K = map(int,input().split())\nH = list(map(int,input().split()))\nif K >= N:\n print(0)\nelse:\n H.sort()\n print(sum(H[0:N-K]))'] | ['Runtime Error', 'Accepted'] | ['s086621623', 's585344865'] | [3064.0, 26024.0] | [17.0, 148.0] | [125, 128] |
p02785 | u946322619 | 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\nh = input().split()\nh.sort(reverse=True)\n\nprint(sum(h[k:]))', 'n, k = map(int, input().split())\n\nh = list(map(int, input().split()))\nh.sort(reverse=True)\n\nprint(sum(h[k:]))\n'] | ['Runtime Error', 'Accepted'] | ['s402912533', 's544143513'] | [20240.0, 26180.0] | [172.0, 151.0] | [93, 110] |
p02785 | u946424121 | 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)\nprint(sum(sorted(h)[:n-k+1]))', 'n, k = map(int, input().split())\nh = list(map(int, input().split()))\nh = sorted(h)\nif n <= k:\n print(0)\nelse:\n print(sum(sorted(h)[:n-k]))'] | ['Wrong Answer', 'Accepted'] | ['s604406677', 's304556440'] | [26020.0, 26764.0] | [167.0, 164.0] | [112, 144] |
p02785 | u949802245 | 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\nEnemyCount, slayeCount = map(int, input().split())\nenemyHealths = list(map(int, input().split(" "))).sort()\n\nif EnemyCount < slayeCount:\n slayeCount = EnemyCount\n\nfor _ in range(slayeCount):\n del enemyHealths[-1]\n\nprint(sum(enemyHealths))', 'import math\n\nEnemyCount, slayeCount = map(int, input().split())\nenemyHealths = list(map(int, input().split(" ")))\nenemyHealths.sort()\n\nif EnemyCount < slayeCount:\n slayeCount = EnemyCount\n\nfor _ in range(slayeCount):\n del enemyHealths[-1]\n\nprint(sum(enemyHealths))\n'] | ['Runtime Error', 'Accepted'] | ['s242091269', 's118671636'] | [27300.0, 27300.0] | [140.0, 163.0] | [257, 271] |
p02785 | u955691979 | 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,n = input().split()\nw = input().split()\n\nfor i in range(0,int(n)):\n h = int(h) - int(w[i])\n\nif(h<=0):\n print("Yes")\nelse:\n print("No")', 'n,k = input().split()\nmon = input().split()\nmon = list(map(int,mon))\n\nif(int(n)<=int(k)):\n print(0)\nelif(int(k)==0):\n print(sum(mon))\nelse: \n mon.sort(reverse=True)\n for i in range(0,int(k)):\n mon[i] = 0\n \n print(sum(mon))'] | ['Runtime Error', 'Accepted'] | ['s930438718', 's218467673'] | [20240.0, 26180.0] | [129.0, 164.0] | [145, 254] |
p02785 | u957616073 | 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 = [int(i) for i in input().split(" ")]\ns = x[1]\nm = [int(i) for i in input().split(" ")]\nif s == 0:\n print(sum(m))\nelse:\n m = sorted(m)[0:-s:1]\n print(m)', 'x = [int(i) for i in input().split(" ")]\ns = x[1]\nm = [int(i) for i in input().split(" ")]\nif s == 0:\n print(sum(m))\nelse:\n m = sorted(m)[0:-s:1]\n print(sum(m))'] | ['Wrong Answer', 'Accepted'] | ['s416217106', 's934889483'] | [25768.0, 26024.0] | [174.0, 162.0] | [158, 163] |
p02785 | u966546644 | 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())\nlife = list(map(int, input().split()))\n\nNlife = sorted(life, reverse=True)\n\n\nif K >= 1:\n del Nlife[:K-1]\n \n\nanswer = sum(Nlife)\n\nprint(answer)', 'N, K = map(int, input().split())\nlife = list(map(int, input().split()))\n\nNlife = sorted(life)\n\n\nif K >= 1:\n del Nlife[:K-1]\n \n\nanswer = sum(Nlife)\n\nprint(answer)', 'N, K = map(int, input().split())\nlife = list(map(int, input().split()))\n\nNlife = sorted(life, reverse=True)\n\n\nif K >= 1:\n del Nlife[:K]\n \n\nanswer = sum(Nlife)\n\nprint(answer)\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s209844767', 's996469026', 's318531078'] | [26024.0, 26024.0, 26176.0] | [147.0, 147.0, 148.0] | [177, 163, 176] |
p02785 | u969211566 | 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\ndel h[n::]\nh.sort()\nif k != 0:\n del h[-k:]\nprint(h)\nprint(sum(h))', 'n,k = map(int,input().split())\nh = list(map(int,input().split()))\n\ndel h[n::]\nh.sort()\nif k != 0:\n del h[-k:]\nprint(sum(h))'] | ['Wrong Answer', 'Accepted'] | ['s745665059', 's838973312'] | [25768.0, 26024.0] | [165.0, 152.0] | [133, 124] |
p02785 | u971654915 | 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 sys import stdin\n\n\ndef main(inp1, inp2):\n n, k = [int(i) for i in inp1.split(sep=' ')]\n h_list = sorted([int(i) for i in inp2.split(sep=' ')])\n\n print(h_list)\n num_enemy = n\n enable_special = k\n\n if enable_special >= num_enemy:\n return 0\n elif enable_special == 0:\n return sum(h_list)\n else:\n return sum(h_list[:-enable_special])\n\n\nif __name__ == '__main__':\n input1 = stdin.readline().rstrip()\n input2 = stdin.readline().rstrip()\n ret = main(input1, input2)\n print(ret)", "from sys import stdin\n\n\ndef main(inp1, inp2):\n n, k = [int(i) for i in inp1.split(sep=' ')]\n h_list = sorted([int(i) for i in inp2.split(sep=' ')])\n\n num_enemy = n\n enable_special = k\n\n if enable_special >= num_enemy:\n return 0\n elif enable_special == 0:\n return sum(h_list)\n else:\n return sum(h_list[:-enable_special])\n\n\nif __name__ == '__main__':\n input1 = stdin.readline().rstrip()\n input2 = stdin.readline().rstrip()\n ret = main(input1, input2)\n print(ret)"] | ['Wrong Answer', 'Accepted'] | ['s776800441', 's501377978'] | [28112.0, 27952.0] | [182.0, 154.0] | [532, 514] |
p02785 | u974292946 | 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 k == 0:\n print(sum(H))\n exit()\n\nH.sort(reverse=True)\ndel H[:k + 1]\nprint(sum(H))', 'n, k = map(int, input().split())\nH = list(map(int, input().split()))\n\nif k == 0:\n print(sum(H))\n exit()\n\nH.sort(reverse=True)\ndel H[:k + 1]\nif not H:\n print(0)\nelse :\n print(sum(H))', 'n, k = map(int, input().split())\nH = list(map(int, input().split()))\n\nif k == 0:\n print(sum(H))\n exit()\n\nif n <= k:\n print(0)\n exit()\n\nH.sort(reverse=True)\ndel H[:k]\nprint(sum(H))\n'] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s215480037', 's559327760', 's514437603'] | [26016.0, 26764.0, 26024.0] | [156.0, 148.0, 149.0] | [159, 193, 192] |
p02785 | u977141657 | 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 = h.sort()\n\nif k >= n:\n print(0)\n \nelse:\n print(sum(h[:n-k]))', 'n, k = map(int, input().split())\nh = list(map(int, input().split()))\nh.sort()\n\nif k >= n:\n print(0)\n \nelse:\n print(sum(h[:n-k]))'] | ['Runtime Error', 'Accepted'] | ['s893681382', 's512830361'] | [25768.0, 26180.0] | [152.0, 149.0] | [135, 131] |
p02785 | u981693103 | 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)\nelif K == 0:\n print(sum(H))\nelse:\n H = sort(H)\n print(sum(H[:-K]))', 'N, K = map(int, input().split())\nH = list(map(int, input().split()))\nH = sort(H)\nprint(sum(H[:-K]))', 'N, K = map(int, input().split())\nH = list(map(int, input().split()))\nif N <= K:\n print(0)\nelif K == 0:\n print(sum(H))\nelse:\n H = sorted(H)\n print(sum(H[:-K]))\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s633757352', 's771213359', 's362502485'] | [26024.0, 26024.0, 26764.0] | [71.0, 68.0, 154.0] | [160, 99, 163] |
p02785 | u982749462 | 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())\nprint(N,K)\nH = list(map(int, input().split()))\n#H = input().split()\n#print(H)\nif N<=K:\n print(0)\nelse:\n \n \n \n H.sort(reverse=True)\n newH = H[K:]\n sumH = sum(newH)\n print(sumH)', 'N,K = map(int, input().split())\n\nH = list(map(int, input().split()))\n#H = input().split()\n#print(H)\nif N<=K:\n print(0)\nelse:\n \n \n \n H.sort(reverse=True)\n newH = H[K:]\n sumH = sum(newH)\n print(sumH)'] | ['Wrong Answer', 'Accepted'] | ['s342266918', 's735043088'] | [26180.0, 26764.0] | [150.0, 151.0] | [378, 379] |
p02785 | u998169143 | 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(i) for i in input().split()]\nH = [int(i) for i in input().split()]\n\nsorted_H = sorted(H)\nnum = np.maximum(0, N-K)\nanswer = sum(sorted_H[:num])\nprint(answer)', 'import numpy as np\nN, K = [int(i) for i in input().split()]\nH = [int(i) for i in input().split()]\n\nsorted_H = sorted(H)\nnum = np.maximum(0, N-K)\nanswer = sum(sorted_H[:num])\nprint(answer)'] | ['Runtime Error', 'Accepted'] | ['s568125906', 's917507673'] | [26024.0, 34220.0] | [155.0, 291.0] | [168, 187] |
p02786 | u005318559 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['h = int(input())\n\nres = 0\ni = 1\n\nwhile h > 0:\n h = h//2\n res = res + i\n i*2\nprint(res)', 'h = int(input())\n\nres = 0\ni = 1\nwhile h > 0:\n h = h//2\n res = res + i\n i *= 2\nprint(res)\n\n'] | ['Wrong Answer', 'Accepted'] | ['s553617580', 's983231123'] | [2940.0, 2940.0] | [17.0, 17.0] | [89, 93] |
p02786 | u017415492 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['import math\nh=int(input())\nk=math.ceil(math.log2(h))\nprint(2**k-1)\n\n ', 'import math\nh=int(input())\nk=math.ceil(math.log2(h))\nif k==math.log2(h):\n print(2**(k+1)-1)\nelse:\n print(2**k-1)'] | ['Wrong Answer', 'Accepted'] | ['s937002033', 's649720637'] | [3444.0, 3188.0] | [21.0, 19.0] | [70, 114] |
p02786 | u021916304 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['def ii():return int(input())\ndef iim():return map(int,input().split())\ndef iil():return list(map(int,input().split()))\ndef ism():return map(str,input().split())\ndef isl():return list(map(str,input().split()))\n\nh = ii()\ncount = 0\nwhile h >= 2:\n h = (h+1)//2\n count += 1\n#print(count)\nif count == 0:\n print(1)\nelse:\n print(2**(count)-1)\n', 'def ii():return int(input())\ndef iim():return map(int,input().split())\ndef iil():return list(map(int,input().split()))\ndef ism():return map(str,input().split())\ndef isl():return list(map(str,input().split()))\n\nh = ii()\ncount = 0\nans = 1\nwhile h >= 2:\n h = h//2\n ans += 2*count\n count += 1\n#print(ans,count)\nif count == 0:\n print(1)\nelse:\n print(2**(count+1)-1)\n'] | ['Wrong Answer', 'Accepted'] | ['s316337098', 's296483617'] | [3064.0, 3064.0] | [17.0, 17.0] | [347, 376] |
p02786 | u038408819 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['H = int(input())\ns = 1\nwhile H!=0:\n H = divmod(H, 2)[0]\n s *= 2\ns = s / 2\nprint(int(s + p))\n', 'H = int(input())\ns = 1\nwhile H!=0:\n H = divmod(H, 2)[0]\n s *= 2\n\nprint(int(s / 2))\n', 'H = int(input())\ns = 1\nwhile H!=0:\n H = divmod(H, 2)[0]\n s *= 2\ns = s / 2\np = s - 1\nprint(int(s + p))\n'] | ['Runtime Error', 'Wrong Answer', 'Accepted'] | ['s533799940', 's596029448', 's644615024'] | [2940.0, 2940.0, 2940.0] | [17.0, 17.0, 17.0] | [98, 89, 108] |
p02786 | u046592970 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['import math\nh = int(input())\nk = (math.log2(h))\nprint((2**(k+1)-1))', 'import math\nh = int(input())\nk = int(math.log2(h))\nprint((2**(k+1)-1))'] | ['Wrong Answer', 'Accepted'] | ['s575274817', 's123674903'] | [2940.0, 2940.0] | [17.0, 17.0] | [67, 70] |
p02786 | u051401873 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['import math\na = []\nb = []\ntoki = []\nh, n = map(int, input().split())\nfor i in range(n):\n ai, bi = map(float, input().split())\n toki.append((ai, bi))\n\ndef yeah(hp, toki):\n mp = 0\n dps = 0\n kou = 0\n for ai, bi in toki:\n t = ai\n if (hp - ai) <= 0:\n t = hp\n dps2 = float(t/bi)\n if dps <= dps2:\n dps = dps2\n mp = bi\n kou = t\n return (hp-kou, mp)\nmp = 0\nzan = h\nwhile True:\n zan, mp2 = yeah(zan, toki)\n mp += mp2\n if zan <=0:\n break\nprint(int(mp))\n ', 'import math \nh = int(input())\nans = 0\nt = int(math.log2(h)+1)\n\nfor i in range(t):\n ans += 2**i\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s998522218', 's615048213'] | [3064.0, 3060.0] | [18.0, 18.0] | [490, 106] |
p02786 | u053856575 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['h,n = map(int,input().split())\n\nx = []\ny = []\n\nfor i in range(n):\n a,b = map(int,input().split())\n x.append(a)\n y.append(b)\n\ndef knapsack(N,W,weight,value):\n inf=float("inf")\n dp=[[inf for i in range(W+1)] for j in range(N+1)]\n for i in range(W+1): dp[0][i]=inf\n\n for i in range(N):\n for w in range(W+1):\n m = dp[i][w]\n p = value[i]\n q = weight[i]\n while w >= q:\n if w - q >= 0:\n m=min(dp[i][w-q]+p,m)\n p += value[i]\n q += weight[i]\n m=min(dp[i][w-q]+p,m,p)\n dp[i+1][w] = m\n return dp[N][W]\n\nk = knapsack(n,h,x,y)\nprint(k)', 'h = int(input())\n\ncount = 1\nans = 0\n\nwhile h != 0:\n ans += count\n h = h//2\n count *=2\n\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s343953824', 's175488787'] | [3064.0, 2940.0] | [18.0, 18.0] | [629, 106] |
p02786 | u056626722 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['import math\nprint(2**int(math.log2(int(input())))-1)\n', '2**log2(int(input().split()[0]))-1\n\n', 'print(2**log2(int(input()))-1)\n', 'import math\nprint(2**int(math.log2(int(input()))+1)-1)'] | ['Wrong Answer', 'Runtime Error', 'Runtime Error', 'Accepted'] | ['s194189485', 's635013675', 's945800455', 's641046782'] | [3188.0, 2940.0, 2940.0, 3060.0] | [22.0, 17.0, 17.0, 20.0] | [53, 36, 31, 54] |
p02786 | u060694763 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['import math\nH = int(input())\n\ncount = 0\ncount = int(math.log2(H))\n\ntotal = 0\ntotal = (1 - (2**(count + 1)))/(1 - 2)\nprint(total)\n', 'import math\nH = int(input())\n\ncount = 0\ncount = int(math.log2(H))\n\ntotal = 0\ntotal = int((1 - (2**(count + 1)))/(1 - 2))\nprint(total)\n'] | ['Wrong Answer', 'Accepted'] | ['s200369016', 's262059928'] | [3188.0, 3064.0] | [18.0, 17.0] | [129, 134] |
p02786 | u065137691 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['H = int(input())\n\ncnt = 0\n\nwhile True:\n H //= 2\n cnt += 1\n\n if H == 0:\n break\n\nprint(cnt)\nprint(2**cnt-1)\n\n', 'H = int(input())\n\ncnt = 0\n\nwhile True:\n H //= 2\n cnt += 1\n\n if H == 0:\n break\n\nprint(2**cnt-1)\n\n'] | ['Wrong Answer', 'Accepted'] | ['s612893344', 's455192631'] | [8980.0, 9016.0] | [30.0, 28.0] | [123, 112] |
p02786 | u065774356 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['H=int(input())\nA=1\nif H==1:\n print(1)\nelse:\n while H>=A:\n A*=2', 'H=int(input())\nA=1\nif H==1:\n print(1)\nelse:\n while H>=A:\n A*=2\n print(A-1)\n '] | ['Wrong Answer', 'Accepted'] | ['s697248996', 's701093019'] | [3064.0, 2940.0] | [17.0, 17.0] | [75, 98] |
p02786 | u067694718 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['def a(x):\n if x == 1: return 1\n if x > 1: return a((x + 1) // 2)) * 2 + 1\n\nprint(a(int(input())))\n', 'def a(x):\n if x == 1: return 1\n if x > 1: return a((a(x // 2)) * 2 + 1\n\nprint(a(int(input())))\n', 'def a(x):\n if x == 1: return 1\n if x > 1: return a(x // 2) * 2 + 1\n\nprint(a(int(input())))\n'] | ['Runtime Error', 'Runtime Error', 'Accepted'] | ['s644375161', 's675456706', 's152065969'] | [2940.0, 2940.0, 3064.0] | [18.0, 17.0, 17.0] | [104, 101, 97] |
p02786 | u075303794 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['import bisect\n\nH=int(input())\nA=[2**x for x in range(51)]\nif H%4==0:\n H+=1\nindex=bisect.bisect_left(A,H)\nprint(sum(A[:index]))', 'import bisect\n\nH=int(input())\nA=[2**x for x in range(51)]\nindex=bisect.bisect_right(A,H) \nprint(sum(A[:index]))'] | ['Wrong Answer', 'Accepted'] | ['s222757464', 's948704904'] | [8996.0, 9020.0] | [28.0, 29.0] | [127, 111] |
p02786 | u081193942 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['h = int(input())\n\nlhb = len(format(h, "b"))\nprint(2 ** lhb - 1 + lhb)', 'h = int(input())\n\nlhb = len(format(h, "b"))\nprint(2 ** lhb - 1)'] | ['Wrong Answer', 'Accepted'] | ['s907565418', 's175240751'] | [3064.0, 2940.0] | [19.0, 17.0] | [70, 64] |
p02786 | u081340269 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['#D\n\nH = int(input())\nc = 1\nwhile H>1:\n H = math.floor(H/2)\n c += 1\nprint(sum([2**i for i in range(c)]))', '#D\nimport math\nH = int(input())\nc = 1\nwhile H>1:\n H = math.floor(H/2)\n c += 1\nprint(sum([2**i for i in range(c)]))'] | ['Runtime Error', 'Accepted'] | ['s629699375', 's371944420'] | [2940.0, 3060.0] | [17.0, 17.0] | [105, 116] |
p02786 | u082748852 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ["#!/user/bin/env python\n\n\n# -*- coding: utf-8 -*-\n\n\n__author_ = 'Maruta Yuzuha'\n__version_ = '1.0.0'\n__date__ = '2019/12/25'\n\nimport math\ndef main():\n \n s = int(input())\n a = 0 \n b = 0 \n while s > 0:\n s = float(s / 2)\n print(s)\n a += pow(2, b)\n b += 1\n if s < 1:\n break\n print(a)\n return 0\n\nif __name__ == '__main__':\n \n \n\n \n \n import doctest\n doctest.testmod()\n\n \n import sys\n sys.exit(main())", "#!/user/bin/env python\n\n\n# -*- coding: utf-8 -*-\n\n\n__author_ = 'Maruta Yuzuha'\n__version_ = '1.0.0'\n__date__ = '2019/12/25'\n\nimport math\ndef main():\n \n s = int(input())\n a = 0 \n b = 0 \n while s > 0:\n s = float(s / 2)\n a += pow(2, b)\n b += 1\n if s < 1:\n break\n print(a)\n return 0\n\nif __name__ == '__main__':\n \n \n\n \n \n import doctest\n doctest.testmod()\n\n \n import sys\n sys.exit(main())"] | ['Wrong Answer', 'Accepted'] | ['s308314377', 's701060183'] | [8640.0, 7492.0] | [110.0, 96.0] | [1429, 1412] |
p02786 | u082978753 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['%%time\nH = int(input())\ncounter = 0\ni = H\nwhile i > 1:\n i = i//2\n counter += 1\n \nans = 2**(counter+1)-1\nprint(ans)', 'H = int(input())\ncounter = 0\ni = H\nwhile i > 1:\n i = i//2\n counter += 1\n \nans = int(2**(counter+1)-1)\nprint(ans)'] | ['Runtime Error', 'Accepted'] | ['s149084228', 's478458330'] | [3064.0, 2940.0] | [17.0, 17.0] | [123, 121] |
p02786 | u088552457 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['import math\nN = int(input())\n\ndef waru2(n):\n c = 0\n while True:\n if n == 1:\n break\n n = int(n/2)\n c += 1\n return c\n \nkai = 0\nk = 0\nwhile True:\n if k >= N:\n break\n k = 2 ** kai\n kai += 1\n\na = waru2(kai-1)\n\nc = 0\nfor i in range(a):\n c += 2**i\n \nprint(c)', 'N = int(input())\n\nkai = 0\nk_sum = 0\nwhile True:\n if k_sum >= N:\n break\n k_sum += 2 ** kai\n kai += 1\n \nprint(k_sum)'] | ['Wrong Answer', 'Accepted'] | ['s234903490', 's011139623'] | [3060.0, 3064.0] | [2104.0, 17.0] | [276, 121] |
p02786 | u092387689 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['h = int(input())\n\nadd = 1\nans = 0\nwhile(h!=1):\n h = (h+1)//2\n ans += add\n add *= 2\n print(h,ans)\n\nans += add\nprint(ans)', 'h = int(input())\n\nadd = 1\nans = 0\nwhile(h!=1):\n h = h//2\n ans += add\n add *= 2\n \nans += add\nprint(ans)'] | ['Wrong Answer', 'Accepted'] | ['s901434826', 's149946820'] | [3060.0, 2940.0] | [18.0, 18.0] | [131, 114] |
p02786 | u094999522 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['print(~-1<<len(bin(int(input()))-3))', 'print(~-(1<<len(bin(int(input()))[2:])))'] | ['Runtime Error', 'Accepted'] | ['s828975084', 's620355791'] | [2940.0, 3060.0] | [17.0, 20.0] | [36, 40] |
p02786 | u095094246 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['from math import log2,ceil\nh = int(input())\nprint(2**ceil(log2(h))-1)', 'from math import log2,floor\nh = int(input())\nprint(2**(floor(log2(h))+1)-1)'] | ['Wrong Answer', 'Accepted'] | ['s594526428', 's122066971'] | [3188.0, 2940.0] | [19.0, 18.0] | [69, 75] |
p02786 | u098679988 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['for i in range(10000):\n if n > 2**i:\n pass\n elif n == 1:\n print(1)\n elif n == 2**i:\n print(4*(2**(i)//2)-1)\n break\n else:\n print(4*(2**(i-1)//2)-1)\n break', 'n = int(input())\nflag = True\nans = 1\nnow = n\ncount = 1\n\nfor i in range(10000):\n if n > 2**i:\n pass\n else:\n print(4*(2**(i-1)//2)-1)\n break', 'n = int(input())\nflag = True\nans = 1\nnow = n\ncount = 1\nwhile flag == True:\n if now == 1:\n ans += count\n print(ans)\n break\n now = now/2\n if count != 1:\n ans += count\n print("now",now)\n # print(ans)\n count = count*2\n # print(count)\n else:\n print("now",now)\n # print(ans)\n count = 1*2', 'n = int(input())\nflag = True\nans = 1\nnow = n\ncount = 1\n\n\nfor i in range(10000):\n if n > 2**i:\n pass\n elif n == 1:\n print(1)\n break\n elif n == 2**i:\n print(4*(2**(i)//2)-1)\n break\n else:\n print(4*(2**(i-1)//2)-1)\n break'] | ['Runtime Error', 'Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s493727411', 's682282889', 's908896990', 's840375674'] | [2940.0, 3060.0, 5108.0, 3060.0] | [18.0, 17.0, 2104.0, 17.0] | [208, 165, 370, 279] |
p02786 | u101839330 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['h = int(input())\nif(h == 1):\n print(1)\n exit()\ncnt = 1\npoint = 0\nlist = [0 for i in range(100)]\nlist[1] = 1\nwhile True:\n list[cnt] = ((list[cnt-1] * 2) +1)\n point += 2**cnt\n cnt += 1\n if(point>h):\n break\nprint(list[cnt-1]*2+1)', 'h = int(input())\nif(h == 1):\n print(1)\n exit()\ncnt = 1\npoint = 0\nlist = [0 for i in range(100)]\nwhile (h>point+1):\n list[cnt] = ((list[cnt-1] * 2) +1)\n point += 2**cnt\n cnt += 1\n\nprint(list[cnt-1]*2+1)'] | ['Wrong Answer', 'Accepted'] | ['s498894789', 's946958292'] | [3064.0, 3064.0] | [18.0, 18.0] | [235, 206] |
p02786 | u121700322 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['import numpy as np\n\n\nH, N = map(int, input().split())\nAB = [list(map(int, input().split())) for _ in range(N)]\na, b = np.array(AB, dtype=np.int64).reshape(N, 2).T\n\nd = np.zeros(H + 1, dtype=np.int64)\n\nfor hp in range(1, H + 1):\n c = d[np.maximum(hp - a, 0)] + b\n d[hp] = np.amin(c)\n print(hp, np.amin(c))\n\nprint(d[H])', 'H = int(input())\n\n# monster HP is X\n# X==1 >> X=0\n# X>1 other 2 monster appear. These 2 mosters have [X/2] HP.\n\n# two actions\n\n# special: make vitality 0. Fenek can use K times of specials.\n# print(type(2*10**14))\n\n# from collections import deque\n#\n# print(f"H={H}")\n#\n\n\n\n#\n# while monsters:\n# # for _ in range(3):\n\n# # print(f"attack to monster(HP={hp})")\n# if hp != 1:\n\n# hp_hp = hp//2\n\n\n\n\ni = 1\nwhile H > 1:\n H //= 2\n i += 1\n\nprint(2**i - 1)'] | ['Runtime Error', 'Accepted'] | ['s711297004', 's925543100'] | [12500.0, 2940.0] | [149.0, 17.0] | [326, 764] |
p02786 | u123579949 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['import math\nprint(2**math.ceil(math.log2(int(input())))-1)', 'import math\nprint(2**(math.floor(math.log2(int(input())))+1)-1)'] | ['Wrong Answer', 'Accepted'] | ['s543998212', 's531999171'] | [9148.0, 9188.0] | [29.0, 33.0] | [58, 63] |
p02786 | u125799132 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['H = int(input())\n\nans = 1\nfor i in range(1, 40):\n if int(H/2) >= 1:\n ans += 2**i\n H = int(H/2)\n else:\n ans += 2**(i-1)\n break\n\nprint(ans)', 'H = int(input())\n\nans = 1\nfor i in range(1, 40):\n if int(H/2) >= 1:\n ans += 2**i\n H = int(H/2)\n# print(i, H)\n else:\n ans += 2**(i-1)\n break\n\nprint(ans)', "H = int(input())\n\nans = 1\nif H != 1:\n h = H\n for i in range(1, 40):\n if int(h/2) >= 2:\n# print(i, ans, h, 'a')\n ans += 2**i\n h = int(h/2)\n else:\n# print(i, ans, h, 'b')\n ans += 2**i\n break\n\nprint(ans)"] | ['Wrong Answer', 'Wrong Answer', 'Accepted'] | ['s297668543', 's955073335', 's063437764'] | [9084.0, 8980.0, 9084.0] | [27.0, 33.0, 27.0] | [171, 192, 286] |
p02786 | u127228093 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['import math\n\nmonster_hp_list = []\nmonster_hp_list.append(int(input()))\n\ncount = 0\n\nwhile(len(monster_hp_list)>0):\n \n if monster_hp_list[0] == 1:\n monster_hp_list.pop(0)\n count += 1\n elif monster_hp_list[0] > 1:\n harved_hp = math.floor(monster_hp_list[0]/2)\n monster_hp_list.pop(0)\n for twice in range(2):\n monster_hp_list.append(harved_hp)\n \n count += 1', 'import math\n\nmonster_hp = int(input())\nattack_count = 0\n\ndef attack_count_calc(monster_hp):\n if monster_hp == 1: \n return attack_count + 1\n return attack_count + (2 * attack_count_calc(monster_hp//2) + 1)\n\nprint(attack_count_calc(monster_hp))\n'] | ['Wrong Answer', 'Accepted'] | ['s299577183', 's957596742'] | [5828.0, 2940.0] | [2108.0, 17.0] | [426, 271] |
p02786 | u128661070 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['# -*- coding:utf-8 -*-\n\nh = int(input())\ncount = 1\nwhile(h > 1):\n h = (h //2)\n count += 1\nprint(2**count)', '# -*- coding:utf-8 -*-\n\nh = int(input())\ncount = 1\nwhile(h > 1):\n h = (h //2)\n count += 1\nprint(2**count -1)'] | ['Wrong Answer', 'Accepted'] | ['s668204740', 's741069754'] | [2940.0, 2940.0] | [17.0, 17.0] | [107, 110] |
p02786 | u130587994 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['h = int(input())\n\ndef count(h):\n if(h<=0):\n return 0\n else:\n return 1 + 2*count(h/2)\n\nprint(count(h))', 'h = int(input())\n\ndef count1(h):\n if(h==0):\n return 0\n if(h==1):\n return 1\n return 1 + 2*count1(h//2)\n \nprint(count1(h))'] | ['Runtime Error', 'Accepted'] | ['s943821245', 's066815518'] | [3940.0, 2940.0] | [74.0, 17.0] | [121, 146] |
p02786 | u131638468 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['h=int(input())\ndef f(n):\n if n==1:\n return 1\n else:\n return 2 * f(n) + 1\nhit=f(h)\nprint(hit)', 'h=int(input())\ndef f(n):\n if n==1:\n return 1\n else:\n return 2 * f(n//2) + 1\nhit=f(h)\nprint(hit)'] | ['Runtime Error', 'Accepted'] | ['s379416811', 's974420740'] | [3864.0, 2940.0] | [72.0, 17.0] | [100, 103] |
p02786 | u139282395 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['n = input()\nn = int(n)\ncount = 0\nattack = 0\n\nif n > 1:\n while n > 1:\n n = n / 2 \n count = count + 1\n for i in range(0, count):\n attack = attack + (2**i)\n print(attack)\nelse:\n print("1")\n ', 'n = input()\nn = int(n)\ncount = 0\nattack = 0\n\nif n > 1:\n while n >= 1:\n n = n / 2 \n count = count + 1\n for i in range(0, count):\n attack = attack + (2**i)\n print(attack)\nelse:\n print("1")'] | ['Wrong Answer', 'Accepted'] | ['s721478829', 's183400271'] | [2940.0, 3060.0] | [17.0, 17.0] | [201, 199] |
p02786 | u151079949 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['H=int(input())\nimport math\nj=(math.log2(H))//1\n\nprint(2**(j+1)-1)', 'H=int(input())\nimport math\nj=(math.log2(H))//1\n\nprint(int(2**(j+1)-1))'] | ['Wrong Answer', 'Accepted'] | ['s896420297', 's446449318'] | [3060.0, 3188.0] | [18.0, 19.0] | [65, 70] |
p02786 | u152402277 | 2,000 | 1,048,576 | Caracal is fighting with a monster. The _health_ of the monster is H. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens: * If the monster's health is 1, it drops to 0. * If the monster's health, X, is greater than 1, that monster disappears. Then, two new monsters appear, each with the health of \lfloor X/2 \rfloor. (\lfloor r \rfloor denotes the greatest integer not exceeding r.) Caracal wins when the healths of all existing monsters become 0 or below. Find the minimum number of attacks Caracal needs to make before winning. | ['HP = int(input())\nif HP == 1:\n print("1")\n\nelse:\n #print(bin(HP))\n print(pow(2,len(bin(HP))-3))', 'HP = int(input())\nif HP == 1:\n print("1")\n\nelse:\n #print(bin(HP))\n print(pow(2,len(bin(HP))-2)-1)'] | ['Wrong Answer', 'Accepted'] | ['s045856188', 's851150024'] | [3060.0, 2940.0] | [17.0, 17.0] | [98, 100] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.