Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
    n = int(input())
    s = [1 if si == 'o' else 0 for si in list(input())]
    t0 = [[1, 1], [1, 0], [0, 1], [0, 0]]
    for ti in t0:
        flag = True
        for i in range(1, n - 1):
            if ti[i] * (1 - s[i]) or (1 - ti[i]) * s[i]:
                ti.append(1 - ti[i - 1])
            else:
                ti.append(ti[i - 1])
        for i in range(2):
            if ti[i - 1]:
                if (s[i - 1] and not ti[i - 2] == ti[i]) or (1 - s[i - 1] and ti[i - 2] == ti[i]):
                    flag = False
            else:
                if (s[i - 1] and ti[i - 2] == ti[i]) or (1 - s[i - 1] and not ti[i - 2] == ti[i]):
                    flag = False
        if flag:
            ans = ['S' if x else 'W' for x in ti]
            print(''.join(ans))
            exit()
    print(-1)

Fixed submission:
n = int(input())
s = [1 if si == 'o' else 0 for si in list(input())]
t0 = [[1, 1], [1, 0], [0, 1], [0, 0]]
for ti in t0:
    flag = True
    for i in range(1, n - 1):
        if ti[i] * (1 - s[i]) or (1 - ti[i]) * s[i]:
            ti.append(1 - ti[i - 1])
        else:
            ti.append(ti[i - 1])
    for i in range(2):
        if ti[i - 1]:
            if (s[i - 1] and not ti[i - 2] == ti[i]) or (1 - s[i - 1] and ti[i - 2] == ti[i]):
                flag = False
        else:
            if (s[i - 1] and ti[i - 2] == ti[i]) or (1 - s[i - 1] and not ti[i - 2] == ti[i]):
                flag = False
    if flag:
        ans = ['S' if x else 'W' for x in ti]
        print(''.join(ans))
        exit()
print(-1)

Buggy python submission (verdict: Runtime Error):
s = [1 if si == 'o' else 0 for si in list(input())]
t0 = [[1, 1], [1, 0], [0, 1], [0, 0]]
for ti in t0:
    flag = True
    for i in range(1, n - 1):
        if ti[i] * (1 - s[i]) or (1 - ti[i]) * s[i]:
            ti.append(1 - ti[i - 1])
        else:
            ti.append(ti[i - 1])
    for i in range(2):
        if ti[i - 1]:
            if (s[i - 1] and not ti[i - 2] == ti[i]) or (1 - s[i - 1] and ti[i - 2] == ti[i]):
                flag = False
        else:
            if (s[i - 1] and ti[i - 2] == ti[i]) or (1 - s[i - 1] and not ti[i - 2] == ti[i]):
                flag = False
    if flag:
        ans = ['S' if x else 'W' for x in ti]
        print(''.join(ans))
        exit()
print(-1)

Fixed submission:
n = int(input())
s = [1 if si == 'o' else 0 for si in list(input())]
t0 = [[1, 1], [1, 0], [0, 1], [0, 0]]
for ti in t0:
    flag = True
    for i in range(1, n - 1):
        if ti[i] * (1 - s[i]) or (1 - ti[i]) * s[i]:
            ti.append(1 - ti[i - 1])
        else:
            ti.append(ti[i - 1])
    for i in range(2):
        if ti[i - 1]:
            if (s[i - 1] and not ti[i - 2] == ti[i]) or (1 - s[i - 1] and ti[i - 2] == ti[i]):
                flag = False
        else:
            if (s[i - 1] and ti[i - 2] == ti[i]) or (1 - s[i - 1] and not ti[i - 2] == ti[i]):
                flag = False
    if flag:
        ans = ['S' if x else 'W' for x in ti]
        print(''.join(ans))
        exit()
print(-1)
Buggy python submission (verdict: Runtime Error):
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys

mod = 10**9+7
# sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

S = str(input())

def check(T,S):
    if T == S:
        return 1
    adds = ["dream","dreamer","erase","eraser"]
    for i,add in enumerate(adds):
        if S[len(T):len(T)+len(add)] == add:
            if check(T+add,S) == 1:
                return 1

if check("",S):
    print("YES")
else:
    print("NO")


Fixed submission:
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

S = str(input())
S = list(S)
S.reverse()
S = "".join(S)

def check(T):
    if len(S) == 0:
        return 1
    adds = ["maerd","remaerd","esare","resare"]
    q = copy.deepcopy(adds)
    while len(q) > 0:
        t = q.pop()
        if t == S:
            return 1
        for add in adds:
            if S[len(t):len(t+add)] == add:
                q.append(t+add)
    return 0

if check(""):
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

N,T = map(int,input().split())
A = [int(i) for i in input().split()]

L_min = [mod for i in range(N)]
L_min[0] = A[0]
for i in range(1,N):
    L_min[i] = min(L_min[i-1],A[i])

A.reverse()
R_max = [0 for i in range(N)]
R_max[0] = A[0]
for i in range(1,N):
    R_max[i] = max(R_max[i-1],A[i])

R_max.reverse()

ans = 0
dif = 0
# print(R_max)
# print(L_min)
for i in range(1,N):
    if dif < R_max[i] - L_min[i]:
        dif = R_max[i] - L_min[i]
        r,l = R_max[i],L_min[i]
        # print(dif)
        ans = 1
    elif dif == R_max[i] - L_min[i]:
        if r == R_max[i]:
            pass
        else:
            r,l = R_max[i],L_min[i]
            ans += 1

print(ans)


Fixed submission:
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

N,T = map(int,input().split())
A = [int(i) for i in input().split()]

L_min = [mod for i in range(N)]
L_min[0] = A[0]
for i in range(1,N):
    L_min[i] = min(L_min[i-1],A[i])

A.reverse()
R_max = [0 for i in range(N)]
R_max[0] = A[0]
for i in range(1,N):
    R_max[i] = max(R_max[i-1],A[i])

R_max.reverse()

ans = 0
dif = -mod

for i in range(1,N):
    if dif < R_max[i] - L_min[i] and 0 < R_max[i] - L_min[i]:
        dif = R_max[i] - L_min[i]
        r,l = R_max[i],L_min[i]
        # print(dif)
        ans = 1
    elif dif == R_max[i] - L_min[i]:
        if r == R_max[i]:
            pass
        else:
            r,l = R_max[i],L_min[i]
            ans += 1

print(ans)
Buggy python submission (verdict: Runtime Error):
D,T,S = map(int, input().split())

if T-D/S>= 0:
    print("Yes")
  else:
    print("No")

Fixed submission:
D,T,S = map(int, input().split())

if T-D/S >= 0:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
D,T,S = map(int, input().split())


if T-D/S>= 0:
    print("Yes")
  else:
    print("No")
    


Fixed submission:
D,T,S = map(int, input().split())

if T-D/S >= 0:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
x,y,z = int(input().split())
D=x
T=y
S=z

if T-D/S>= 0:
    print("Yes")
  else:
    print("No")

Fixed submission:
D,T,S = map(int, input().split())

if T-D/S >= 0:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
x,y,z = int(input().split())
int D=int x
int T=int y
int S=int z

if T-D/S>= 0:
    print("Yes")
  else:
    print("No")

Fixed submission:
D,T,S = map(int, input().split())

if T-D/S >= 0:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
input().split()

x,y,z = input().split()
D=int x
T=int y
S=int z

if T-D/S>= 0:
    print("Yes")
  else:
    print("No")

Fixed submission:
D,T,S = map(int, input().split())

if T-D/S >= 0:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
x,y,z = map(int, input().split())
D=int x
T=int y
S=int z

if T-D/S>= 0:
    print("Yes")
  else:
    print("No")

Fixed submission:
D,T,S = map(int, input().split())

if T-D/S >= 0:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
x,y,z = input()

D=int x
T=int y
S=int z

if T-D/S>= 0
    print("Yes")
  else:
    print("No")

Fixed submission:
D,T,S = map(int, input().split())

if T-D/S >= 0:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
x,y,z = input()

D=int x
T=int y
S=int z

if T-D/S>= 0
    print("Yes")
  else print("No")

Fixed submission:
D,T,S = map(int, input().split())

if T-D/S >= 0:
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
D, T, S = input() 


if T-D/S >= 0
	print("Yes")
  
  else print("No")
  
  

Fixed submission:
D,T,S = map(int, input().split())

if T-D/S >= 0:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
S=str(input())

if S.count('R')==0:
  print(0)
if S.count('R')==1:
  print(1)
if S.count('R')==2 and not moji.count('RR') ==1:
  print(1)
if S.count('RR')==1:
  print(2)
if S.count('RRR')==1:
  print(3)
  

Fixed submission:
S=str(input())
 
if S.count('R')==0:
  print(0)
if S.count('R')==1 :
  print(1)
if S.count('R')==2 and not S.count('RR') ==1:
  print(1)
if S.count('RR')==1 and not S.count('RRR')==1:
  print(2)
if S.count('RRR')==1:
  print(3)

Buggy python submission (verdict: Runtime Error):
S=input()

if S.count('R')==0
  print(0)
if S.count('R')==1
  print(1)
if S.count('R')==2 and not moji.count('RR') ==1
  print(1)
if S.count('RR')==1
  print(2)
if S.count('RRR')==1
  print(3)
  

Fixed submission:
S=str(input())
 
if S.count('R')==0:
  print(0)
if S.count('R')==1 :
  print(1)
if S.count('R')==2 and not S.count('RR') ==1:
  print(1)
if S.count('RR')==1 and not S.count('RRR')==1:
  print(2)
if S.count('RRR')==1:
  print(3)

Buggy python submission (verdict: Runtime Error):
S=str(input())

if S.count('R')==0
  print(0)
if S.count('R')==1
  print(1)
if S.count('R')==2 and not moji.count('RR') ==1
  print(1)
if S.count('RR')==1
  print(2)
if S.count('RRR')==1
  print(3)
  

Fixed submission:
S=str(input())
 
if S.count('R')==0:
  print(0)
if S.count('R')==1 :
  print(1)
if S.count('R')==2 and not S.count('RR') ==1:
  print(1)
if S.count('RR')==1 and not S.count('RRR')==1:
  print(2)
if S.count('RRR')==1:
  print(3)

Buggy python submission (verdict: Runtime Error):
S=str(input())

if S.count('R')==0
  print(0)
if S.count('R')==1
  print(1)
if S.count('R')==2 and moji.count('RR')!=1
  print(1)
if S.count('RR')==1
  print(2)
if S.count('RRR')==1
  print(3)
  

Fixed submission:
S=str(input())
 
if S.count('R')==0:
  print(0)
if S.count('R')==1 :
  print(1)
if S.count('R')==2 and not S.count('RR') ==1:
  print(1)
if S.count('RR')==1 and not S.count('RRR')==1:
  print(2)
if S.count('RRR')==1:
  print(3)

Buggy python submission (verdict: Runtime Error):
S=input()

if S.count('R')==0
  print(0)
if S.count('R')==1
  print(1)
if S.count('R')==2 and moji.count('RR')!=1
  print(1)
if S.count('RR')==1
  print(2)
if S.count('RRR')==1
  print(3)
  

Fixed submission:
S=str(input())
 
if S.count('R')==0:
  print(0)
if S.count('R')==1 :
  print(1)
if S.count('R')==2 and not S.count('RR') ==1:
  print(1)
if S.count('RR')==1 and not S.count('RRR')==1:
  print(2)
if S.count('RRR')==1:
  print(3)

Buggy python submission (verdict: Runtime Error):
moji=input()

if moji.count('R')==0
  print(0)
if moji.count('R')==1
  print(1)
if moji.count('R')==2 and moji.count('RR')!=1
  print(1)
if moji.count('RR')==1
  print(2)
if moji.count('RRR')==1
  print(3)
  

Fixed submission:
S=str(input())
 
if S.count('R')==0:
  print(0)
if S.count('R')==1 :
  print(1)
if S.count('R')==2 and not S.count('RR') ==1:
  print(1)
if S.count('RR')==1 and not S.count('RRR')==1:
  print(2)
if S.count('RRR')==1:
  print(3)
Buggy python submission (verdict: Runtime Error):
x=input()

if x>=30:
  print('Yes')
else:
  print('No')

Fixed submission:
x=int(input())

if x>=30:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
X=input()

if x>=30:
  print('Yes')
else:
  print('No')

Fixed submission:
x=int(input())

if x>=30:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
n=int(input())

if n%1000==0:
  print(0)
  
else
  print(1000-n%1000)

Fixed submission:
n=int(input())

if n%1000==0:
  print(0)
  
else:
  print(1000-n%1000)
Buggy python submission (verdict: Runtime Error):
a,s,d=input()
 
print(a,s,d)

Fixed submission:
x= input()
print(x[:3])
Buggy python submission (verdict: Runtime Error):
a,v,b,w,t=int(input().split())
 
print('NO')

Fixed submission:
a,v=map(int, input().split())
b,w=map(int, input().split())
t=int(input())
 
if a<b:
  if b+w*t<=a+v*t:
    print('YES')
  else:
    print('NO')
if a>b:
  if a-v*t<=b-w*t:
    print('YES')
  else:
    print('NO')

Buggy python submission (verdict: Runtime Error):
a,v,b,w,t=int(input().split())
 
if a<b and (b+w*t)<=(a+v*t):
    print('YES')
if a>b and (a-v*t)<=(b-w*t):
    print('YES')
else:
    print('NO')

Fixed submission:
a,v=map(int, input().split())
b,w=map(int, input().split())
t=int(input())
 
if a<b:
  if b+w*t<=a+v*t:
    print('YES')
  else:
    print('NO')
if a>b:
  if a-v*t<=b-w*t:
    print('YES')
  else:
    print('NO')

Buggy python submission (verdict: Runtime Error):
a,v,b,w,t=int(input().split())
 
if a<b and b+w*t<=a+v*t:
    print('YES')

if a>b and a-v*t<=b-w*t:
    print('YES')
else:
    print('NO')

Fixed submission:
a,v=map(int, input().split())
b,w=map(int, input().split())
t=int(input())
 
if a<b:
  if b+w*t<=a+v*t:
    print('YES')
  else:
    print('NO')
if a>b:
  if a-v*t<=b-w*t:
    print('YES')
  else:
    print('NO')

Buggy python submission (verdict: Runtime Error):
a,v,b,w,t=int(input().split())
 
if a<b:
  if b+w*t<=a+v*t:
    print('YES')
  else:
    print('NO')
if a>b:
  if a-v*t<=b-w*t:
    print('YES')
  else:
    print('NO')

Fixed submission:
a,v=map(int, input().split())
b,w=map(int, input().split())
t=int(input())
 
if a<b:
  if b+w*t<=a+v*t:
    print('YES')
  else:
    print('NO')
if a>b:
  if a-v*t<=b-w*t:
    print('YES')
  else:
    print('NO')

Buggy python submission (verdict: Runtime Error):
a=int(input())
v=int(input())
b=int(input())
w=int(input())
t=int(input())

if a<b:
  if b+wt<=a+vt:
    print('YES')
  else:
    print('NO')
if a>b:
  if a-vt<=b-wt:
    print('YES')
  else:
    print('NO')

Fixed submission:
a,v=map(int, input().split())
b,w=map(int, input().split())
t=int(input())
 
if a<b:
  if b+w*t<=a+v*t:
    print('YES')
  else:
    print('NO')
if a>b:
  if a-v*t<=b-w*t:
    print('YES')
  else:
    print('NO')

Buggy python submission (verdict: Runtime Error):
a,v,b,w,t=int(input().split())
 
if a<b:
  if b+wt<=a+vt:
    print('YES')
  else:
    print('NO')
if a>b:
  if a-vt<=b-wt:
    print('YES')
  else:
    print('NO')

Fixed submission:
a,v=map(int, input().split())
b,w=map(int, input().split())
t=int(input())
 
if a<b:
  if b+w*t<=a+v*t:
    print('YES')
  else:
    print('NO')
if a>b:
  if a-v*t<=b-w*t:
    print('YES')
  else:
    print('NO')

Buggy python submission (verdict: Runtime Error):
a,b,v,w,t=int(input().split())

if a<b:
  if b+wt<=a+vt:
    print('YES')
  else:
    print('NO')

if a>b:
  if a-vt<=b-wt:
    print('YES')
  else:
    print('NO')

Fixed submission:
a,v=map(int, input().split())
b,w=map(int, input().split())
t=int(input())
 
if a<b:
  if b+w*t<=a+v*t:
    print('YES')
  else:
    print('NO')
if a>b:
  if a-v*t<=b-w*t:
    print('YES')
  else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
r=input()
print(2*3.14*r)

Fixed submission:
r=int(input())
print(2*3.14*r)
Buggy python submission (verdict: Runtime Error):
n,m= map(int, input().split())

print(((n+(n-1))+m(m-1))/2)


Fixed submission:
n,m= map(int, input().split())
 
print(int(((n*(n-1))+m*(m-1))/2))
Buggy python submission (verdict: Runtime Error):
n=input()
if n%2==0:
  print(n/2)
if not n%2==0:
  print(n/2+1)

Fixed submission:
n=int(input())
if n%2==0:
  print(int(n/2))
if not n%2==0:
  print(int(n/2+1))
Buggy python submission (verdict: Runtime Error):
s=int(input())

print(n**3)


Fixed submission:
n=int(input())

print(n**3)

Buggy python submission (verdict: Runtime Error):
s=input()

print(n**3)


Fixed submission:
n=int(input())

print(n**3)
Buggy python submission (verdict: Time Limit Exceeded):
import math

a,b=map(int, input().split())
i=0
for k in range(10**9):
  if abs(a-k)==abs(b-k):
    print(k)
    i=1
    break
if i==0:
    print('IMPOSSIBLE')

Fixed submission:
a,b=map(int, input().split())
print((a+b)//2 if (a+b)%2==0 else 'IMPOSSIBLE')
Buggy python submission (verdict: Runtime Error):
a,b,c=int(input())

if a==b and b==c and c==a:
  print('Yes')
else:
  print('No')

Fixed submission:
a,b,c=map(int, input().split())

if a==b and b==c:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
a,b,c=int(input())

if a==b and b==c:
  print('Yes')
else:
  print('No')

Fixed submission:
a,b,c=map(int, input().split())

if a==b and b==c:
  print('Yes')
else:
  print('No')

Buggy python submission (verdict: Runtime Error):
a,b,c=input()

if a==b and b==c:
  print('Yes')
else:
  print('No')

Fixed submission:
a,b,c=map(int, input().split())

if a==b and b==c:
  print('Yes')
else:
  print('No')
Buggy python submission (verdict: Runtime Error):
int pxcount,pycount,pzcount=0

n=int(input())
a,b=map(int, input().split())
p=list(map(int, input().split()))

for i in p:
  if i<=a:
    pxcount=pxcount+1
for i in p:
  if a+1<=i and i<=b:
    pycount=pycount+1
for i in p:
  if b+1<=i:
    pzcount=pzcount+1
  
print(min(pxcount,pycount,pzcount))

Fixed submission:
pxcount=0
pycount=0
pzcount=0

n=int(input())
a,b=map(int, input().split())
p=list(map(int, input().split()))

for i in p:
  if i<=a:
    pxcount=pxcount+1
for i in p:
  if a+1<=i and i<=b:
    pycount=pycount+1
for i in p:
  if b+1<=i:
    pzcount=pzcount+1
  
print(min(pxcount,pycount,pzcount))
Buggy python submission (verdict: Runtime Error):
s=input()

if len(s)==2:
  print(s)
if len(s)==3:
  s.reverse()
  print(s)


Fixed submission:
s=input()

if len(s)==2:
  print(s)
if len(s)==3:
  ss = s[::-1]
  print(ss)
Buggy python submission (verdict: Runtime Error):
a,s,d=map(int, input().split())
print('Yes' if a+b>=c else 'No')

Fixed submission:
a,s,d=map(int, input().split())
print('Yes' if a+s>=d else 'No')
Buggy python submission (verdict: Runtime Error):
s=input()

print(s[::(s.len()-8)])

Fixed submission:
s=input()

print(s[:(len(s)-8)])
Buggy python submission (verdict: Runtime Error):
a,s,d,f,g,h= map(int, input().split())

print(a+s+d+f+g+h)

Fixed submission:
s=input()


 
print(s.count('1'))
Buggy python submission (verdict: Runtime Error):
import math
 
h = float(input())
enemies = [h]

count = 0
while len(enemies) > 0:
  temp = []
  for enemy in enemies:
    count+=1
    if enemy > 1:
      temp.append(round(enemy / 2))
      temp.append(round(enemy / 2))
  enemies = temp

print(count)

Fixed submission:
import math

val = input().split(' ')
h = float(val[0])
a = float(val[1])

print(math.ceil(h/a))

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

h = float(input())
a = float(input())

print(math.ceil(h/a))

Fixed submission:
import math

val = input().split(' ')
h = float(val[0])
a = float(val[1])

print(math.ceil(h/a))

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

h = float(input())
a = float(input())
 
print(math.ceil(h/a))

Fixed submission:
import math

val = input().split(' ')
h = float(val[0])
a = float(val[1])

print(math.ceil(h/a))

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

h = int(input())
a = int(input())
 
print(math.ceil(h/a))

Fixed submission:
import math

val = input().split(' ')
h = float(val[0])
a = float(val[1])

print(math.ceil(h/a))

Buggy python submission (verdict: Runtime Error):
h = int(input())
a = int(input())

return math.ceil(h/a)


Fixed submission:
import math

val = input().split(' ')
h = float(val[0])
a = float(val[1])

print(math.ceil(h/a))
Buggy python submission (verdict: Runtime Error):
temp = input()
temp = temp.split(' ')
h = int(temp[0])
n = int(temp[1])
a = input().split(' ')

if h <= sum(int(i) for i in a):
	print('Yes')
else
	print('No')

Fixed submission:
temp = input()
temp = temp.split(' ')
h = int(temp[0])
n = int(temp[1])
a = input().split(' ')

if h <= sum(int(i) for i in a):
	print('Yes')
else:
	print('No')
Buggy python submission (verdict: Runtime Error):
temp = input().split(' ')
monter_count = int(temp[0])
kill_count = int(temp[1])

temp = input().split(' ')
# 数値の配列に変換
temp = [int(s) for s in temp]
# 体力の多い順にソート
temp.sort(reverse=True)
del(temp[0:monter_count])
print(temp.sum())

Fixed submission:
import math

temp = input().split(' ')
monter_count = int(temp[0])
kill_count = int(temp[1])
 
temp = input().split(' ')
# 数値の配列に変換
temp = [int(s) for s in temp]
# 体力の多い順にソート
temp.sort(reverse=True)
del(temp[0:kill_count])

print(sum(temp))
Buggy python submission (verdict: Time Limit Exceeded):
import math
 
h = float(input())
enemies = [h]
 
count = 0
while len(enemies) > 0:
  temp = []
  for enemy in enemies:
    count+=1
    if enemy > 1:
      temp.append(math.floor(enemy / 2))
      temp.append(math.floor(enemy / 2))
  enemies = temp

print(count)

Fixed submission:
import math

h = int(input())

count = 0
while h > 1:
  h = math.floor(h/2)
  count += 1

print(2**count*2-1)

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

h = float(input())

count = 1
while(h > 1) {
  h = round(h / 2)
  count+=1
}
print(count)


Fixed submission:
import math

h = int(input())

count = 0
while h > 1:
  h = math.floor(h/2)
  count += 1

print(2**count*2-1)
Buggy python submission (verdict: Runtime Error):
import math
num = int(input().replace(" ",""))
// 平方根にしたものを二倍して一致するかどうかで確認が可能
print("Yes" if num == round(math.sqrt(num)) ** 2 else "No")

Fixed submission:
import math
num = int(input().replace(" ",""))
# nの平方根を二乗して一致するなら平方根
print("Yes" if num == round(math.sqrt(num)) ** 2 else "No")
Buggy python submission (verdict: Time Limit Exceeded):
temp = input().split()
n,total = int(temp[0]), int(temp[1])
find = False
for a in range(n+1):
    for b in range(n+1):
        for c in range(n+1):
            if a+b+c == n and a*10000 + b*5000 + c*1000 == total:
                print('{} {} {}'.format(a,b,c))
                find = True
                break
        else:
            continue
        break
    else:
        continue
    break

if not find:
    print('{} {} {}'.format(-1,-1,-1))

Fixed submission:
temp = input().split()
n,total = int(temp[0]), int(temp[1])

find = False
for a in range(n+1):
    for b in range(n+1):
        c = (-a) + (-b) + n
        if c >= 0 and a*10000 + b*5000 + c*1000 == total:
            print('{} {} {}'.format(a,b,c))
            find = True
            break
    else:
        continue
    break

if not find:
    print('{} {} {}'.format(-1,-1,-1))

Buggy python submission (verdict: Runtime Error):
temp = input().split()
n,total = int(temp[0]), int(temp[1])

for a in range(n):
    for b in range(n):
        for c in range(n):
            if a*10000 + b*5000 + c*1000 == total:
                print(f"{a} {b} {c}")
                break
        else:
            continue
        break
    else:
        continue
    break

Fixed submission:
temp = input().split()
n,total = int(temp[0]), int(temp[1])

find = False
for a in range(n+1):
    for b in range(n+1):
        c = (-a) + (-b) + n
        if c >= 0 and a*10000 + b*5000 + c*1000 == total:
            print('{} {} {}'.format(a,b,c))
            find = True
            break
    else:
        continue
    break

if not find:
    print('{} {} {}'.format(-1,-1,-1))
Buggy python submission (verdict: Runtime Error):
temp = input().split()
n = int(temp[0])
a = int(temp[1])
b = int(temp[2])

def findDigit(int num,int digit):
    while digit > 0 or num <= 0:
      num %= 10
      num /= 10
      digit -= 1
	return num
  
print(findDigit(198,1))

Fixed submission:
import math

temp = input().split()
n = int(temp[0])
a = int(temp[1])
b = int(temp[2])

def digitsSum(num):
    sum = 0
    while num > 0:
        sum += num % 10
        num = math.floor(num/10)
    return sum

answer = 0
for i in range(1,n+1):
    s = digitsSum(i)
    if a <= s <= b:
        answer += i

print(answer)
Buggy python submission (verdict: Runtime Error):
board =  input().split()

counter = 0

if board[0] == "1":
  counter++
if board[1] == "1":
  counter++
if board[2] == "1":
  counter++
  
print(counter)

Fixed submission:
board =  input()
 
counter = 0
 
if board[0] == "1":
  counter+=1
if board[1] == "1":
  counter+=1
if board[2] == "1":
  counter+=1
  
print(counter)