Buggy python submission (verdict: Runtime Error):
while True:
    (n, x) = [int(i) for i in input().split()]
    if n == x == 0:
        break
    print([1 if sum(i) == x else 0 for i in input.combinations(range(1, n + 1), 3)])

Fixed submission:
while True:
    n, x = [int(i) for i in input().split()]

    if n == x == 0:
        break

    count = 0
    for s in range(1, n - 1):
        for m in range(s + 1, n):
            for e in range(m + 1, n + 1):
                if x == sum([s, m, e]):
                    count += 1

    print(count)

Buggy python submission (verdict: Runtime Error):
while True:
    (n, x) = [int(i) for i in input().split()]
    if n == x == 0:
        break
    print([1 if sum(i) == x else 0 for i in input.combinations(range(1, n + 1), 3)])

Fixed submission:
while True:
    n, x = [int(i) for i in input().split()]

    if n == x == 0:
        break

    count = 0
    for s in range(1, n - 1):
        for m in range(s + 1, n):
            for e in range(m + 1, n + 1):
                if x == sum([s, m, e]):
                    count += 1

    print(count)

Buggy python submission (verdict: Runtime Error):
while True:
    (n, x) = [int(i) for i in input().split()]
    if n == x == 0:
        break
    print([1 if sum(n, x) == x else 0 for i in input.combinations(range(1, n + 1), 3)])

Fixed submission:
while True:
    n, x = [int(i) for i in input().split()]

    if n == x == 0:
        break

    count = 0
    for s in range(1, n - 1):
        for m in range(s + 1, n):
            for e in range(m + 1, n + 1):
                if x == sum([s, m, e]):
                    count += 1

    print(count)

Buggy python submission (verdict: Runtime Error):
while True:
    (n, x) = [int(i) for i in input().split()]
    if n == x == 0:
        break
    else:3 <= n < 100
    print([1 if sum(n, x) == x else 0 for i in input.combinations(range(1, n + 1), 3)])

Fixed submission:
while True:
    n, x = [int(i) for i in input().split()]

    if n == x == 0:
        break

    count = 0
    for s in range(1, n - 1):
        for m in range(s + 1, n):
            for e in range(m + 1, n + 1):
                if x == sum([s, m, e]):
                    count += 1

    print(count)

Buggy python submission (verdict: Runtime Error):
while True:
    (n, x) = [int(i) for i in input().split()]
    n = 3 < 100
    if n == x == 0:
        break
    print([1 if sum(n, x) == x else 0 for i in input.combinations(range(1, n + 1), 3)])

Fixed submission:
while True:
    n, x = [int(i) for i in input().split()]

    if n == x == 0:
        break

    count = 0
    for s in range(1, n - 1):
        for m in range(s + 1, n):
            for e in range(m + 1, n + 1):
                if x == sum([s, m, e]):
                    count += 1

    print(count)

Buggy python submission (verdict: Runtime Error):
while True:
    import itertools
    (n, x) = [int(i) for i in input().split()]
    if n == x == 0:
        break
    print([1 if sum(n, x) == x else 0 for i in itertools.combinations(range(1, n + 1), 3)])

Fixed submission:
while True:
    n, x = [int(i) for i in input().split()]

    if n == x == 0:
        break

    count = 0
    for s in range(1, n - 1):
        for m in range(s + 1, n):
            for e in range(m + 1, n + 1):
                if x == sum([s, m, e]):
                    count += 1

    print(count)

Buggy python submission (verdict: Runtime Error):
import itertools
while True:
    (n, x) = [int(i) for i in input().split()]
    if n == x == 0:
        break
    print([1 if sum() == x else 0 for i in itertools.combinations(range(1, n + 1), 3)])

Fixed submission:
while True:
    n, x = [int(i) for i in input().split()]

    if n == x == 0:
        break

    count = 0
    for s in range(1, n - 1):
        for m in range(s + 1, n):
            for e in range(m + 1, n + 1):
                if x == sum([s, m, e]):
                    count += 1

    print(count)

Buggy python submission (verdict: Runtime Error):
n, m, l = [int(i) for i in input().split()]

A = [input(range(n))]
B = [input(range(m))]
C = [[0] * 1 for n in range(n)]


for ni in range(n):
    A.append([int(i) for i in input().split()])
    C[n][m] = sum([A[n][l] * B[l][m] for m in range(l)])


for mi in range(m):
    B.append([int(i) for i in input().split()])

print(" ".join([str(v) for v in C]))

Fixed submission:
while True:
    n, x = [int(i) for i in input().split()]

    if n == x == 0:
        break

    count = 0
    for s in range(1, n - 1):
        for m in range(s + 1, n):
            for e in range(m + 1, n + 1):
                if x == sum([s, m, e]):
                    count += 1

    print(count)