Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

s = input().strip()
t = input().strip()
n = len(s)
m = len(t)
p = 0
q = 0
fold = 0
l = [[] for _ in range(26)]
lim = [0 for _ in range(26)] 
for i, x in enumerate(s):
	l[ord(x) - 97].append(i)
	lim[ord(x) - 97] += 1
r = [0 for _ in range(26)]
cur = -1
while (q < m):
	x = t[q]
	ind = ord(x) - 97
	#print(x, cur)
	if l[ind] == []:
		print(-1)
		exit(0)
	else:
		#print("HERE", r[ind], lim[ind])
		if r[ind] >= lim[ind]:
			fold += 1
			r = [0 for _ in range(26)]
			cur = -1
		else:
			c = l[ind][r[ind]]
			flag = True
			while (c <= cur):
				r[ind] += 1
				if r[ind] >= lim[ind]:
					flag = False
					break
				c = l[ind][r[ind]]
			if flag == False:
				fold += 1
				r = [0 for _ in range(26)]
				cur = -1
			elif c > cur:
				cur = c
				q += 1
				r[ind] += 1
			else:
				fold += 1
				r = [0 for _ in range(26)]
				cur = -1
#print(fold, n, cur)
print(fold * n + cur + 1)




 

Fixed submission:
import sys
input = sys.stdin.readline


a = int(input())
s = input().strip()

if a >= 3200:
	print(s)
else:
	print("red")
Buggy python submission (verdict: Time Limit Exceeded):
import sys
input = sys.stdin.readline
from collections import defaultdict

n,q = map(int, input().split())
child = defaultdict(list)
parent = defaultdict(int)
query = defaultdict(int)
for _ in range(n - 1):
	a, b = map(int, input().split())
	child[a].append(b)
	parent[b] = a
for _ in range(q):
	a, b = map(int, input().split())
	query[a] += b
ans = [-1 for _ in range(n)]
for i in range(1, n + 1):
	if parent[i] == 0:
		break
l = [i]
while l != []:
	i = l[0]
	ans[i - 1] = query[i]
	if child[i] != []:
 		for x in child[i]:
 			query[x] += query[i]
 			l.append(x)
	l.pop(0)
print(*ans)

Fixed submission:
import sys
input = sys.stdin.readline
from collections import defaultdict, deque

n,q = map(int, input().split())
child = defaultdict(list)
parent = defaultdict(int)
query = defaultdict(int)
for _ in range(n - 1):
	a, b = map(int, input().split())
	child[a].append(b)
	parent[b] = a
for _ in range(q):
	a, b = map(int, input().split())
	query[a] += b
ans = [-1 for _ in range(n)]
for i in range(1, n + 1):
	if parent[i] == 0:
		break
l = deque([i])
while l != deque([]):
	i = l[0]
	ans[i - 1] = query[i]
	if child[i] != []:
 		for x in child[i]:
 			query[x] += query[i]
 			l.append(x)
	l.popleft()
print(*ans)
Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

l, r = map(int, input().split())
if r - l >= 2019:
	print(0)
else:
	ans = 2010
	for i in range(l, r):
		for j in range(i + 1, r + 1):
			ans = min(ans, i * j % 2019)
print(ans)

Fixed submission:
import sys
input = sys.stdin.readline

l, r = map(int, input().split())
if r - l >= 2019:
	print(0)
else:
	ans = 2020
	for i in range(l, r):
		for j in range(i + 1, r + 1):
			ans = min(ans, (i * j) % 2019)
	print(ans)
Buggy python submission (verdict: Runtime Error):
s = input()
week = ("SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT")

print(7 - index.week(s))

Fixed submission:
s = input()
week = ("SUN", "MON", "TUE", "WED", "THU", "FRI", "SAT")

print(7 - week.index(s))
Buggy python submission (verdict: Runtime Error):
s = input()

if len(s)%2:
  l1 =s[0:len(s)//2]
  l2 =s[len(s)//2:]
  count=0
  for i in range(len(l1)):
    if l1[i] != l2[i]:
      count += 1
else:
  l1 =s[0:len(s)//2]
  l2 =s[len(s)+1//2:]
  count=0
  for i in range(len(l1)):
    if l1[i] != l2[i]:
      count += 1

print(count)

Fixed submission:
s = input()
num = int(len(s)/2)
count = 0

for i in range(num):
  if s[i] != s[len(s)-i-1]:
    count+=1
print(count)
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int,input().split())
if a+b+c <= 21:
  print("win")
  else a+b+c >= 21:
    print("bust")
    

Fixed submission:
a, b, c = map(int,input().split())
if a+b+c <= 21:
  print("win")
else:
    print("bust")

Buggy python submission (verdict: Runtime Error):
A1 = input()
A2 = input()
A3 = input()

sum = int(A1) + int(A2) + int(A3)

if sum < 22:
	print('win')

elif sum > 21:
	print('bust')

Fixed submission:
A1, A2, A3 = input().split()

sum = int(A1) + int(A2) + int(A3)

if sum < 22:
	print('win')

elif sum > 21:
	print('bust')
Buggy python submission (verdict: Runtime Error):
today = input()
if today == Sunny:
  print ("Cloudy")
if today == Cloudy:
  print ("Rainy")
if today == Rainy:
  print ("Sunny")
  

Fixed submission:
a = input()
if a == "Sunny":
  print ("Cloudy")
if a == "Cloudy":
  print ("Rainy")
if a == "Rainy":
  print ("Sunny")
Buggy python submission (verdict: Runtime Error):
n, y = list(map(int, input().split()))
for a in range(n):
    for b in range(n):
        for c in range(n):
            q = a*10000 + b*5000 + c*1000
            if q == y:
                answer = [a, b, c]

print(answer)                

Fixed submission:
n, y = list(map(int, input().split()))
ans = 0
 
for i in range(n+1):
    a1 = 10000 * i
    for j in range(n+1-i):
        a2 = 5000 * j
        k = n- (i+j)
        a3 = k*1000
        if a1 + a2 + a3  == y and i + j + k == n:
            print(i, j , k)
            ans += 1
            exit(0)
    if ans == 1:
        break
if ans == 0:
    print(-1, -1, -1)
Buggy python submission (verdict: Runtime Error):
num1 = int(input("Value1:"))
num2 = int(input("Value3:"))
num3 = int(input("Value3:"))
sum=num1+num2+num3
print("Sum:",sum)
if(sum < 22):
   print("Win")
else:
   print("Bust")

Fixed submission:
A1,A2,A3 = map(int,input().split())
sum=A1+A2+A3
if(sum >= 22):
   print("bust")
else:
   print("win")
Buggy python submission (verdict: Runtime Error):
word = input()
wordArray = list(word)
#print(wordArray)
lent = len(wordArray)
iterV=(int)(lent/2)
#print(iterV)

num=0

for i in range(iterV):
    #print("Word at:",i,wordArray[i])
    #print("Word at:",lent-1,wordArray[lent-1])
    if(wordArray[i] == wordArray[lent-1]):
       #print(" if Num:",num)
    else:      
       print(" else temp:",temp)
       wordArray[i]=wordArray[lent-1]      
       print("else Word at post swap:",i,wordArray[i])
       #print("else Word at post swap:",lent-1,wordArray[lent-1])
       num=num+1       
   
lent=lent-1
#print(" else Num:",num)
#print(" else lent:",lent)

print(num)

Fixed submission:
word = input()
wordArray = list(word)
#print(wordArray)
lent = len(wordArray)

iterV=(int)(lent/2)

if(lent%2==0):
 iterV=iterV+1
#print(iterV)

num=0

for i in range(iterV):
    #print("Word at:",i,wordArray[i])
    #print("Word at:",lent-1,wordArray[lent-1])
    if(wordArray[i] != wordArray[lent-1]):       
       wordArray[i]=wordArray[lent-1]      
       #print("else Word at post swap:",i,wordArray[i])
       #print("else Word at post swap:",lent-1,wordArray[lent-1])
       num=num+1       
    lent=lent-1
#print(" else Num:",num)
#print(" else lent:",lent)

print(num)
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
if s[:int(n/2)] == s[int(n/2):n] :
    print("Yes")
else
    print("No")

Fixed submission:
n = int(input())
s = input()
if s[:int(n/2)] == s[int(n/2):n] :
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
if (s[:int(n/2)] == s[int(n/2):n] :
    print("Yes")
else
    print("No")

Fixed submission:
n = int(input())
s = input()
if s[:int(n/2)] == s[int(n/2):n] :
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
if s[:int(2/n)] == s[int(2/n):n] :
    print("Yes")
else
    print("No")

Fixed submission:
n = int(input())
s = input()
if s[:int(n/2)] == s[int(n/2):n] :
    print("Yes")
else:
    print("No")

Buggy python submission (verdict: Runtime Error):
n = int(input())
s = input()
if (s[:int(2/n)] == s[int(2/n):n] :
    print("Yes")
else
    print("No")

Fixed submission:
n = int(input())
s = input()
if s[:int(n/2)] == s[int(n/2):n] :
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
a,b=map(int, input().split())
c = (b-1) / (a-1)

if( (b-1) % (a-1) > 0):
   c = c+1
print(c)

Fixed submission:
predict, actual = input(),input()
a = 0
for i in range(3):
    if(predict[i] == actual[i]):
        a = a + 1
print(a)

Buggy python submission (verdict: Runtime Error):
predict, actual = input(),input()
a = 0
for i in range(3):
	if(predict[i] == actual[i]):
    	a = a + 1
print(a)

Fixed submission:
predict, actual = input(),input()
a = 0
for i in range(3):
    if(predict[i] == actual[i]):
        a = a + 1
print(a)

Buggy python submission (verdict: Runtime Error):
predict = input()
actual  = input()

a = 0
for i in range(3):
	if(predict[i] == actual[i]):
    	a = a + 1
print(a)

Fixed submission:
predict, actual = input(),input()
a = 0
for i in range(3):
    if(predict[i] == actual[i]):
        a = a + 1
print(a)
Buggy python submission (verdict: Runtime Error):
a,b=map(int, input().split())
c = (b-1) / (a-1)

if( (b-1) % (a-1) > 0:
   c = c+1
print(c)


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

if (b-1) % (a-1) > 0 :
   c = c+1
print(c)
Buggy python submission (verdict: Runtime Error):
n = int(input())
h = map(int, input().split())

cnt = 0
ret = 0
for i in range(n-1):
  if h[i] >= h[i+1]:
    cnt = cnt+1
  else:
    ret = max(cnt,ret)
    cnt = 0
  if i == n-2:
    ret = max(cnt,ret)
print(ret)

Fixed submission:
n = int(input())
h = list(map(int, input().split()))

cnt = 0
ret = 0
for i in range(n-1):
  if h[i] >= h[i+1]:
    cnt = cnt+1
  else:
    ret = max(cnt,ret)
    cnt = 0
  if i == n-2:
    ret = max(cnt,ret)
print(ret)

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

cnt = 0
ret = 0
for i in range(n-1):
  if h[i] >= h[i+1]:
    cnt = cnt+1
  else:
    ret = max(cnt,ret)
    cnt = 0
  if i == n-2:
    ret = max(cnt,ret)
print(ret)

Fixed submission:
n = int(input())
h = list(map(int, input().split()))

cnt = 0
ret = 0
for i in range(n-1):
  if h[i] >= h[i+1]:
    cnt = cnt+1
  else:
    ret = max(cnt,ret)
    cnt = 0
  if i == n-2:
    ret = max(cnt,ret)
print(ret)

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

cnt = 0
ret = 0
for i in range(n-1):
  if(h[i] >= h[i+1]):
    cnt = cnt+1
  else:
    ret = max(cnt,ret)
    cnt = 0
  if(i == n-2):
    ret = max(cnt,ret)
print(ret)
             

Fixed submission:
n = int(input())
h = list(map(int, input().split()))

cnt = 0
ret = 0
for i in range(n-1):
  if h[i] >= h[i+1]:
    cnt = cnt+1
  else:
    ret = max(cnt,ret)
    cnt = 0
  if i == n-2:
    ret = max(cnt,ret)
print(ret)
Buggy python submission (verdict: Runtime Error):
if n == 1:
  print(0)
else:
  print(n*(n-1)//2)

Fixed submission:
n = int(input())
print(n*(n-1)//2)
Buggy python submission (verdict: Runtime Error):
import math
r,g,b,n  = (int(i) for i in input().split())
z =  math.factorial(r) * math.factorial(b) * math.factorial(g)
a =  math.factorial(n) // z
print( a)

Fixed submission:
n, k = (int(i) for i in input().split()) 
a =  n - k + 1
print( a)

Buggy python submission (verdict: Runtime Error):
n, k = (int(i) for i in input().split()) 

a = 0
b = 0
for i in range(1, n):
	a = a +i
for i in range(1, (n -k)):
	b = b + i
	
print(a/b)

Fixed submission:
n, k = (int(i) for i in input().split()) 
a =  n - k + 1
print( a)
Buggy python submission (verdict: Runtime Error):
b = input()

if b=='A':
    print('T')

elif b=='T':
    print('A')

elif b=='C':
    print('G')

else:
    print('C')


Fixed submission:
b = input()

if b=='A':
    print('T')

elif b=='T':
    print('A')

elif b=='C':
    print('G')

else:
    print('C')
Buggy python submission (verdict: Runtime Error):
N = int(input())
S = input()
ans = ""
a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

for i in range(len(S)):
    if a.index(S[i]) + N > 26:
        ans += a[a.index(S[i]) + N - 26]
    else:
        ans += a[a.index(S[i]) + N]

print(ans)


Fixed submission:
N = int(input())
S = input()
ans = ""
a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

for i in range(len(S)):
    if a.index(S[i]) + N > 25:
        ans += a[a.index(S[i]) + N - 26]
    else:
        ans += a[a.index(S[i]) + N]

print(ans)

Buggy python submission (verdict: Runtime Error):
N = int(input())
S = input()
ans = ""
a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

for i in range(len(S)):
    if a.index(S[i]) + N > 26:
        ans += a[a.index(S[i]) + N - 26]
    else:
        ans += a[a.index(S[i]) + N]

print(ans)


Fixed submission:
N = int(input())
S = input()
ans = ""
a = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"

for i in range(len(S)):
    if a.index(S[i]) + N > 25:
        ans += a[a.index(S[i]) + N - 26]
    else:
        ans += a[a.index(S[i]) + N]

print(ans)
Buggy python submission (verdict: Runtime Error):
A, B = map(int, input().split())
K = (A + B) / 2
ans = K if K % 2 == 0 else "IMPOSSIBLE"
print(int(ans))

Fixed submission:
A, B = map(int, input().split())
K = (A + B) / 2
ans = int(K) if (A + B) % 2 == 0 else "IMPOSSIBLE"
print(ans)
Buggy python submission (verdict: Runtime Error):
l = list(input().split())
s_l = l.sort()

print(s_l[0] + s_l[1])

Fixed submission:
l = list(map(int, input().split()))
s_l = sorted(l)

print(s_l[0] + s_l[1])
Buggy python submission (verdict: Runtime Error):
H, W = map(int, input().split())
h, w = map(int, input().split())

print((H * W) - (h * H + w * W - h * w)

Fixed submission:
H, W = map(int, input().split())
h, w = map(int, input().split())

print((H * W) - (h * W + w * H - h * w))
Buggy python submission (verdict: Runtime Error):
n = input()
if n == 1:
    print("Hello World")
else:
    a, b = map(int, input().split())
    print(a + b)

Fixed submission:
n = int(input())
if n == 1:
    print("Hello World")
else:
    a = int(input())
    b = int(input())
    print(a + b)

Buggy python submission (verdict: Runtime Error):
n = input()
if n = 1:
    print("Helllo World")
else:
    a, b = map(int, input().split())
    print(a + b)

Fixed submission:
n = int(input())
if n == 1:
    print("Hello World")
else:
    a = int(input())
    b = int(input())
    print(a + b)
Buggy python submission (verdict: Runtime Error):
li = [map(int, input().split())]
sli = sorted(li)

print((sli[1] - sli[0]) + (sli[2] - sli[1]))

Fixed submission:
li = list(map(int, input().split()))
sli = sorted(li)

print((sli[1] - sli[0]) + (sli[2] - sli[1]))
Buggy python submission (verdict: Runtime Error):
s = input()

print("Yes" s.count("a") == 1 and s.count("b") == 1 and s.count("c") == 1 else "No")

Fixed submission:
s = input()

print("Yes" if s.count("a") == 1
            and s.count("b") == 1 
            and s.count("c") == 1
            else "No")
Buggy python submission (verdict: Runtime Error):
c1 = input()
c2 = input()

print("YES" if c1 = c2[::-1] else "NO")

Fixed submission:
c1 = input()
c2 = input()

print("YES" if c1 == c2[::-1] else "NO")

Buggy python submission (verdict: Runtime Error):
c1 = input()
c2 = input()

print("Yes" if c1 = c2[::-1] else "No")

Fixed submission:
c1 = input()
c2 = input()

print("YES" if c1 == c2[::-1] else "NO")
Buggy python submission (verdict: Runtime Error):
n = int(input())

print("Yes" if n[0] == 9 or n[1] == 9 else "No")

Fixed submission:
n = input()

print("Yes" if n[0] == "9" or n[1] == "9" else "No")
Buggy python submission (verdict: Runtime Error):
r, g, b = input().split()

n = r + g + b

print("YES" if n % 4 == 0 else "NO")

Fixed submission:
r, g, b = input().split()

n = int(r + g + b)

print("YES" if n % 4 == 0 else "NO")
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())

if a == b:
    print("Draw")
elif a == 1:
    print("Alice"):
elif b == 1:
    print("Bob")
elif a < b:
    print("Bob")
else:
    print("Alice")

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

if a == b:
    print("Draw")
elif a == 1:
    print("Alice")
elif b == 1:
    print("Bob")
elif a < b:
    print("Bob")
else:
    print("Alice")
Buggy python submission (verdict: Runtime Error):
a, b = map(int, raw_input().split())
if a > 9 or b > 9:
  print(-1)
else:
  print(a*b)

Fixed submission:
a, b = map(int, input().split())
if a > 9 or b > 9:
  print(-1)
else:
  print(a*b)
Buggy python submission (verdict: Runtime Error):
a = int(input())
for i in range(9):
  t = a / (i+1)
  f = False
  if t == int(t) && t < 10:
    print(YES)
    f = True
if f == False:
  print(No)
    

Fixed submission:
a = int(input())
f = False
for i in range(9):
    t = a / (i + 1)
    if t == int(t) and t < 10:
        print("Yes")
        f = True
        break
if not f:
    print('No')
Buggy python submission (verdict: Runtime Error):
day = input()
week = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
ans = 6;

for i in int(len(week)):
    if day != week[i]:
        ans -= 1
print(ans)


Fixed submission:
day = input()
week = ['SUN','MON','TUE','WED','THU','FRI','SAT']
ans = 7;

for i in range(len(week)):
    if day != week[i]:
        ans -= 1
    else:
        break
print(ans)
Buggy python submission (verdict: Runtime Error):
n=int(input())
if n%2==0:
    print("0.5")
else:
    print("{}".format((m+1)/n))

Fixed submission:
n=int(input())
m=n//2
print((n-m)/n)
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input()split())
print("{}".format(max((a+b),(a-b),(a*b))))

Fixed submission:
a,b=map(int,input().split())
print("{}".format(max((a+b),(a-b),(a*b))))
Buggy python submission (verdict: Runtime Error):
n,k=map(int,input().split())
s=list(input())
s[k-1]=s[k-1].lower()
print("".join())

Fixed submission:
n,k=map(int,input().split())
s=list(input())
s[k-1]=s[k-1].lower()
print("".join(s))
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
t,a=map(int,input().split())
ln=[int(h) for h in input().split()]
ln = sorted(ln)
i=0
for h in ln:
    while (t-h*0.006)<=a:
        i+=1
print(min(ln[i],ln[i+1]).index())

Fixed submission:
n=int(input())
t,a=map(int,input().split())
ln=[int(x) for x in input().split()]
ans=[abs(t-0.006*x-a)  for x in ln]
print(ans.index(min(ans))+1)
Buggy python submission (verdict: Runtime Error):
n=int(input())
for i in range(n//4+1):
    for j in range(n//7+1):
        if 4*i+7*j==n:
            ans+=1
print(ans)

Fixed submission:
n=int(input())
d=0
for i in range(n//4+1):
    for j in range(n//7+1):
        if 4*i+7*j==n:
            d+=1
print("Yes" if d!=0 else "No")

Buggy python submission (verdict: Runtime Error):
n=int(input())
for s in range(n//4+1):
    for t in range(n//7+1):
        if 4*s+7*t==n:
             print("Yes")
            break
        else:
            print("No")

Fixed submission:
n=int(input())
d=0
for i in range(n//4+1):
    for j in range(n//7+1):
        if 4*i+7*j==n:
            d+=1
print("Yes" if d!=0 else "No")
Buggy python submission (verdict: Runtime Error):
n=int(input())
ln=map(int,input().split())
print(abs(max(ln)-min(ln)))

Fixed submission:
n=int(input())
ln=[int(n) for n in map(int,input().split())]
print(max(ln)-min(ln))

Buggy python submission (verdict: Runtime Error):
n=int(input())
ln=map(int,input().split())
print(abs(max(ln)-min(ln)+1))

Fixed submission:
n=int(input())
ln=[int(n) for n in map(int,input().split())]
print(max(ln)-min(ln))
Buggy python submission (verdict: Runtime Error):
n,x=map(int,input().split())
ln=map(int,input().split())
print(n+(x-sum(ln))//min(ln))

Fixed submission:
n,x=map(int,input().split())
ln=[int(input()) for i in range(n)]
print(n+(x-sum(ln))//min(ln))
Buggy python submission (verdict: Runtime Error):
a,b,c,x=map(int, input().split())
i=0
for p in range(a+1):
    for q in range(b+1):
        for r in range(c+1):
            if 500*p+100*q+50*r==x:
                i+=1
print(i)

Fixed submission:
a,b,c,x=[int(input()) for i in range(4)]
i=0
for _ in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if 500*_+100*j+50*k==x:
                i+=1
print(i)

Buggy python submission (verdict: Runtime Error):
a,b,c,x=map(int,input().split())
i=0
for s in range(1,a+1):
    for t in range(1,b+1):
         for r in range(1,c+1):
            if (500*s+100*t+50*r)==x:
                i+=1
print(i)

Fixed submission:
a,b,c,x=[int(input()) for i in range(4)]
i=0
for _ in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if 500*_+100*j+50*k==x:
                i+=1
print(i)

Buggy python submission (verdict: Runtime Error):
a,b,c,x=map(int,input().split())
i=0
for s in range(1,a+1):
    for t in range(1,b+1):
         for r in range(1,c+1):
            if 500*s+100*t+50*r==x:
                i+=1
print(i)

Fixed submission:
a,b,c,x=[int(input()) for i in range(4)]
i=0
for _ in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if 500*_+100*j+50*k==x:
                i+=1
print(i)

Buggy python submission (verdict: Runtime Error):
a,b,c,x=map(int,input().split())
i=0
for s in range(1,a+1):
    for t in range(1,b+1):
         for r in range(1,c+1):
            if 500*a+100*b+50*c==x:
                i+=1
print(i)

Fixed submission:
a,b,c,x=[int(input()) for i in range(4)]
i=0
for _ in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if 500*_+100*j+50*k==x:
                i+=1
print(i)

Buggy python submission (verdict: Runtime Error):
a,b,c,x=map(int,input().split())
i=0
for s in range(1,a+1):
    foe t in range(1,b+1):
         for r in range(1,c+1):
            if 500*a+100*b+50*c==x:
                i+=1
print(i)

Fixed submission:
a,b,c,x=[int(input()) for i in range(4)]
i=0
for _ in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if 500*_+100*j+50*k==x:
                i+=1
print(i)
Buggy python submission (verdict: Runtime Error):
s=input()
s[2].replace("8")
print(s)

Fixed submission:
print("2018"+input()[4:])
Buggy python submission (verdict: Runtime Error):
s=input().sort()
t=input().sort()
for x,y in s,t:
    if x>y:
        print("Yes")
   break
print("No")

Fixed submission:
s=sorted(input())
t=sorted(input(),reverse=True)
if s<t:
    print("Yes")
else:
    print("No")
Buggy python submission (verdict: Runtime Error):
n=int(input())
ln=[int(a) for a in input().split()]
while all(a%2==0 for a in ln):
    ln=[a//2 for a in ln]
    i+=1
print(i)

Fixed submission:
n=int(input())
ln=[int(a) for a in input().split()]
i=0
while all(a % 2 ==0 for a in ln):
    ln=[a/2 for a in ln]
    i+=1
print(i)

Buggy python submission (verdict: Runtime Error):
n=int(input())
ln=[int(a) for a in input().split()]
i=0
while all(a % 2 ==0 for a in ln):
    ln=[a/2 foe a in ln]
    i+=1
print(i)

Fixed submission:
n=int(input())
ln=[int(a) for a in input().split()]
i=0
while all(a % 2 ==0 for a in ln):
    ln=[a/2 for a in ln]
    i+=1
print(i)

Buggy python submission (verdict: Runtime Error):
n=int(input())
ln=[int(a) for a in input().split()]
i=0
while all([a % 2 for a in ln]==0):
    i+=1
print(i)

Fixed submission:
n=int(input())
ln=[int(a) for a in input().split()]
i=0
while all(a % 2 ==0 for a in ln):
    ln=[a/2 for a in ln]
    i+=1
print(i)

Buggy python submission (verdict: Runtime Error):
n=int(input())
ln=[int(a) for a in input().split()]
i=0
while all([a for a in ln]%2==0):
    i+=1
print(i)

Fixed submission:
n=int(input())
ln=[int(a) for a in input().split()]
i=0
while all(a % 2 ==0 for a in ln):
    ln=[a/2 for a in ln]
    i+=1
print(i)
Buggy python submission (verdict: Runtime Error):
print(input()[0]+len(input()[1:-1])+input()[-1])

Fixed submission:
s=list(input())
print(s[0]+str(len(s)-2)+s[-1])

Buggy python submission (verdict: Runtime Error):
s=input()
l=str((len(s)-2)
print(s[0]+l+s[-1])

Fixed submission:
s=list(input())
print(s[0]+str(len(s)-2)+s[-1])

Buggy python submission (verdict: Runtime Error):
s=input()
l=int(len(s))-2
print(s[0]+l+s[-1])

Fixed submission:
s=list(input())
print(s[0]+str(len(s)-2)+s[-1])

Buggy python submission (verdict: Runtime Error):
s=input()
l=len(s)-2
print(s[0]+l+s[-1])

Fixed submission:
s=list(input())
print(s[0]+str(len(s)-2)+s[-1])

Buggy python submission (verdict: Runtime Error):
s=int(input())
l=len(s)-2
print(s[0]+l+s[-1])

Fixed submission:
s=list(input())
print(s[0]+str(len(s)-2)+s[-1])

Buggy python submission (verdict: Runtime Error):
s=int(input())
l=len(s)-2
print(s[0]+l+[:-1])

Fixed submission:
s=list(input())
print(s[0]+str(len(s)-2)+s[-1])