Buggy python submission (verdict: Runtime Error):
x500 = int(input())
x100 = int(input())
x50 = int(input())
xxx = int(input())

i = 0
j = 0
k = 0


def judge(sum, xxx):
    sum = 500 * i + 100 * j + 50 * k
    return sum == xxx and sum <= 2000


count = 0
for i in range(x500):
    if judge(i, j, k):
        count += 1
    for j in range(x100):
        if judge(i, j, k):
            count += 1
        for k in range(x50):
            if judge(i, j, k):
                count += 1
print(count)


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):
x500 = int(input())
x100 = int(input())
x50 = int(input())
xxx = int(input())

i = 0
j = 0
k = 0

count = 0
for i in range(x500):
    if total(i, j, k) == xxx:
        count += 1
    for j in range(x100):
        if total(i, j, k) == xxx:
            count += 1
        for k in range(x50):
            if total(i, j, k) == xxx:
                count += 1
print(count)


def total(i, j, k):
    return 500 * i + 100 * j + 50 * k


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):
x500 = int(input())
x100 = int(input())
x50 = int(input())
xxx = int(input())

i = 0
j = 0
k = 0

count = 0
for i in range(x500):
    if total(i, j, k) == xxx:
        count += 1
    for j in range(x100):
        if total(i, j, k) == xxx:
            count += 1
        for k in range(x50):
            if total(i, j, k) == xxx:
                count += 1
print(count)


def total(i, j, k):
    return 500 * i + 100 * j + 50 * k

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):
x500 = int(input())
x100 = int(input())
x50 = int(input())
xxx = int(input())

i = 0
j = 0
k = 0

count = 0
for i in x500:
    if total(i, j, k) == xxx:
        count += 1
    for j in x100:
        if total(i, j, k) == xxx:
            count += 1
        for k in x50:
            if total(i, j, k) == xxx:
                count += 1
print(count)


def total(i, j, k):
    return 500 * i + 100 * j + 50 * k

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):
x500 = int(input())
x100 = int(input())
x50 = int(input())
xxx = int(input())

n500 = 0
n100 = 0
n50 = 0

count = 0
for i in x500:
    if total(i, j, k) == xxx:
        count += 1
    for j in x100:
        if total(i, j, k) == xxx:
            count += 1
        for k in x50:
            if total(i, j, k) == xxx:
                count += 1
print(count)


def total(i, j, k):
    return 500 * i + 100 * j + 50 * k

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)))