Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
a = int(input())
 if a >= 1200:
    print("ARC");
else:
    print("ABC");

Fixed submission:
a = int(input())
 
if a >= 1200:
    print("ARC");
else:
    print("ABC");

Buggy python submission (verdict: Runtime Error):
a = int(input())
 if a >= 1200:
    print("ARC");
else:
    print("ABC");

Fixed submission:
a = int(input())
 
if a >= 1200:
    print("ARC");
else:
    print("ABC");
Buggy python submission (verdict: Time Limit Exceeded):
K, S = map(int, input().split())
count=0
for X in range(K+1):
    for Y in range(K+1):
        for Z in range(K+1):
            if X+Y+Z==S:
                count+=1
 
print (count)

Fixed submission:
K, S = map(int, input().split())
count=0
for X in range(K+1):
    for Y in range(K+1):
        Z=S-X-Y
        if 0<=Z<=K:
            count+=1
 
print (count)
Buggy python submission (verdict: Time Limit Exceeded):
x,y = map(int,input().split())

if x == y:
     print('-1')
elif y == 1:
     print('-1')
else:
     i = 2 
     while True:
          if x*i % y == 0:
               i += 1     
               continue
          else:
               print(x*i)
               break 

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


if x%y == 0:
     print('-1')
else:
     i = 2 
     while True:
          if x*i % y == 0:
               i += 1     
               continue
          else:
               print(x*i)
               break

Buggy python submission (verdict: Time Limit Exceeded):
x,y = map(int,input().split())

if x == y:
     print('-1')
else:
     i = 2 
     while True:
          if x*i % y == 0:
               i += 1     
               continue
          else:
               print(x*i)
               break 


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


if x%y == 0:
     print('-1')
else:
     i = 2 
     while True:
          if x*i % y == 0:
               i += 1     
               continue
          else:
               print(x*i)
               break

Buggy python submission (verdict: Time Limit Exceeded):
x,y = map(int,input().split())

if x == y:
     print('-1')
else:
     i = 2 
     while True:
          if x*i == y:
               i += 1     
               continue
          elif x*i % y == 0:
               i += 1     
               continue
          else:
               print(x*i)
               break 

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


if x%y == 0:
     print('-1')
else:
     i = 2 
     while True:
          if x*i % y == 0:
               i += 1     
               continue
          else:
               print(x*i)
               break

Buggy python submission (verdict: Time Limit Exceeded):
x,y = map(int,input().split())

if x == y:
     print('-1')
else:
     i = 2 
     while True:
          if x*i == y:
               i += 1     
               pass
          elif x*i % y == 0:
               i += 1     
               pass
          else:
               print(x*i)
               break 

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


if x%y == 0:
     print('-1')
else:
     i = 2 
     while True:
          if x*i % y == 0:
               i += 1     
               continue
          else:
               print(x*i)
               break
Buggy python submission (verdict: Runtime Error):
X,Y = input().spilit(' ')
if int(X,16) < int(Y,16):
    print("<")
elif int(X,16) > int(Y,16):
    print(">")
else:
    print("=")


Fixed submission:
X,Y = input().split(' ')
if int(X,16) < int(Y,16):
    print("<")
elif int(X,16) > int(Y,16):
    print(">")
else:
    print("=")
Buggy python submission (verdict: Runtime Error):
if "AC" in input() == True:
    print("Yes")
else:
    print("No")if "AC" in input() == True:

Fixed submission:
answer = "AC" in input()
if answer == False:
    print("No")
else:
    print("Yes")
Buggy python submission (verdict: Runtime Error):
N = int(input())
a = input().split()
b = []
for i in range(len(a)):
	if i % 2 == 1:
		b.insert(0, a[i])
	else:
		b.append(a[i])
if N % 2 == 1:
	b = b.reverse()
print(b)
line = " ".join(b)
print(line)

Fixed submission:
N = int(input())
a = input().split()
b = [""] * N
b1 = [a[i] for i in range(len(a)) if i % 2 == 1][::-1]
b2 = [a[i] for i in range(len(a)) if i % 2 == 0]
b = b1 + b2
if N % 2 == 1:
	b = b[::-1]
line = " ".join(b)
print(line)
Buggy python submission (verdict: Runtime Error):
N, K = map(int, input().split())
xyc = []
for i in range(N):
    tmp_x, tmp_y, tmp_c = input().split()
    xyc.append([int(tmp_x), int(tmp_y), tmp_c])

def check(sx, sy, K, x, y):
    x = x % (2*K)
    y = y % (2*K)
    if x < sx or x >= sx + K:
        if y < sy:
            return 'W'
        elif y < sy + K:
            return 'B'
        else:
            return 'W'
    #elif x >= sx and x < sx + K:
    else:
        if y < sy:
            return 'B'
        elif y < sy + K:
            return 'W'
        else:
            return 'B'


ans = 0
for sx in range(K+1):
    for sy in range(K+1):
        r = 0
        for i in range(N):
            if check(sx, sy, K, xyc[i][0], xyc[i][1]) == xyc[i][2]:
                r = r + 1
        ans = max(ans, r)
print(ans)

Fixed submission:
import sys
N = int(input())
t = [0]
x = [0]
y = [0]
for i in range(N):
    tmp_t, tmp_x, tmp_y = map(int, input().split())
    t.append(tmp_t)
    x.append(tmp_x)
    y.append(tmp_y)

    
def go(t, d):
    if t == d:
        return True
    elif t > d:
        if (t - d) % 2 == 0:
            return True
        else:
            return False
    else:
        return False
        


for i in range(N):
    delta_t = t[i+1] - t[i]
    distance = abs(x[i+1] - x[i]) + abs(y[i+1] - y[i])
    if go(delta_t, distance):
        continue
    else:
        print('No')
        sys.exit()
print('Yes')
Buggy python submission (verdict: Runtime Error):
import sys
s = input()
t = input()
l = len(t)
if t in s:
    print(s.replace('?', 'a'))
    sys.exit()
for i in range(len(s) - l + 1):
    m = -1
    f = True
    for j in range(l):
        if s[i:i+l][j] == '?' or s[i:i+l][j] == t[j]:
            pass
        else:
            f = False
    if f:
        m = i
if m < 0:
    print('UNRESTORABLE')
else:
    print((s[0:m] + t + s[m+l:]).replace('?', 'a'))


Fixed submission:
import sys
s = input()
t = input()
l = len(t)
if t in s:
    print(s.replace('?', 'a'))
    sys.exit()
m = -1
for i in range(len(s) - l + 1):
    f = True
    for j in range(l):
        if s[i:i+l][j] == '?' or s[i:i+l][j] == t[j]:
            pass
        else:
            f = False
    if f:
        m = i
if m < 0:
    print('UNRESTORABLE')
else:
    print((s[0:m] + t + s[m+l:]).replace('?', 'a'))

Buggy python submission (verdict: Runtime Error):
s = input()
t = input()
l = len(t)
for i in range(len(s) - l + 1):
    m = -1
    f = True
    for j in range(l):
        if s[i:i+l][j] == '?' or s[i:i+l][j] == t[j]:
            pass
        else:
            f = False
    if f:
        m = i
if m < 0:
    print('UNRESTORABLE')
else:
    print((s[0:m] + t + s[m+l:]).replace('?', 'a'))


Fixed submission:
import sys
s = input()
t = input()
l = len(t)
if t in s:
    print(s.replace('?', 'a'))
    sys.exit()
m = -1
for i in range(len(s) - l + 1):
    f = True
    for j in range(l):
        if s[i:i+l][j] == '?' or s[i:i+l][j] == t[j]:
            pass
        else:
            f = False
    if f:
        m = i
if m < 0:
    print('UNRESTORABLE')
else:
    print((s[0:m] + t + s[m+l:]).replace('?', 'a'))
Buggy python submission (verdict: Time Limit Exceeded):
import itertools

N = int(input())
A = map(int, input().split())
s = 0
for a, b, c, d in itertools.combinations(A, 4):
    l = [a, b, c, d]
    l = sorted(l)
    if l[0] == l[1] and l[2] == l[3]:
        s = max(s, l[0]*l[2])
print(s)

Fixed submission:
import itertools

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

num = dict()

for a in A:
    if a not in num:
        num[a] = 0
    num[a] += 1

m1 = 0
m2 = 0

for a in sorted(num.keys(), reverse=True):
    if num[a] >= 2:
        m1 = a
        num[a] = num[a] - 2
        break
for a in sorted(num.keys(), reverse=True):
    if num[a] >= 2:
        m2 = a
        num[a] = num[a] - 2
        break
print(m1*m2)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
N = int(input())
T = []
for i in range(N):
    T.append(int(input()))
T = sorted(T, reverse=True)
for i in range(1, 10**18//T[0] + 1):
    f = True
    for n in T[1:]:
        if i*T[0] % n != 0:
            f = False
            break
    if f:
        print(i*T[0])
        sys.exit()

Fixed submission:
def gcd(a, b):
    """最大公約数(Greatest Common divisor)を求める.

    ユークリッドの互除法の実装.
    ああああ

    Parameters
    ----------
    a : int
        自然数.
    b : int
        自然数.

    Returns
    -------
    int
        最大公約数
    """
    while b:
        a, b = b, a % b
    return a

def lcm(a, b):
    """最小公約数(least common multiple)を求める.

    Parameters
    ----------
    a : int
        自然数.
    b : int
        自然数.

    Returns
    -------
    int
        最小公倍数
    """
    return a * b // gcd(a, b)

N = int(input())
T = []
for i in range(N):
    T.append(int(input()))
ans = 1
for t in T:
    ans = lcm(ans, t)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
import sys
N, M = map(int, input().split())
routes = []
for i in range(M):
    a, b = map(int, input().split())
    routes.append([a, b])
m = []
for r in routes:
    if r[0] == 1:
        m.append(r[1])
for r in routes:
    if r[0] in m:
        if r[1] == N:
            print('POSSIBLE')
            sys.exit()
print('IMPOSSIBLE')

Fixed submission:
import sys
N, M = map(int, input().split())
m = set()
m2 = set()
for i in range(M):
    a, b = map(int, input().split())
    if a == 1:
        m.add(b)
    if b == N:
        m2.add(a)
for me in m:
    if me in m2:
        print('POSSIBLE')
        sys.exit()
print('IMPOSSIBLE')

Buggy python submission (verdict: Runtime Error):
    import sys
    N, M = map(int, input().split())
    routes = []
    for i in range(M):
        a, b = map(int, input().split())
        routes.append([a, b])
    m = []
    for r in routes:
        if r[0] == 1:
            m.append(r[1])
    for r in routes:
        if r[0] in m:
            if r[1] == N:
                print('POSSIBLE')
                sys.exit()
    print('IMPOSSIBLE')

Fixed submission:
import sys
N, M = map(int, input().split())
m = set()
m2 = set()
for i in range(M):
    a, b = map(int, input().split())
    if a == 1:
        m.add(b)
    if b == N:
        m2.add(a)
for me in m:
    if me in m2:
        print('POSSIBLE')
        sys.exit()
print('IMPOSSIBLE')
Buggy python submission (verdict: Runtime Error):
# -*- coding: utf-8 -*-
import math,sys

X,Y = map(int,input().split())

print(math.ceil((math.log(Y,10)-math.log(X,10))/math.log(2,10)))


Fixed submission:
# -*- coding: utf-8 -*-
A,B,C,D = map(int,input().split(' '))

if A+B > C+D:
    print('Left')
elif A+B is C+D:
    print('Balanced')
else:
    print('Right')
Buggy python submission (verdict: Runtime Error):
import sys

a = int(sys.argv[1])
b = int(sys.argv[2])
c = int(sys.argv[3])

if b-a is c-b:
    print("Yes")
else:
    print("No")


Fixed submission:
import sys

x = sys.stdin.readline().strip().split(" ")

if int(x[1])-int(x[0]) == int(x[2])-int(x[1]):
    print("YES")
else:
    print("NO")
Buggy python submission (verdict: Runtime Error):
import sys

input = [sys.argv[1],sys.argv[2]]

result = ""
n = len(input[1])
for i in range(0,n):
	result = result + input[0][i] + input[1][i]

if len(input[0])>n:
	result = result + input[0][-1]

print(result)


Fixed submission:
import sys

x = sys.stdin.readline().strip()
y = sys.stdin.readline().strip()

result = ""
n = len(y)
for i in range(0,n):
	result = result + x[i] + y[i]

if len(x)>n:
	result = result + x[-1]

print(result)

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

input = sys.argv[1].strip().split("\n")
result = ""
n = len(input[1])
for i in range(0,n):
	result = result + input[0][i] + input[1][i]

if len(input[0])>n:
	result = result + input[0][-1]

print(result)


Fixed submission:
import sys

x = sys.stdin.readline().strip()
y = sys.stdin.readline().strip()

result = ""
n = len(y)
for i in range(0,n):
	result = result + x[i] + y[i]

if len(x)>n:
	result = result + x[-1]

print(result)
Buggy python submission (verdict: Runtime Error):
def func() :
    n,m=map(int,input().split())
    a={}
    for i in range(n) :
        s = input()
        for c in list(s):
            if c in a:
                a[c]+=1
            else :
                a[c] = 1
    c1=n*m%2
    d1=sum(filter(lambda x : x%2 , a.values()))
    if c1 < d1:
        print('No')
        return
    c4 = (n//2*2)*(m//2*2)
    d4 = sum(filter(lambda x : x//4*4 , a.values()))
    if c4>d4 :
        print('No')
        return
    print('Yes')
func()

Fixed submission:
def func() :
    s=input()
    if len(s) >= len('YAKI') :
        if s[:4] == 'YAKI' :
            print('Yes')
            return
    print('No')
func()
Buggy python submission (verdict: Runtime Error):
#include <iostream>
#include <vector>
#include <string>
#include <map>

using namespace std;

int main() {
	int h,w;
	cin >> h >> w;
	map<char,int> cnt;
	for(int i = 0; i < h; i++) {
		string s;
		cin >> s;
		for(char c : s) cnt[c]++;
	}
	int c1 = 0;
	int c2 = 0;
	for(auto x : cnt) {
		if(x.second % 2) c1 ++;
		c2 += x.second / 4 * 4;
	}
	if(c1 != (h*w)%2 || c2 < (h/2*2)*(w/2*2) ) cout << "No" << endl;
	else cout << "Yes" << endl;
	return 0;
}



Fixed submission:
def func() :
    n,m=map(int,input().split())
    a={}
    for i in range(n) :
        s = input()
        for c in list(s):
            if c in a:
                a[c]+=1
            else :
                a[c] = 1
    c1=sum(map(lambda x : x%2 , a.values()))
    c2=sum(map(lambda x : x//4*4, a.values()))
    if c1 != n*m%2 or c2 < (n//2*2)*(m//2*2) :
        print('No')
    else :
        print('Yes')
func()
Buggy python submission (verdict: Runtime Error):
n=int(raw_input())
tr=[[] for i in range(n)]
for i in range(n-1) :
  a,b,c=map(int,raw_input().split())
  a -= 1
  b -= 1
  tr[a].append((b,c))
  tr[b].append((a,c))
m,k=map(int,raw_input().split())
k -= 1
dis=[0 for i in range(n)]
def dfs(u,w=-1,l=0) :
  dis[u]=l
  for v,v1 in tr[u] :
    if v!=w :
      dfs(v,u,l+v1)
dfs(k)
for i in range(m) :
  x,y=map(int,raw_input().split())
  x-=1
  y-=1
  print dis[x]+dis[y]


Fixed submission:
import sys  
sys.setrecursionlimit(200000)
n=int(raw_input())
tr=[[] for i in range(n)]
for i in range(n-1) :
  a,b,c=map(int,raw_input().split())
  a -= 1
  b -= 1
  tr[a].append((b,c))
  tr[b].append((a,c))
m,k=map(int,raw_input().split())
k -= 1
dis=[0 for i in range(n)]
def dfs(u,w=-1,l=0) :
  dis[u]=l
  for v,v1 in tr[u] :
    if v!=w :
      dfs(v,u,l+v1)
dfs(k)
for i in range(m) :
  x,y=map(int,raw_input().split())
  x-=1
  y-=1
  print dis[x]+dis[y]
Buggy python submission (verdict: Runtime Error):
N = int(input())
candies_i = list(map(int, input().split()))
candies_j = list(map(int, input().split()))

l = []
count = 0

for i in range(N):
    count+=1
    total_li = sum(candies_i[:count])
    total_lj = sum(candies_j[+=1:])
    total = total_li + total_lj
    l.append(total)

print(max(l))


Fixed submission:
N = int(input())
candies_i = list(map(int, input().split()))
candies_j = list(map(int, input().split()))

l = []

for i in range(N):
    total_li = sum(candies_i[:i+1])
    total_lj = sum(candies_j[i:])
    total = total_li + total_lj
    l.append(total)

print(max(l))

Buggy python submission (verdict: Runtime Error):
N = int(input())
candies_i = list(map(int, input().split()))
candies_j = list(map(int, input().split()))

l = []

for i in range(N):
    total_li = sum(candies_i[:+=1])
    total_lj = sum(candies_j[+=1:])
    total = total_li + total_lj
    l.append(total)

print(max(l))


Fixed submission:
N = int(input())
candies_i = list(map(int, input().split()))
candies_j = list(map(int, input().split()))

l = []

for i in range(N):
    total_li = sum(candies_i[:i+1])
    total_lj = sum(candies_j[i:])
    total = total_li + total_lj
    l.append(total)

print(max(l))

Buggy python submission (verdict: Runtime Error):
N = int(input())
candies_i = list(map(int, input().split()))
candies_j = list(map(int, input().split()))

l = []

for i range(N):
    total_li = sum(candies_i[:i])
    total_lj = sum(candies_j[i:])
    total = ( total_li + total_lj )
    l.append(total)

print(max(l))


Fixed submission:
N = int(input())
candies_i = list(map(int, input().split()))
candies_j = list(map(int, input().split()))

l = []

for i in range(N):
    total_li = sum(candies_i[:i+1])
    total_lj = sum(candies_j[i:])
    total = total_li + total_lj
    l.append(total)

print(max(l))
Buggy python submission (verdict: Runtime Error):
from typing import List


def input_nums() -> List[int]:
    return list(map(int, open(0)))


def calc_nums(l: List[int]) -> int:
    x, a, b = l
    return (x - a) % b


def main() -> None:
    print(calc_nums(input_nums()))


if __name__ == '__main__':
    main()

Fixed submission:
#from typing import List


def input_nums():
    # type: () -> List[int]
    return list(map(int, open(0)))


def calc_nums(l):
    # type: (List[int]) -> int
    x, a, b = l
    return (x - a) % b


def main():
    # type () -> None:
    print(calc_nums(input_nums()))


if __name__ == '__main__':
    main()
Buggy python submission (verdict: Runtime Error):
A,B,C,X=[int(input()) for i in range(4)]
print(sum(500*a+100*b+50*c==X for a in range(A+1) for b in range(B+1) for c in range (c+1)))

Fixed submission:
A,B,C,X=[int(input()) for i in range(4)]
print(sum(500*a+100*b+50*c==X for a in range(A+1) for b in range(B+1) for c in range (C+1)))
Buggy python submission (verdict: Runtime Error):
a,b=map(int,input().split())
print("Even"ifa*b%2==0else"Odd")

Fixed submission:
a,b=map(int,input().split())
print("Even" if a*b %2==0 else"Odd")
Buggy python submission (verdict: Runtime Error):
S1,S2,S3=map(input().split())
print(input().count("1"))


Fixed submission:
print(input().count("1"))

Buggy python submission (verdict: Runtime Error):
S1,S2,S3=map(input().split())
print(count"1")

Fixed submission:
print(input().count("1"))
Buggy python submission (verdict: Runtime Error):
import math
a, b = input().split()
c = int(a + b)

if (int)math.sqrt(c) - math.sqrt(c) == 0:
    print("Yes")
else:
    print("No")

Fixed submission:
a, b = map(int, input().split())
if (a*b) % 2:
    print("Odd")
else:
    print("Even")
Buggy python submission (verdict: Runtime Error):
import math
a, b = input().split()
c = int(a + b)

if (int)math.sqrt(c) - math.sqrt(c) == 0:
    print('Yes')
else:
    print('No')

Fixed submission:
import math
a, b = input().split()
c = int(a + b)

if int(math.sqrt(c)) - math.sqrt(c) == 0:
    print('Yes')
else:
    print('No')
Buggy python submission (verdict: Runtime Error):
import math
n = int(input())
a = list(map(int, input().split()))
mini = float(inf)
for i in a:
    mini = min(mini, len(bin(i)) - bin(i).rfind("1") - 1)
print(round(mini))

Fixed submission:
import math
n = input()
a = list(map(int, input().split()))
ans = float("inf")
for i in a:
    ans = min(ans, len(bin(i)) - bin(i).rfind("1") - 1)
print(round(ans))
Buggy python submission (verdict: Runtime Error):
A, B, C, X = [list(map(input() for i in range(4)))]

print(sum(500*a + 100*b + 50*c == X for a in range(A + 1) for b in range(b + 1) for c in range(c + 1)))

Fixed submission:
A, B, C, X = [int(input()) for i in range(4)]

print(sum(500*a + 100*b + 50*c == X for a in range(A + 1) for b in range(B + 1) for c in range(C + 1)))
Buggy python submission (verdict: Runtime Error):
a, b = int(input())

if (a*b) % 2:
  print('Even')
else:
  print('Odd')

Fixed submission:
a, b = map(int, input().split())
 
if (a*b) % 2 :
  print('Odd')
else:
  print('Even')

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

if a%b == 0:
  print('Even')
else:
  print('Odd')

Fixed submission:
a, b = map(int, input().split())
 
if (a*b) % 2 :
  print('Odd')
else:
  print('Even')

Buggy python submission (verdict: Runtime Error):
a,b = (int(x) for x in input().split())
c = a * b
if c/2 % 0:
    print("Even")
else:
    print("Odd")



Fixed submission:
a,b = (int(x) for x in input().split())
c = a * b
if c%2 !=0:
    print("Odd")
else:
    print("Even")

Buggy python submission (verdict: Runtime Error):
a, b = int(input()).split()
c = a * b
if c/2 == 0:
    print("Even")
else:
    print("Odd")

Fixed submission:
a,b = (int(x) for x in input().split())
c = a * b
if c%2 !=0:
    print("Odd")
else:
    print("Even")
Buggy python submission (verdict: Runtime Error):
A,B,C,X=[int(input()) for i in range(4)]
cnt = 0
for a in range(0,A+1):
    Y = X - 500*a
    if Y==0:
        cnt += 1
        continue
    elif Y<0:
        break
    for b in range(0,B+1):
        Z = Y - 100*b
        if Z==0:
            cnt += 1
            continue
        elif Z<0:
            break
        if W%50 == 0:
            cnt += 1
print(cnt)

Fixed submission:
a,b,c,X=[int(input()) for i in range(4)]
print([500*x+100*y+50*z for z in range(c+1) for y in range(b+1) for x in range(a+1)].count(X))

Buggy python submission (verdict: Runtime Error):
A,B,C,X=[int(input()) for i in range(4)]
cnt = 0
for a in range(0,A+1):
    Y = X - 500*a
    if Y==0:
        cnt += 1
        continue
    elif Y<0:
        continue
    for b in range(0,B+1):
        Z = Y - 100*b
        if Z==0:
            cnt += 1
            continue
        elif Z<0:
            continue
        if W == 0:
            cnt += 1
print(cnt)

Fixed submission:
a,b,c,X=[int(input()) for i in range(4)]
print([500*x+100*y+50*z for z in range(c+1) for y in range(b+1) for x in range(a+1)].count(X))

Buggy python submission (verdict: Runtime Error):
A,B,C,X=[int(input()) for i in range(4)]
for a in range(1,A+1):
    Y = X - 500*a
    for b in range(1,B+1):
        Z = Y - 100*b
        for c in range(1,C+1):
            W = Z - 50*c
            if W == 0:
                cnt += 1
print(cnt)

Fixed submission:
a,b,c,X=[int(input()) for i in range(4)]
print([500*x+100*y+50*z for z in range(c+1) for y in range(b+1) for x in range(a+1)].count(X))

Buggy python submission (verdict: Runtime Error):
a,b,c,X=[int(input()) for i in range(4)]
for a in range(1,A+1):
    Y = X - 500*a
    for b in range(1,B+1):
        Z = Y - 100*b
        for c in range(1,C+1):
            W = Z - 50*c
            if W == 0:
                cnt += 1
print(cnt)

Fixed submission:
a,b,c,X=[int(input()) for i in range(4)]
print([500*x+100*y+50*z for z in range(c+1) for y in range(b+1) for x in range(a+1)].count(X))
Buggy python submission (verdict: Runtime Error):
def keta_sum(x):
    sum = 0
    while x%10 !=0:
        sum += x%10
        x = x//10
    return(sum)

cnt=0
total=0
for x in range(1,N+1):
    y = keta_sum(x)
    if A<=y<=B:
        cnt +=1
        total +=x 
            
print(total)

Fixed submission:
n,a,b=map(int,input().split())
print(sum(i for i in range(n+1) if a<=sum(map(int,str(i)))<=b))