Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
import sys

x = [[int(i) for i in input().split()] for j in range(1)]
k = x[0][0]
s = x[0][1]


#k = 5
#s = 15

count = 0
for x in range(k+1):
    if x == s:
        count = count + 1
        break
    for y in range(k+1):
        if s == x + y:
            count = count + 1
            break
        for z in range(k+1):
            if s <= k + x + y:
                count = count + 1
                break
print(count)


Fixed submission:
import numpy as np
import sys

x = [[int(i) for i in input().split()] for j in range(1)]
k = x[0][0]
s = x[0][1]


#k = 5
#s = 14

count = 0
for x in range(k+1):
    for y in range(k+1):
        z = s - x - y
        if z <= k and 0 <= z:
            count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
import numpy as np
import sys

x = [[int(i) for i in input().split()] for j in range(1)]
k = x[0][0]
s = x[0][1]


#k = 5
#s = 15

count = 0
for x in range(k+1):
    if x = s:
        count = count + 1
        break
    for y in range(k+1):
        if s < x + y:
            break
        if x + y = s:
            count = count + 1
            break
        for z in range(k+1):
            if s - x - y < k:
                count = count + 1
                break
print(count)


Fixed submission:
import numpy as np
import sys

x = [[int(i) for i in input().split()] for j in range(1)]
k = x[0][0]
s = x[0][1]


#k = 5
#s = 14

count = 0
for x in range(k+1):
    for y in range(k+1):
        z = s - x - y
        if z <= k and 0 <= z:
            count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
import numpy as np
import sys

x = [[int(i) for i in input().split()] for j in range(1)]
k = x[0][0]
s = x[0][1]


#k = 5
#s = 15

count = 0
for x in range(k+1):
    if x = s:
        count = count + 1
        break
    for y in range(k+1):
        if s < x + y:
            break
        if x + y = s:
            count = count + 1
            break
        for z in range(k+1):
            if s - x - y < k:
                count = count + 1
                break
print(count)


Fixed submission:
import numpy as np
import sys

x = [[int(i) for i in input().split()] for j in range(1)]
k = x[0][0]
s = x[0][1]


#k = 5
#s = 14

count = 0
for x in range(k+1):
    for y in range(k+1):
        z = s - x - y
        if z <= k and 0 <= z:
            count += 1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
import sys

x = [[int(i) for i in input().split()] for j in range(1)]
k = x[0][0]
s = x[0][1]


#k = 5
#s = 15

count = 0
for x in range(k+1):
    if s < x:
        break
    for y in range(k+1):
        if s < x + y:
            break
        if x + 2*k < s:
            break
        for z in range(k+1):
            if x + y + z == s:
                count = count + 1
                break
            if x + y + k < s:
                break

print(count)


Fixed submission:
import numpy as np
import sys

x = [[int(i) for i in input().split()] for j in range(1)]
k = x[0][0]
s = x[0][1]


#k = 5
#s = 14

count = 0
for x in range(k+1):
    for y in range(k+1):
        z = s - x - y
        if z <= k and 0 <= z:
            count += 1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
import sys

x = [[int(i) for i in input().split()] for j in range(1)]
k = x[0][0]
s = x[0][1]


#k = 5
#s = 15

count = 0
for x in range(k+1):
    if s < x:
        break
    for y in range(k+1):
        if s < x + y:
            break
        for z in range(k+1):
            if x + y + z == s:
                count = count + 1
                break
print(count)


Fixed submission:
import numpy as np
import sys

x = [[int(i) for i in input().split()] for j in range(1)]
k = x[0][0]
s = x[0][1]


#k = 5
#s = 14

count = 0
for x in range(k+1):
    for y in range(k+1):
        z = s - x - y
        if z <= k and 0 <= z:
            count += 1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
import numpy as np
import sys

x = [[int(i) for i in input().split()] for j in range(1)]
k = x[0][0]
s = x[0][1]


#k = 5
#s = 15

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 = count + 1
                break
print(count)


Fixed submission:
import numpy as np
import sys

x = [[int(i) for i in input().split()] for j in range(1)]
k = x[0][0]
s = x[0][1]


#k = 5
#s = 14

count = 0
for x in range(k+1):
    for y in range(k+1):
        z = s - x - y
        if z <= k and 0 <= z:
            count += 1
print(count)

Buggy python submission (verdict: Runtime Error):
import numpy as np
import sys

x = [[int(i) for i in input().split()] for j in range(1)]
k = x[0]
s = x[1]

#k = 5
#s = 15

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 = count + 1
                break
print(count)


Fixed submission:
import numpy as np
import sys

x = [[int(i) for i in input().split()] for j in range(1)]
k = x[0][0]
s = x[0][1]


#k = 5
#s = 14

count = 0
for x in range(k+1):
    for y in range(k+1):
        z = s - x - y
        if z <= k and 0 <= z:
            count += 1
print(count)

Buggy python submission (verdict: Time Limit Exceeded):
k,s = map(int,input().split())
r=0
for x in range(k+1):
    for y in range(k+1):
        for z in range(k+1):
            if x+y+z==s:
                r+=1
print(r)

Fixed submission:
k,s = map(int,input().split())
r=0
for x in range(k+1):
    for y in range(k+1):
        z=s-x-y
        if 0<=z<=k:
            r+=1
print(r)