Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = int(input())
b = int(input())


def calc_sum(n):
    dr = 0
    while(True):
        dr += n % 10
        n = n // 10
        if n == 0:
            break
    return dr

count = 0
for i in range(1, n + 1):
    sum = calc_sum(i)
    if (a <= sum) and (b >= sum):
        count += i

print(count) 



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

def calc_sum(n):
    dr = 0
    while(True):
        dr += n % 10
        n = n // 10
        if n == 0:
            break
    return dr

count = 0
for i in range(1, n + 1):
    sum = calc_sum(i)
    if (a <= sum) and (b >= sum):
        count += i

print(count)

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


def calc_sum(n):
    count = 0
    while(True):
        dr = n % 10
        n = n // 10
        if n == 0:
            break
        else:
            count += dr
    return count

count = 0
for i in range(1, n + 1):
    if (a <= calc_sum(i)) and (b >= calc_sum(i)):
        count += 1

print(count) 


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

def calc_sum(n):
    dr = 0
    while(True):
        dr += n % 10
        n = n // 10
        if n == 0:
            break
    return dr

count = 0
for i in range(1, n + 1):
    sum = calc_sum(i)
    if (a <= sum) and (b >= sum):
        count += i

print(count)

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

count = 0
while(True):
    dr = n % 10
    n = n // 10
    if n == 0:
        break
    else:
        count += dr

print(count)

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

def calc_sum(n):
    dr = 0
    while(True):
        dr += n % 10
        n = n // 10
        if n == 0:
            break
    return dr

count = 0
for i in range(1, n + 1):
    sum = calc_sum(i)
    if (a <= sum) and (b >= sum):
        count += i

print(count)
Buggy python submission (verdict: Runtime Error):
N = int(input())
arr =  [int(i) for i in input().split()] 

count = 0
while(True):
    for i in range(N):
        if arr[i] % 2 == 0:
            arr[i] = arr[i] / 2
            if i == 2:
                count += 1
        else:
            break
    else:
        continue
    break
        
        



Fixed submission:

a = input()

count = 0
for i in a:
    if i == '1':
        count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
N = int(input())
arr =  [int(i) for i in input().split()] 

count = 0
while(True):
    for i in range(N):
        if arr[i] % 2 == 0:
            arr[i] = arr[i] / 2
            if i == 2:
                count += 1
        else:
            break
    else:
        continue
    break
        
        

print(count)


Fixed submission:

a = input()

count = 0
for i in a:
    if i == '1':
        count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
N = int(input())
arr =  [int(i) for i in input().split()] 

count = 0
while(True):
    for i in range(N):
        if arr[i] % 2 == 0:
            arr[i] = arr[i] / 2
            if i == 2:
                count += 1
        else:
            exit()
        
        

Fixed submission:

a = input()

count = 0
for i in a:
    if i == '1':
        count += 1
print(count)
Buggy python submission (verdict: Runtime Error):
s = str(input())[::-1]

while(len(s) >= 5):
    print(s)
    if s[:5] == 'maerd':
        s = s.replace('maerd', '')
    elif s[:7] == 'remaerd':
        s = s.replace('remerd', '')
    elif s[:5] == 'esare':
        s = s.replace('esare', '')
    elif s[:6] == 'resare':
        s = s.replace('resare', '')
    else:
        print('NO')
        exit()

if len(s) == 0:
    print('YES')
else:
    print('NO')


Fixed submission:
s = str(input())[::-1]

while(len(s) >= 5):
    if s[:5] == 'maerd':
        s = s.replace('maerd', '', 1)
    elif s[:7] == 'remaerd':
        s = s.replace('remaerd', '', 1)
    elif s[:5] == 'esare':
        s = s.replace('esare', '', 1)
    elif s[:6] == 'resare':
        s = s.replace('resare', '', 1)
    else:
        print('NO')
        exit()

else:
    print('YES')

Buggy python submission (verdict: Runtime Error):
s = str(input())[::-1]
print(s)
while(len(s) >= 5):
    print(s)
    if s[:5] == 'maerd':
        s = s.replace('maerd', '')
    elif s[:7] == 'remaerd':
        s = s.replace('remerd', '')
    elif s[:5] == 'esare':
        s = s.replace('esare', '')
    elif s[:6] == 'resare':
        s = s.replace('resare', '')
    else:
        print('NO')
        exit()

if len(s) == 0:
    print('YES')
else:
    print('NO')

Fixed submission:
s = str(input())[::-1]

while(len(s) >= 5):
    if s[:5] == 'maerd':
        s = s.replace('maerd', '', 1)
    elif s[:7] == 'remaerd':
        s = s.replace('remaerd', '', 1)
    elif s[:5] == 'esare':
        s = s.replace('esare', '', 1)
    elif s[:6] == 'resare':
        s = s.replace('resare', '', 1)
    else:
        print('NO')
        exit()

else:
    print('YES')
Buggy python submission (verdict: Runtime Error):
a = input()
b = input().split()
result = 1
for i in range(int(a)):
    result = result * int(b[i])
if result > 1000000000000000000:
    print(-1)
else:
    print(result)

Fixed submission:
num = input()
item = num.split(  )
result = int(item[1]) *  int(item[0])
print(result)
Buggy python submission (verdict: Time Limit Exceeded):
from operator import add,mul,sub,truediv,floordiv
from functools import reduce

N = input()
A = list(map(int, input().split()))

mul = reduce(lambda x,y:x*y, A)
if mul > 10**18:
    print('-1')
else:
    print(mul)

Fixed submission:
N = int(input())
A = list(map(int, input().split()))
m = A[0]
if 0 in A:
    print('0')
else:
    for i in range(1,N):
        m *= A[i]
        if m > 10**18:
            print('-1')
            break
    else:
        print(m)
Buggy python submission (verdict: Runtime Error):
,B = list(map(float, input().split()))
print(int((A*(B*1000))/1000))

Fixed submission:
from decimal import Decimal

A,B = map(Decimal, input().split())

print(int(Decimal(A*B)))

Buggy python submission (verdict: Runtime Error):
A,B = list(map(float, input().split()))
print(int((A*(B*100))/100)))

Fixed submission:
from decimal import Decimal

A,B = map(Decimal, input().split())

print(int(Decimal(A*B)))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))

if 0 in a:
  print(0)
  exit()
ans = 1
for i in a:
  ans = ans*i
if ans > 10**18:
  print(-1)
  exit()
print(ans)

Fixed submission:
n=int(input())
arr=list(map(int,input().split()))
arr=sorted(arr) 
ans=1
for val in arr:
 ans*=val 
 if ans>10**18:
   print(-1)
   break
else:
 print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))

if 0 in a:
  print(0)
  exit()
ans = 1
for i in a:
  ans = ans*i
if ans > 10**18:
  prinr(-1)
  exit()
print(ans)

Fixed submission:
n=int(input())
arr=list(map(int,input().split()))
arr=sorted(arr) 
ans=1
for val in arr:
 ans*=val 
 if ans>10**18:
   print(-1)
   break
else:
 print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))

if 0 in a:
  print(0)
  exit()

ans = 1
for i in a:
  ans *= i

if ans > 10**18:
  print(-1)
else:
  print(ans)

Fixed submission:
n=int(input())
arr=list(map(int,input().split()))
arr=sorted(arr) 
ans=1
for val in arr:
 ans*=val 
 if ans>10**18:
   print(-1)
   break
else:
 print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))

if 0 in a:
  print(0)
  exit()

ans = 1
for i in a:
  ans *= i

if ans > 10**18:
  print(-1)
else:
  print(ans)

Fixed submission:
n=int(input())
arr=list(map(int,input().split()))
arr=sorted(arr) 
ans=1
for val in arr:
 ans*=val 
 if ans>10**18:
   print(-1)
   break
else:
 print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = list(map(int, input().split()))

if 0 in a:
  print(0)
  exit()

ans = 1
for i in a:
  ans *= a

if ans > 10**18:
  print(-1)
else:
  print(ans)

Fixed submission:
n=int(input())
arr=list(map(int,input().split()))
arr=sorted(arr) 
ans=1
for val in arr:
 ans*=val 
 if ans>10**18:
   print(-1)
   break
else:
 print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))

ans = 1
for i in a:
  ans *= i
  
if ans > 10**18:
  print(-1)
else:
  print(ans)

Fixed submission:
n=int(input())
arr=list(map(int,input().split()))
arr=sorted(arr) 
ans=1
for val in arr:
 ans*=val 
 if ans>10**18:
   print(-1)
   break
else:
 print(ans)

Buggy python submission (verdict: Runtime Error):
n = int(input())
a = [map(int, input().split()) for _ in range(n)]

ans = 1
for i in range(n):
  ans = a[i]
  
if ans > 10**18:
  print(-1)
else:
  print(ans)

Fixed submission:
n=int(input())
arr=list(map(int,input().split()))
arr=sorted(arr) 
ans=1
for val in arr:
 ans*=val 
 if ans>10**18:
   print(-1)
   break
else:
 print(ans)
Buggy python submission (verdict: Runtime Error):
from decimal import *
a, b = map(decimal,input().split())
print(int(a*b))

Fixed submission:
from decimal import Decimal
a, b = map(Decimal, input().split())
print(int(Decimal(a*b)))
Buggy python submission (verdict: Runtime Error):
h1, m1, h2, m2, k = map(int, input().split())

H = (h2-h1)*60
M = abs(m1-m2)
if H-M-k >= 0:
print(H-M-k)

Fixed submission:
h1, m1, h2, m2, k = map(int, input().split())
hm = ((h2-h1)*60)-(m1-m2)-k
print(hm)
Buggy python submission (verdict: Runtime Error):
n = int(input())
a = map(int, input().split())
s = sum(a)
k = 1 - a[0]
ans = 1

for i in range(1,n+1):
  if k*2 <= s:
    k *= 2
  else:
    k = s
  ans += k
  k -= a[i]
  s -= a[i]

if k == 0 and s == 0:
  print(ans)
else:
  print(-1)

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
s = sum(a)
k = 1-a[0]
s -= a[0]
ans = 1

for i in range(1,n+1):
  if k*2 <= s:
    k *= 2
  else:
    k = s
  ans += k
  k -= a[i]
  s -= a[i]

if k == 0 and s == 0:
  print(ans)
else:
  print(-1)
Buggy python submission (verdict: Runtime Error):
N = int(input())
n = N % 10

print('bon' if n == 3)
print('pon' if n == 0 or n == 1 or n == 6 or n == 8)
print('hon' if n == 2 or n == 4 or n == 5 or n == 7 or n == 9)
  

Fixed submission:
n = int(input()) % 10
print('bon' if n == 3 else 'pon' if n == 0 or n == 1 or n == 6 or n == 8 else 'hon')

Buggy python submission (verdict: Runtime Error):
n = input() % 10
print('bon' if n == 3 else 'pon' if n == 0 or n == 1 or n == 6 or n == 8 else 'hon')

Fixed submission:
n = int(input()) % 10
print('bon' if n == 3 else 'pon' if n == 0 or n == 1 or n == 6 or n == 8 else 'hon')
Buggy python submission (verdict: Runtime Error):
K = int(input())
S = input()

if len(S) < K:
    print(s)
else:
    print(s[:k] + "...")

Fixed submission:
k = int(input())
s = input()
n = len(s)
     
if n <= k:
	print(s)
else:
	print(s[:k] + '...')

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

if len(S) <= K:
    print(s)
else:
    print(s[:k] + "...")

Fixed submission:
k = int(input())
s = input()
n = len(s)
     
if n <= k:
	print(s)
else:
	print(s[:k] + '...')

Buggy python submission (verdict: Runtime Error):
k = int(input())
s = raw_input()
n = len(s)
     
if n <= k:
	print(s)
else:
	print(s[:k] + '...')

Fixed submission:
k = int(input())
s = input()
n = len(s)
     
if n <= k:
	print(s)
else:
	print(s[:k] + '...')

Buggy python submission (verdict: Runtime Error):
k = int(input())
s = input()
n = len(s)

if s <= k :
print(s)

else :
print(s[:k] + '...')

Fixed submission:
k = int(input())
s = input()
n = len(s)
     
if n <= k:
	print(s)
else:
	print(s[:k] + '...')

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

if s <= k :
print(s)

else s >= k :
print(s[:k]+'...')

Fixed submission:
k = int(input())
s = input()
n = len(s)
     
if n <= k:
	print(s)
else:
	print(s[:k] + '...')

Buggy python submission (verdict: Runtime Error):
k = int(input())
s = input()
n = len(s)

if n <= k 
print(s)

if n >= k
print(s[:k]+'...')

Fixed submission:
k = int(input())
s = input()
n = len(s)
     
if n <= k:
	print(s)
else:
	print(s[:k] + '...')

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

if len(s) <= k 
print(s)

if len(s) >= k
print(s[:k]+'...')

Fixed submission:
k = int(input())
s = input()
n = len(s)
     
if n <= k:
	print(s)
else:
	print(s[:k] + '...')

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

if s <= k 
print(s)

if s >= k
print(s[:k]+'...')

Fixed submission:
k = int(input())
s = input()
n = len(s)
     
if n <= k:
	print(s)
else:
	print(s[:k] + '...')
Buggy python submission (verdict: Runtime Error):
a, b, h, m = map(int, input().split())

hangle = 360*(h/12+m/(60*12))
mangle = 360*m/60
hm = math.radians(abs(hangle-mangle))

ans = math.sqrt(a**2+b**2-2*a*b*math.cos(hm))

print(ans)

Fixed submission:
import math
a, b, h, m = map(int, input().split())
     
mr = 6*m
hr = 360*(h/12+m/720)
r = math.radians(abs(mr-hr))
ans = math.sqrt((a**2)+(b**2)-2*a*b*math.cos(r))
print(ans)

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

A, B, H, M = (int(x) for x in input().split())
 

hang = math.radians(30*H/12+6*M)
mang = math.radians(6*M)
hm = abs(haang-mang)
ans = math.sqrt(A**2+B**2-2*A*B*math.cos(hm))
print(ans)

Fixed submission:
import math
a, b, h, m = map(int, input().split())
     
mr = 6*m
hr = 360*(h/12+m/720)
r = math.radians(abs(mr-hr))
ans = math.sqrt((a**2)+(b**2)-2*a*b*math.cos(r))
print(ans)

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

a, b, h, m = map(int , input().split())

x = ((360/12)*h+(360/12)*(m/60))
y = 360*(m/60)
z = math.radians(abs(x-y))
ans = ((a**2)+(b**2))-2*a*b*cos(z)

print(ans)

Fixed submission:
import math
a, b, h, m = map(int, input().split())
     
mr = 6*m
hr = 360*(h/12+m/720)
r = math.radians(abs(mr-hr))
ans = math.sqrt((a**2)+(b**2)-2*a*b*math.cos(r))
print(ans)

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

a , b , h, m = map(int , input())

x = 360/12
y = ((h/12)+(m/45))*x
z = math.radians(y)
ans = (a**2+b**2)-2*a*b*cos(z)

print(ans)

Fixed submission:
import math
a, b, h, m = map(int, input().split())
     
mr = 6*m
hr = 360*(h/12+m/720)
r = math.radians(abs(mr-hr))
ans = math.sqrt((a**2)+(b**2)-2*a*b*math.cos(r))
print(ans)

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

a , b , h, m = map(int , input())

x = 360/12
y = (h/12)+(m/45)*x
z = math.radians(y)
ans = a**2+b**2-2*a*b*cos(z)

print(ans)

Fixed submission:
import math
a, b, h, m = map(int, input().split())
     
mr = 6*m
hr = 360*(h/12+m/720)
r = math.radians(abs(mr-hr))
ans = math.sqrt((a**2)+(b**2)-2*a*b*math.cos(r))
print(ans)
Buggy python submission (verdict: Runtime Error):
from collections import deque
n, m = map(int, input().split())
ab = [[] for i in range(n+1)]

for i in range(m):
  a, b = map(int,input().split())
  ab[a].append(b)
  ab[b].append(a)

ans = [-1]*(n+1)
que = deque([1])

while que:
  q = que.popleft()
  for i in ab[q]:
    if ans[i] == -1:
      que.append(i)
      ans[i] = q

print("Yes")

for i range(2,n+1):
  print(ans[i])

Fixed submission:
from collections import deque
n, m = map(int, input().split())
ab = [[] for i in range(n+1)]

for i in range(m):
    a, b = map(int, input().split())
    ab[a].append(b)
    ab[b].append(a)

ans = [-1]*(n+1)
que = deque([1])

while que:
    q = que.popleft()
    for i in ab[q]:
        if ans[i] == -1:
            que.append(i)
            ans[i] = q

print("Yes")

for i in range(2,n+1):
    print(ans[i])

Buggy python submission (verdict: Runtime Error):
from collections import deque
n, m = map(int, input().split())
ab = [[] for i in range(n+1)]

for i in range(m):
  a, b = map(int,input().split())
  ab[a].append(b)
  ab[b].append(a)

ans = [-1]*(n+1)
que = deque([1])

while que:
  q = que.popleft()
  for i in ab[q]:
    if ans[i] == -1:
      que.append(i)
      ans[i] = q

print("Yes")

for i range(1,n+1):
  print(ans[i])

Fixed submission:
from collections import deque
n, m = map(int, input().split())
ab = [[] for i in range(n+1)]

for i in range(m):
    a, b = map(int, input().split())
    ab[a].append(b)
    ab[b].append(a)

ans = [-1]*(n+1)
que = deque([1])

while que:
    q = que.popleft()
    for i in ab[q]:
        if ans[i] == -1:
            que.append(i)
            ans[i] = q

print("Yes")

for i in range(2,n+1):
    print(ans[i])
Buggy python submission (verdict: Runtime Error):
from itertools import combinations
n, m, x = map(int, input().split())
ca = [list(map(int, input().split())) for _ in range(n)]

ans = 10**10
for i in range(1,n+1):
  for j in combinations(ca,i):
    check = [0]*(m+1)
    for k in j:
      for a in range(m+1):
        check[a] += k[a]
    if min(check[1:]) >= x:
      ans = min(ans, check[0])

if ans == 10**6:
  print(-1)
else:
  print(ans)

Fixed submission:
s = input()
t = input()
print("Yes" if s == t[:-1] else "No")
Buggy python submission (verdict: Runtime Error):
a, b, c, k = map(int, input().split())
     
if a >= k:
  print(k)
elif:
  a+b >= k
  print(a)
else:
  k -= a+b
  print(a-1*k)

Fixed submission:
a, b, c, k = map(int, input().split())
     
if a >= k:
  print(k)
elif a+b >= k:
  print(a)
else:
  k -= a+b
  print(a-1*k)
Buggy python submission (verdict: Runtime Error):
from itertools import combinations
n, m, x = map(int, input().split())
ca = list(map(int, input().split()))

ans = 10**9
for i in range(1,n+1):
  for j in combinations(ca, i):
    s = [0]*(m+1)
    for k in j:
      for l in range(m+1):
        s[l] += k[l]
    if min(s[1:]) <= x:
      ans += min(ans, s[0])
if ans == 10**9:
  print(-1)
else:
  print(ans)
    

Fixed submission:
from itertools import combinations
n, m, x = map(int, input().split())
ca = [list(map(int, input().split())) for _ in range(n)]

ans = 10**10
for i in range(1,n+1):
  for j in combinations(ca,i):
    check = [0]*(m+1)
    for k in j:
      for a in range(m+1):
        check[a] += k[a]
    if min(check[1:]) >= x:
      ans = min(ans, check[0])

if ans == 10**10:
  print(-1)
else:
  print(ans)
Buggy python submission (verdict: Runtime Error):
n,m=map(int,input().split())
h=[0]+list(map(int, input().split()))
roads=[[] for _ in range(n+1)]
cnt=0
for i in range(m):
    a,b=map(int,input().split())
    roads[a].append(b)
    roads[b].append(a)
 
for i in range(1,n+1):
    for j in roads[i]:
        if h[i]<=h[j]:
            break
    else:
         cnt+=1
    
print(cnt

Fixed submission:
n,m=map(int,input().split())
h=[0]+list(map(int, input().split()))
roads=[[] for _ in range(n+1)]
cnt=0
for i in range(m):
    a,b=map(int,input().split())
    roads[a].append(b)
    roads[b].append(a)

for i in range(1,n+1):
    for j in roads[i]:
        if h[i]<=h[j]:
            break
    else:
         cnt+=1
    
print(cnt)

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
h = list(map(int, input().split()))
ab = [[] for _ in range(n)]
check = [False for _ in range(n)]
for i in range(m):
  a, b = map(int, input().split())
  ab[a-1].append(b)
  ab[b-1].append(a)

for j in range(n):
  for k in ab[j]:
    if h[j] <= h[k]:
      check[j] = True
      
print(check.count(True))

Fixed submission:
n,m=map(int,input().split())
h=[0]+list(map(int, input().split()))
roads=[[] for _ in range(n+1)]
cnt=0
for i in range(m):
    a,b=map(int,input().split())
    roads[a].append(b)
    roads[b].append(a)

for i in range(1,n+1):
    for j in roads[i]:
        if h[i]<=h[j]:
            break
    else:
         cnt+=1
    
print(cnt)

Buggy python submission (verdict: Runtime Error):
n, m = map(int, input().split())
h = list(map(int, input().split()))
ab = [[] for _ in range(n)]
check = [False for _ in range(n)]
for i in range(m):
  a, b = map(int, input().split())
  ab[a-1].append(b)
  ab[b-1].append(a)

for j in range(n):
  for k in ab[j]:
    if k < h[j]:
      check[j] = True
    elif k > h[j]:
      check[j] = False
	else:
      check[j] = False

print(check.count(True))

Fixed submission:
n,m=map(int,input().split())
h=[0]+list(map(int, input().split()))
roads=[[] for _ in range(n+1)]
cnt=0
for i in range(m):
    a,b=map(int,input().split())
    roads[a].append(b)
    roads[b].append(a)

for i in range(1,n+1):
    for j in roads[i]:
        if h[i]<=h[j]:
            break
    else:
         cnt+=1
    
print(cnt)
Buggy python submission (verdict: Runtime Error):
a, b, c, d = map(int, input().split())

t_hp = a
a_hp = c
while a_hp > 0 or t_hp > 0:
	a_hp -= b
	t_hp -= d
    if a_hp <= 0:
         print("Yes")
         exit()
    elif t_hp <= 0:
         print("No")
         exit()

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

t_hp = a
a_hp = c
while a_hp > 0 or t_hp > 0:
    a_hp -= b
    t_hp -= d
    if a_hp <= 0:
         print("Yes")
         exit()
    elif t_hp <= 0:
         print("No")
         exit()

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

t_hp = a
a_hp = c
while a_hp > 0 or t_hp > 0:
	a_hp -= b
	t_hp -= d
	if a_hp <= 0:
      print("Yes")
      exit()
    elif t_hp <= 0:
      print("No")
      exit()

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

t_hp = a
a_hp = c
while a_hp > 0 or t_hp > 0:
    a_hp -= b
    t_hp -= d
    if a_hp <= 0:
         print("Yes")
         exit()
    elif t_hp <= 0:
         print("No")
         exit()

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

t_hp = a
a_hp = c
while a_hp >= 0 or t_hp >= 0:
a_hp -= b
t_hp -= d

if a_hp <= t_hp:
  print("Yes")
else:
  print("No")


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

t_hp = a
a_hp = c
while a_hp > 0 or t_hp > 0:
    a_hp -= b
    t_hp -= d
    if a_hp <= 0:
         print("Yes")
         exit()
    elif t_hp <= 0:
         print("No")
         exit()
Buggy python submission (verdict: Runtime Error):
S = input()
s = S[::-1]

cnt = [0]*2019
s[0] = 1
number = 0
d = 1

for i in s:
  number += int(i)*d
  cnt[number % 2019] += 1
  d *= 10
  d = d % 2019

ans = 0
for i in cnt:
ans += i*(i-1) // 2

print(ans)

Fixed submission:
S = input()
s = S[::-1]

cnt = [0]*2019
cnt[0] = 1
number = 0
d = 1

for i in s:
  number += int(i)*d
  cnt[number % 2019] += 1
  d *= 10
  d = d % 2019

ans = 0
for i in cnt:
  ans += i*(i-1) // 2

print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))

for i in range(1,n+1):
  print(a.count(i))

Fixed submission:
n = int(input())
a = list(map(int, input().split()))
ans = [0]*n
for i in a:
  ans[i-1] += 1
for i in ans:
  print(i)