Buggy python submission (verdict: Runtime Error):
import math
 
s=list(map(int,input().split()))
t=list(map(int,input().split()))
a=0
b=0
c=0
d=s[1]
t.sort(reverse=True)
if s[0]==1:
  for i in range(s[1]):
    t[0]=math.floor(t[0]/2)
else:
  c=t[0]/2
  for j in range(s[1]):
    print(t)
    for l in range(s[0]):
      if d>0:
        if c<t[l]:
          t[l]=math.floor(t[l]/2)
          d=d-1
        else:
            t.sort(reverse=True)
            c=t[0]/2
            break
      else:
        break
e=sum(t)
print(e)

Fixed submission:
import math
 
s=list(map(int,input().split()))
t=list(map(int,input().split()))
a=0
b=0
c=0
d=s[1]
t.sort(reverse=True)
if s[0]==1:
  for i in range(s[1]):
    t[0]=math.floor(t[0]/2)
else:
  c=t[0]/2
  for j in range(s[1]):
    for l in range(s[0]):
      if d>0:
        if c<t[l]:
          t[l]=math.floor(t[l]/2)
          d=d-1
        else:
            t.sort(reverse=True)
            c=t[0]/2
            break
      else:
        break
e=sum(t)
print(e)

Buggy python submission (verdict: Time Limit Exceeded):
import math
 
s=list(map(int,input().split()))
t=list(map(int,input().split()))
a=0
t.sort(reverse=True)
if s[0]>=2:
  for i in range(s[1]):
    t[0]=math.floor(t[0]/2)
    if t[0]<t[1]:
      t.sort(reverse=True)
else:
  for j in range(s[1]):
    t[0]=math.floor(t[0]/2)
a=sum(t)
print(a)

Fixed submission:
import math
 
s=list(map(int,input().split()))
t=list(map(int,input().split()))
a=0
b=0
c=0
d=s[1]
t.sort(reverse=True)
if s[0]==1:
  for i in range(s[1]):
    t[0]=math.floor(t[0]/2)
else:
  c=t[0]/2
  for j in range(s[1]):
    for l in range(s[0]):
      if d>0:
        if c<t[l]:
          t[l]=math.floor(t[l]/2)
          d=d-1
        else:
            t.sort(reverse=True)
            c=t[0]/2
            break
      else:
        break
e=sum(t)
print(e)

Buggy python submission (verdict: Time Limit Exceeded):
import math
 
s=list(map(int,input().split()))
t=list(map(int,input().split()))
a=0
b=1
t.sort(reverse=True)
if s[0]>=2:
  for i in range(s[1]):
    t[0]=math.floor(t[0]/2)
    if t[0]<t[1]:
      t.sort(reverse=True)
else:
  for j in range(s[1]):
    b=b*2
  t[0]=math.floor(t[0]/b)

a=sum(t)
print(a)

Fixed submission:
import math
 
s=list(map(int,input().split()))
t=list(map(int,input().split()))
a=0
b=0
c=0
d=s[1]
t.sort(reverse=True)
if s[0]==1:
  for i in range(s[1]):
    t[0]=math.floor(t[0]/2)
else:
  c=t[0]/2
  for j in range(s[1]):
    for l in range(s[0]):
      if d>0:
        if c<t[l]:
          t[l]=math.floor(t[l]/2)
          d=d-1
        else:
            t.sort(reverse=True)
            c=t[0]/2
            break
      else:
        break
e=sum(t)
print(e)

Buggy python submission (verdict: Time Limit Exceeded):
import math
 
s=list(map(int,input().split()))
t=list(map(int,input().split()))
a=0
t.sort(reverse=True)
for i in range(s[1]):
  t[0]=math.floor(t[0]/2)
  if s[0]>=2:
    if t[0]<t[1]:
      t.sort(reverse=True)
  else:
    continue
a=sum(t)
print(a)

Fixed submission:
import math
 
s=list(map(int,input().split()))
t=list(map(int,input().split()))
a=0
b=0
c=0
d=s[1]
t.sort(reverse=True)
if s[0]==1:
  for i in range(s[1]):
    t[0]=math.floor(t[0]/2)
else:
  c=t[0]/2
  for j in range(s[1]):
    for l in range(s[0]):
      if d>0:
        if c<t[l]:
          t[l]=math.floor(t[l]/2)
          d=d-1
        else:
            t.sort(reverse=True)
            c=t[0]/2
            break
      else:
        break
e=sum(t)
print(e)

Buggy python submission (verdict: Runtime Error):
import math
 
s=list(map(int,input().split()))
t=list(map(int,input().split()))
a=0
t.sort(reverse=True)
for i in range(s[1]):
  t[0]=math.floor(t[0]/2)
  if s[1]>=2:
    if t[0]<t[1]:
      t.sort(reverse=True)
  else:
    continue
a=sum(t)
print(a)

Fixed submission:
import math
 
s=list(map(int,input().split()))
t=list(map(int,input().split()))
a=0
b=0
c=0
d=s[1]
t.sort(reverse=True)
if s[0]==1:
  for i in range(s[1]):
    t[0]=math.floor(t[0]/2)
else:
  c=t[0]/2
  for j in range(s[1]):
    for l in range(s[0]):
      if d>0:
        if c<t[l]:
          t[l]=math.floor(t[l]/2)
          d=d-1
        else:
            t.sort(reverse=True)
            c=t[0]/2
            break
      else:
        break
e=sum(t)
print(e)

Buggy python submission (verdict: Time Limit Exceeded):
import math

s=list(map(int,input().split()))
t=list(map(int,input().split()))
a=0
b=int(s[1])
t.sort()
for i in range(s[1]):
  for j in range(s[0]):
    if 0<b:
      if max(t)==t[j]:
        t[j]=math.floor(t[j]/2)
        b=b-1
      else:
          continue
    else:
      break
a=sum(t)
print(a)

Fixed submission:
import math
 
s=list(map(int,input().split()))
t=list(map(int,input().split()))
a=0
b=0
c=0
d=s[1]
t.sort(reverse=True)
if s[0]==1:
  for i in range(s[1]):
    t[0]=math.floor(t[0]/2)
else:
  c=t[0]/2
  for j in range(s[1]):
    for l in range(s[0]):
      if d>0:
        if c<t[l]:
          t[l]=math.floor(t[l]/2)
          d=d-1
        else:
            t.sort(reverse=True)
            c=t[0]/2
            break
      else:
        break
e=sum(t)
print(e)

Buggy python submission (verdict: Runtime Error):
import math

s=list(map(int,input().split()))
t=list(map(int,input().split()))
a=0
b=int(s[1])
for i in range(s[1]):
  for j in range(s[0]):
    if max(t)==t[j] and 0<b:
      t[j]=math.floor(t[j]/2)
      b=b-1
    elif: b<=0:
        break
for l in range(s[0]):
  a=a+t[l]
print(a)

Fixed submission:
import math
 
s=list(map(int,input().split()))
t=list(map(int,input().split()))
a=0
b=0
c=0
d=s[1]
t.sort(reverse=True)
if s[0]==1:
  for i in range(s[1]):
    t[0]=math.floor(t[0]/2)
else:
  c=t[0]/2
  for j in range(s[1]):
    for l in range(s[0]):
      if d>0:
        if c<t[l]:
          t[l]=math.floor(t[l]/2)
          d=d-1
        else:
            t.sort(reverse=True)
            c=t[0]/2
            break
      else:
        break
e=sum(t)
print(e)

Buggy python submission (verdict: Time Limit Exceeded):
import math

s=list(map(int,input().split()))
t=list(map(int,input().split()))
a=0
b=int(s[1])
for i in range(s[1]):
  for j in range(s[0]):
    if max(t)==t[j] and 0<b:
      t[j]=math.floor(t[j]/2)
      b=b-1
for l in range(s[0]):
  a=a+t[l]
print(a)

Fixed submission:
import math
 
s=list(map(int,input().split()))
t=list(map(int,input().split()))
a=0
b=0
c=0
d=s[1]
t.sort(reverse=True)
if s[0]==1:
  for i in range(s[1]):
    t[0]=math.floor(t[0]/2)
else:
  c=t[0]/2
  for j in range(s[1]):
    for l in range(s[0]):
      if d>0:
        if c<t[l]:
          t[l]=math.floor(t[l]/2)
          d=d-1
        else:
            t.sort(reverse=True)
            c=t[0]/2
            break
      else:
        break
e=sum(t)
print(e)

Buggy python submission (verdict: Time Limit Exceeded):
import math

s=list(map(int,input().split()))
t=list(map(int,input().split()))
a=0
t.sort(reverse=True)
for i in range(s[1]):
  t[0]=math.floor(t[0]/2)
  t.sort(reverse=True)
for j in range(s[0]):
  a=a+t[j]
print(a)

Fixed submission:
import math
 
s=list(map(int,input().split()))
t=list(map(int,input().split()))
a=0
b=0
c=0
d=s[1]
t.sort(reverse=True)
if s[0]==1:
  for i in range(s[1]):
    t[0]=math.floor(t[0]/2)
else:
  c=t[0]/2
  for j in range(s[1]):
    for l in range(s[0]):
      if d>0:
        if c<t[l]:
          t[l]=math.floor(t[l]/2)
          d=d-1
        else:
            t.sort(reverse=True)
            c=t[0]/2
            break
      else:
        break
e=sum(t)
print(e)