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

3 <= n <= 100

if n == x == 0:
    break

for a in range(n):
    for b in range(a):
        for c in range(b):
             a + b + c == x
             return

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, x = [int(i) i in input().split()]

3 <= n <= 100

if n == x == 0:
    break

for a in range(n):
    for b in range(a):
        for c in range(b):
             a + b + c == x
             return
print()

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, x = [int(i) i in input().split()]

3 <= n <= 100

if n == x == 0:
    break

for a in range(n+1):
    for b in range(a):
        for c in range(b):
             a + b + c == x
             return
print()

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, x = [int(i) i in input().split()]

3 <= n <= 100

if n == x == 0:
    break

for a in range(n+1):
    for b in range(a+1):
        for c in range(b+1):
             a + b + c == x
             return
print()

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, x = [int(i) i in input().split()]

3 <= n <= 100

if n == x == 0:
    break

for a in range(n+1):
    for b in range(a+1):
        for c in range(b+1):
             if a == b == c or a == b or a == c or b == c:
             None
             elif a + b + c == x:
             return
             else:
             None
print()

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, x = [int(i) i in input().split()]

3 <= n <= 100

if n == x == 0:
    break

for a in range(n+1):
    for b in range(a+1):
        for c in range(b+1):
             if a == b == c or a == b or a == c or b == c:
             None
             if a + b + c == x:
             return
             else:
             None
print()

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, x = [int(i) for i in input().split()]

3 <= n <= 100

if n == x == 0:
    break

for a in range(n+1):
    for b in range(a+1):
        for c in range(b+1):
             if a == b == c or a == b or a == c or b == c:
             None
             if a + b + c == x:
             return
             else:
             None
print()

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, x = [int(i) for i in input().split()]

3 <= n <= 100

if n == x == 0:
    break

for a in range(1, n+1):
    for b in range(1, a+1):
        for c in range(1, b+1):
             if a == b == c or a == b or a == c or b == c:
             None
             if a + b + c == x:
             return
             else:
             None
print()

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, x = [int(i) for i in input().split()]

3 <= n <= 100

if n == x == 0:
    break

for a in range(1, n+1):
    for b in range(1, a+1):
        for c in range(1, b+1):
             if a == b == c or a == b or a == c or b == c:
             None
             if a + b + c == x:
             return
             else:
             None
print()

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, x = [int(i) for i in input().split()]

3 <= n <= 100

if n == x == 0:
    break

for a in range(1, n+1):
    for b in range(1, a+1):
        for c in range(1, b+1):
             if a == b == c or a == b or a == c or b == c:
             None
             if a + b + c == x:
             return
             else:
             None
print()

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, x = [int(i) for i in input().split()]

3 <= n <= 100

if n == x == 0:
    break

for a in range(1, n+1):
    for b in range(1, a):
        for c in range(1, b-1):
             if a == b == c or a == b or a == c or b == c:
             None
             if a + b + c == x:
             return
             else:
             None
print()

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, x = [int(i) for i in input().split()]

3 <= n <= 100

if n == x == 0:
    break

for a in range(1, n+1):
    for b in range(1, a):
        for c in range(1, b-1):
             if a == b == c or a == b or a == c or b == c:
               None
             if a + b + c == x:
               return
             else:
               None
print()

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

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

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

    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)

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)