Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())
r = 0
for i in range(a, b + 1):
  if i == i[::-1]:
    r += 1
print(r)

Fixed submission:
a, b = map(int, input().split())
r = 0
for i in range(a, b + 1):
  if str(i) == str(i)[::-1]:
    r += 1
print(r)
Buggy python submission (verdict: Runtime Error):
sl = [i for i in -input().split()]
print(["Three", "Four"][len(set(sl)) == 4])

Fixed submission:
n = int(input())
sl = [i for i in input().split()]
print(["Three", "Four"][len(set(sl)) == 4])

Buggy python submission (verdict: Runtime Error):
n = int(input())
sl = [i for i in input().split()]
print(["Three", "Four"][len(set(sl)) == 4]

Fixed submission:
n = int(input())
sl = [i for i in input().split()]
print(["Three", "Four"][len(set(sl)) == 4])
Buggy python submission (verdict: Runtime Error):
n = input()
nl = [int(i) for i in n]
nl_s = 0
for i in nl:
  nl_s += i
print("Yes" if n % nl_s == 0 else "No")

Fixed submission:
n = input()
nl = [int(i) for i in n]
nl_s = 0
for i in nl:
  nl_s += i
print("Yes" if int(n) % nl_s == 0 else "No")
Buggy python submission (verdict: Runtime Error):
s = [i for i in input()]
print("yes" len(s) == len(set(s)) else "no")

Fixed submission:
s = [i for i in input()]
print("yes" if len(s) == len(set(s)) else "no")
Buggy python submission (verdict: Runtime Error):
a, b, c = map(int, input().split())
print("Yes" a <= c and c <= b else "No")

Fixed submission:
a, b, c = map(int, input().split())
print("Yes" if a <= c and c <= b else "No")
Buggy python submission (verdict: Runtime Error):
a, b, c = input().split()
print("YES" if a[-1] == b[1] and b[-1] == c[1] else "NO")

Fixed submission:
a, b, c = input().split()
print("YES" if a.endswith(b[:1]) and b.endswith(c[:1]) else "NO")
Buggy python submission (verdict: Runtime Error):
x, i = 1, 1
while i <= int(input()):
  x = (x * i) % (10 ** 9 + 7)
  i += 1
print(x)

Fixed submission:
n = int(input())
x, i = 1, 1
while i <= n:
  x = (x * i) % (10 ** 9 + 7)
  i += 1
print(x)

Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
p = 1
for i in range(1, n + 1):
  p *= i
print(p % (10 ** 9 + 7))

Fixed submission:
n = int(input())
x, i = 1, 1
while i <= n:
  x = (x * i) % (10 ** 9 + 7)
  i += 1
print(x)
Buggy python submission (verdict: Runtime Error):
a, b, h = [int(input()) for i in range(4)]
print((a + b) * h // 2)

Fixed submission:
l = [int(input()) for i in range(1, 4)]
print((l[0] + l[1]) * l[2] // 2)
Buggy python submission (verdict: Runtime Error):
def main(A, B, C, X):
    # type: (int, int, int, int) -> None
    coins = [
        (a,b,c)
        for a in range(A)
        for b in range(B)
        for c in range(C)
        if 500*a + 100*b + 50*c == X
    ] # type: List[Tuple[int, int, int]]
    print(len(coins))

if __name__ == '__main__':
    A,B,C,X,*_ = list(map(int, input().split()))
    main(A,B,C,X)


Fixed submission:
def main(A, B, C, X):
    # type: (int, int, int, int) -> None
    coins = [
        (a,b,c)
        for a in range(0,A+1)
        for b in range(0,B+1)
        for c in range(0,C+1)
        if 500*a + 100*b + 50*c == X
    ] # type: List[Tuple[int, int, int]]
    print(len(coins))

if __name__ == '__main__':
    A = int(input())
    B = int(input())
    C = int(input())
    X = int(input())
    main(A,B,C,X)
Buggy python submission (verdict: Runtime Error):
import sys
from typing import *


def main(argv):
    # type: (List[str]) -> int
    a, b, *_ = map(int, argv) # type: Tuple[int, int, Any]
    if a % 2 == 0 or b % 2 == 0:
        print("Even")
    else:
        print("Odd")
    return 0

if __name__ == '__main__':
    # main(sys.argv[1:])
    main(input().split())


Fixed submission:
import sys
#from typing import *


def main(argv):
    # type: (List[str]) -> int
    a, b, *_ = map(int, argv) # type: Tuple[int, int, Any]
    if a % 2 == 0 or b % 2 == 0:
        print("Even")
    else:
        print("Odd")
    return 0

if __name__ == '__main__':
    # main(sys.argv[1:])
    main(input().split())
Buggy python submission (verdict: Runtime Error):
def main(n, xs):
    # type: (int, List[int]) -> None
    even = lambda x: x % 2 == 0 # type: Callable[[int],bool]
    allEven = lambda xs: all(map(even, xs)) # type: Callable[[List[int]],bool]
    cnt = 0
    while allEven(xs):
        cnt = cnt + 1
        xs = list(map(lambda x: x // 2, xs))
    return

if __name__ == '__main__':
    # main(sys.argv[1:])
    n = int(input())
    xs = list(map(lambda _: int(input()), range(n)))
    main(n, xs)


Fixed submission:
def main(n, xs):
    # type: (int, List[int]) -> None
    even = lambda x: x % 2 == 0 # type: Callable[[int],bool]
    allEven = lambda xs: all(map(even, xs)) # type: Callable[[Iterable[int]],bool]
    cnt = 0
    while allEven(xs):
        cnt = cnt + 1
        xs = list(map(lambda x: x // 2, xs))
    print(cnt)
    return

if __name__ == '__main__':
    # main(sys.argv[1:])
    n = int(input())
    xs = list(map(int, input().split()))
    main(n, xs)
Buggy python submission (verdict: Runtime Error):
X= (int(x) for x in input().split())
if X>1200:
    print("ARC")
else :
    print("ABC")

Fixed submission:
X= int(input())
if X<1200:
    print("ABC")
else :
    print("ARC")
Buggy python submission (verdict: Time Limit Exceeded):
num = int(input())
count = 0
for n in range(num + 1):
  is3 = False
  is5 = False
  is7 = False
  nStr = str(n)
  for i in range(len(nStr)):
    if nStr[i] == '3':
      is3 = True
    elif nStr[i] == '5':
      is5 = True
    elif nStr[i] == '7':
      is7 = True
    else:
      is3 = False
      break
  if is3 and is5 and is7:
    count += 1
print(str(count))

Fixed submission:
def next_rank_num(nStr):
  if nStr == '3':
    return '5'
  elif nStr == '5':
    return '7'
  elif nStr == '7':
    return '3'

def next_num(nStr):
  length = len(nStr)
  i = 1
  nrn = '3'
  nList = []
  while i <= length and nrn == '3':
    nrn = next_rank_num(nStr[length-i])
    nList.append(nrn)
    if nrn == '3':
      i += 1
  nList.reverse()
  if i > length:
    return '3' + ''.join(nList)
  else:
    return nStr[0:length-i] + ''.join(nList)
   
num = int(input())
count = 0
nStr = "357";
while int(nStr) <= num:
  if len({'3', '5', '7'} - set(nStr)) == 0:
    count += 1
  nStr = next_num(nStr)
print(str(count))
Buggy python submission (verdict: Runtime Error):
s=input().sprit()
x=int(s[0])
y=int(s[1])
a=x+y/2
print(a)


Fixed submission:
s=input().split()
x=int(s[0])
y=int(s[1])
a=x+y/2
print(int(a))

Buggy python submission (verdict: Runtime Error):
x=input('X')
y=input('Y')
int_x=int(x)
int_y=int(y)
a=(int_x+int_y)/2
print(a)

Fixed submission:
s=input().split()
x=int(s[0])
y=int(s[1])
a=x+y/2
print(int(a))

Buggy python submission (verdict: Runtime Error):
x=input('AからBの運賃')
y=input('BからCの運賃')
int_x=int(x)
int_y=int(y)
a=(int_x+int_y)/2
print(a)


Fixed submission:
s=input().split()
x=int(s[0])
y=int(s[1])
a=x+y/2
print(int(a))
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = list(map(int, input().split()))

max = max(a)
min = max * -1
ans = 10000000
prev = 10000000
t = len(a)
flag = 0
for b in range(min,max):
  sum = 0
  for i in range(t):
    sum += abs(a[i] - (b+i+1))
  if ans > sum:
    ans = sum
  if prev < sum:
    flag += 1
  if flag == 2:
    break
  prev = sum

print(ans)

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

b = []

for i in range(n):
  b.append(a[i]-(i+1))

# print(b)
b.sort()
# print(b)

min_b=b[n//2]
# print(min_b)

ans = 0
for i in range(n):
  ans+=abs(a[i]-(min_b+(i+1)))
  # print(ans)
print(ans)

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

max = max(a)
min = max * -1
ans = 10000000
prev = 10000000
list = []
flag = 0
for b in range(min,max):
  sum = 0
  j = 0
  for i in a:
    j += 1
    sum += abs(i - (b+j))
  if ans > sum:
    ans = sum
  if prev < sum:
    flag += 1
  if flag == 2:
    break
  prev = sum

print(ans)

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

b = []

for i in range(n):
  b.append(a[i]-(i+1))

# print(b)
b.sort()
# print(b)

min_b=b[n//2]
# print(min_b)

ans = 0
for i in range(n):
  ans+=abs(a[i]-(min_b+(i+1)))
  # print(ans)
print(ans)

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

max = max(a)
min = max * -1
ans = 10000000
prev = 10000000
list = []
for b in range(min,max):
  sum = 0
  j = 0
  for i in a:
    j += 1
    sum += abs(i - (b+j))
  if ans > sum:
    ans = sum
  prev = sum

print(ans)

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

b = []

for i in range(n):
  b.append(a[i]-(i+1))

# print(b)
b.sort()
# print(b)

min_b=b[n//2]
# print(min_b)

ans = 0
for i in range(n):
  ans+=abs(a[i]-(min_b+(i+1)))
  # print(ans)
print(ans)

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

max = max(a)
ans = 10000000
for b in range(max*-1,max):
  sum = 0
  for i, j in enumerate(a):
    i = i+1
    sum += abs(j - (b+i))
  if ans > sum:
    ans = sum

print(ans)

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

b = []

for i in range(n):
  b.append(a[i]-(i+1))

# print(b)
b.sort()
# print(b)

min_b=b[n//2]
# print(min_b)

ans = 0
for i in range(n):
  ans+=abs(a[i]-(min_b+(i+1)))
  # print(ans)
print(ans)

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

max = max(a)
list = []
for b in range(max*-1,max):
  sum = 0
  for i, j in enumerate(a):
    i = i+1
    sum += abs(j - (b+i))
  list.append(sum)

print(min(list))

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

b = []

for i in range(n):
  b.append(a[i]-(i+1))

# print(b)
b.sort()
# print(b)

min_b=b[n//2]
# print(min_b)

ans = 0
for i in range(n):
  ans+=abs(a[i]-(min_b+(i+1)))
  # print(ans)
print(ans)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())

if a*b%2 == 0:
  puts("Even")
else:
  puts("Odd")

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

if a*b%2 == 0:
  print("Even")
else:
  print("Odd")
Buggy python submission (verdict: Runtime Error):
if x-t > 0:
    print(x-t)
else:
    print(0)

Fixed submission:
x,t = map(int,input().split())
if x-t > 0:
    print(x-t)
else:
    print(0)
Buggy python submission (verdict: Runtime Error):
a, b = map(int, input().split())

if (a > b and b != 1) or (a==1 and b!=1):
    print('Alice')
elif (b > a a!=1) and (a!=1 and b==1):
    print('Bob')
else:
    print('Draw')



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

if (a > b and b != 1) or (a==1 and b!=1):
    print('Alice')
elif (b > a and a!=1) or (a!=1 and b==1):
    print('Bob')
else:
    print('Draw')
Buggy python submission (verdict: Runtime Error):
n = list(map(int, input().split()))
count_5 = 2
count_5 = 1
for i in range(len(n)):
    if n[i] == 5:
        count_5 -= 1
    elif n[i] == 7:
        count_7 -= 1
if count_5==0 and count_7==0:
    print('YES')
else:
    print('NO')


Fixed submission:
n = list(map(int, input().split()))
count_5 = 2
count_7 = 1
for i in range(len(n)):
    if n[i] == 5:
        count_5 -= 1
    elif n[i] == 7:
        count_7 -= 1
if count_5==0 and count_7==0:
    print('YES')
else:
    print('NO')

Buggy python submission (verdict: Runtime Error):
n = list(map(int, input().split()))
5count = 2
7count = 1
for i in range(len(n)):
    if n[i] == 5:
        5count -= 1
    elif n[i] == 7:
        7count -= 1
if 5count==0 and 7count==0:
    print('YES')
else:
    print('NO')


Fixed submission:
n = list(map(int, input().split()))
count_5 = 2
count_7 = 1
for i in range(len(n)):
    if n[i] == 5:
        count_5 -= 1
    elif n[i] == 7:
        count_7 -= 1
if count_5==0 and count_7==0:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
A,B=map(int,input().split())
if A<=8:
  print(Yay!)
if B<=8:
  print(:()

Fixed submission:
A,B = map(int,input().split())
if A <= 8 and B <= 8:
  print('Yay!')
else:
  print(':(')
Buggy python submission (verdict: Runtime Error):
N, T = map(int, input().split())
c = []
for _ in range(N):
  ci, ti = map(int, input().split())
  if ti <= T:
      c.append(ci)

if len(c) == 0:
  print("TLE")
else:
  print(min(ct2))


Fixed submission:
N, T = map(int, input().split())
c = []
for _ in range(N):
  ci, ti = map(int, input().split())
  if ti <= T:
      c.append(ci)

if len(c) == 0:
  print("TLE")
else:
  print(min(c))

Buggy python submission (verdict: Runtime Error):
import copy
N, T = map(int, input().split())
ct = {}
for _ in range(N):
  ci, ti = map(int, input().split())
  ct[ci] = ti
  
count = 0
ct2 = copy.deepcopy(ct)
for ci, ti in ct.items():
  if ti > T:
    count += 1
    del ct2[ci]

if count == N:
  print("TLE")
else:
  print(min(ct2.keys()))

Fixed submission:
N, T = map(int, input().split())
c = []
for _ in range(N):
  ci, ti = map(int, input().split())
  if ti <= T:
      c.append(ci)

if len(c) == 0:
  print("TLE")
else:
  print(min(c))

Buggy python submission (verdict: Runtime Error):
import copy
N, T = map(int, input().split())
ct = {}
for _ in range(N):
  ci, ti = map(int, input().split())
  ct[ci] = ti
  
count = 0
ct2 = copy.deepcopy(ct)
for ci, ti in ct.items():
  if ti > T:
    count += 1
    del ct2[ci]

if count == N:
  print("TLE")
  exit()

print(min(ct2.keys()))


Fixed submission:
N, T = map(int, input().split())
c = []
for _ in range(N):
  ci, ti = map(int, input().split())
  if ti <= T:
      c.append(ci)

if len(c) == 0:
  print("TLE")
else:
  print(min(c))
Buggy python submission (verdict: Runtime Error):
def main():
  x, a = map(int, input().split())

  if (x-a) <= 0:
    print(0)
    return
  print(x-a)
  return

if __name__ == '__main__':
  main()

Fixed submission:
def main():
  x = input()

  if x[0] == '9':
    print('Yes')
    return
  if x[1] == '9':
    print('Yes')
    return
  print('No')
  return

if __name__ == '__main__':
  main()
Buggy python submission (verdict: Runtime Error):
import itertools as it

N = int(input())
A = [0] + list(map(int, input().split()))
A = A.append(0)

L = [0]
for i in range(N):
    L.append(L[-1] + abs(A[i+1] - A[i]))

L.append(L[-1] + abs(A[-2] - A[0]))

for i in range(N):
    print(L[i] + (L[-1] - L[i+2]) + abs(A[i] - A[i+2]))


Fixed submission:
import itertools as it

N = int(input())
A = [0] + list(map(int, input().split())) + [0]

L = 0
for i in range(N+1):
    L += abs(A[i+1] - A[i])
    
for i in range(1,N+1):
    print(L - (abs(A[i] - A[i-1]) + abs(A[i+1] - A[i])) + abs(A[i+1] - A[i-1]))

Buggy python submission (verdict: Time Limit Exceeded):
import itertools as it

N = int(input())
A = [0] + list(map(int, input().split()))
A = A + [0]

L = [0]
for i in range(N):
    L = L + [L[-1] + abs(A[i+1] - A[i])]

L = L + [L[-1] + abs(A[-2] - A[0])]

for i in range(N):
    print(L[i] + (L[-1] - L[i+2]) + abs(A[i] - A[i+2]))


Fixed submission:
import itertools as it

N = int(input())
A = [0] + list(map(int, input().split())) + [0]

L = 0
for i in range(N+1):
    L += abs(A[i+1] - A[i])
    
for i in range(1,N+1):
    print(L - (abs(A[i] - A[i-1]) + abs(A[i+1] - A[i])) + abs(A[i+1] - A[i-1]))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
S_row = [input() for _ in range(N)]

S = list(filter(lambda n: n[0] in "MARCH", S_row))

ans = 0
for i, s1 in enumerate(S):
    for j, s2 in enumerate(S[i+1:]):
        if s2[0] != s1[0]:
            for s3 in S[i+j+1:]:
                if s3[0] != s1[0] and s3[0] != s2[0]:
                    ans += 1
print(ans)


Fixed submission:
from itertools import combinations
from functools import reduce
from operator import mul

N = int(input())
S_row = [input() for _ in range(N)]

count = [0] * 5
for i, c in enumerate("MARCH"):
    count[i] = len(list(filter(lambda n: n[0] == c, S_row)))

print(sum(map(lambda x: reduce(mul, x), combinations(count, 3))))
Buggy python submission (verdict: Runtime Error):
import sys                                                   
l1 = list(map(int, input().split()))                         
N = l1[0]                                                    
M = l1[1]                                                    
                                                             
dat = []                                                     
                                                             
per_dis = [ [] for n in range(N+1)]                          
                                                             
for n in range(M):                                           
    x = list(map(int, input().split()))                      
    dat.append(x)                                            
                                                             
def bfs(start, goal):                                        
    visited = []                                             
    unvisited = [(start, 0)]                                 
    while unvisited:                                         
        now = unvisited[0]                                   
        unvisited = unvisited[1:]                            
        for next in per_dis[now[0]]:                         
            if next[0] not in visited:                       
                if next[0] == goal:                          
                    return now[1] + next[1]                  
                unvisited.append((next[0], now[1] + next[1]))
                visited.append(next[0])                      
    return None                                              
                                                             
for x in dat:                                                
    tmp = bfs(x[0], x[1])                                    
    if None == tmp:                                          
        per_dis[x[0]].append((x[1],x[2]))                    
        per_dis[x[1]].append((x[0],-x[2]))                   
    elif  x[2] != tmp:                                       
        print("No")                                          
        break;                                               
else:                                                        
    print("Yes")                                             

Fixed submission:
a = int(input())   
b = int(input())   
c = int(input())   
                   
print((a-b)%c)
Buggy python submission (verdict: Time Limit Exceeded):
s = input()

ans = 0
temp = 0
for n, _ in enumerate(s):
    if s[n] == "A":
        for j, _ in enumerate(s[n:]):
            if s[n + j] == "Z":
                temp = j + 1
        ans = max(ans, temp)

print(ans)



Fixed submission:
s = input()

a = 0
for n, i in enumerate(reversed(s)):
    if i == "Z":
        a = len(s) - n
        break

b = 0
for n, i in enumerate(s):
    if i == "A":
        b = n
        break

print(a-b)
Buggy python submission (verdict: Runtime Error):
X = int(input())

if X = 3:
  print('YES')
elif X = 5:
  print('YES')
elif X = 7:
  print('YES')
else:
  print('NO')

Fixed submission:
X = int(input())

if X == 3 or X == 5 or X == 7:
  print('YES')
else:
  print('NO')

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

if X = 3 or X = 5 or X = 7:
  print('YES')
else:
  print('NO')

Fixed submission:
X = int(input())

if X == 3 or X == 5 or X == 7:
  print('YES')
else:
  print('NO')
Buggy python submission (verdict: Runtime Error):
S = input()
ans = 0

for i in range(len(S) - 2):
    A = abs(753 - int(S[i:i+3]))
    ans = min(A, ans)

print(B)

Fixed submission:
S = input()
B = 999
for i in range(len(S)-2):
    A = abs(753 - int(S[i:i+3]))
    B = min(A, B)
print(B)
Buggy python submission (verdict: Runtime Error):
x = int(input())
y = int(input())

print(x + y/2)


Fixed submission:
x,y = tuple(map(int,input().split()))

answer = int(x) + int(y)/2

print(int(answer))

Buggy python submission (verdict: Runtime Error):
x = int(input(x?\n))
y = int(input(y?\n))

print(x + y/2)


Fixed submission:
x,y = tuple(map(int,input().split()))

answer = int(x) + int(y)/2

print(int(answer))
Buggy python submission (verdict: Runtime Error):
# B

s = input() # 1行読み込む（文字列）

min = 999
i = 0
while i + 3 < s.length:
    t = s[i:i+3]
    n = int(t) - 753
    if n < 0:
        n = n - 1
    if min > n:
        min = n
    i = i + 1

print(min)


Fixed submission:
# B

s = input()

min = 999
i = 0
while i + 3 <= len(s):
    t = s[i:i+3]
    n = int(t) - 753
    if n < 0:
        n = -n
    if min > n:
        min = n
    i = i + 1

print(min)

Buggy python submission (verdict: Runtime Error):
# B

s = input() # 1行読み込む（文字列）

min = 999
i = 0
while i + 3 < s.length:
    t = s[i:i+3]
    n = int(t) - 753
    if n < 0:
        n = n - 1
    if min > n:
        min = n

print(min)


Fixed submission:
# B

s = input()

min = 999
i = 0
while i + 3 <= len(s):
    t = s[i:i+3]
    n = int(t) - 753
    if n < 0:
        n = -n
    if min > n:
        min = n
    i = i + 1

print(min)
Buggy python submission (verdict: Runtime Error):
takahashi_kun = X

if X == 3:
    print('YES')
elif X == 5:
    print('YES')
elif X == 7:
    print('YES')
else:
    print('NO')

Fixed submission:
takahashi_kun = int(input())

if takahashi_kun == 3:
    print('YES')
elif takahashi_kun == 5:
    print('YES')
elif takahashi_kun == 7:
    print('YES')
else:
    print('NO')
Buggy python submission (verdict: Runtime Error):
A, B, C, x = map(int, [input() for i in range(4)])
ans = [ _ for a in range(A+1) for b in range(B+1) for c in range(C+1) if a*500 + b*100+ c*50 == x ]
print(len(ans))

Fixed submission:
s = []
for i in range(4):
    s.append(int(input()))

count = 0
for a in range(s[0] + 1):
    for b in range(s[1] + 1):
        for c in range(s[2] + 1):
            if( a*500 + b*100 + c*50 == s[3] ):
                count = count + 1

print(count)

Buggy python submission (verdict: Runtime Error):
s = []
for i in range(4):
    s.append(int(input()))

count = 0
for a in range(s[0] + 1):
    for b in range(s[1] + 1):
        for c in range(s[2] + 1):
            if( a*500 + b*100 + c*50 == s[3] ):
                count = count + 1

print(ans)


Fixed submission:
s = []
for i in range(4):
    s.append(int(input()))

count = 0
for a in range(s[0] + 1):
    for b in range(s[1] + 1):
        for c in range(s[2] + 1):
            if( a*500 + b*100 + c*50 == s[3] ):
                count = count + 1

print(count)
Buggy python submission (verdict: Runtime Error):
    a=input()
    if len(a)==2:
        print(a)
    else:
        print(a[::-1])

Fixed submission:
a=input()
if len(a)==2:
    print(a)
else:
    print(a[::-1])
Buggy python submission (verdict: Runtime Error):
s = input()
nlen = len(s)
a = min([abs(int(s[i:i+3])-753) for i in range(nlen-2+1)])
print(a)


Fixed submission:
a = int(input())
if a==3 or a==5 or a==7:
	print("YES")
else:
	print("NO")

Buggy python submission (verdict: Runtime Error):
a = int(input())
if a==3 or a==5 or a==7:
	print("YES")
else:
	print("NO")
return

Fixed submission:
a = int(input())
if a==3 or a==5 or a==7:
	print("YES")
else:
	print("NO")