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):
    if x + y > s:
      break
    a = s - x - y
    if a >= 0 and a <= k:
      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):
    a = s - x - y
    if a >= 0 and a <= k:
      count += 1

print(count)

Buggy python submission (verdict: Runtime Error):
k,s = map(int,input().split())

count = 0
for x in range(k+1):
  for y in range(k+1):
    if x + y > s:
      break
    a = s - x - y
    if a >= 0 && a <= k:
      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):
    a = s - x - y
    if a >= 0 and a <= k:
      count += 1

print(count)

Buggy python submission (verdict: Runtime Error):
k,s = map(int,input().split())

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

print(count)

Fixed submission:
k,s = map(int,input().split())

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

print(count)

Buggy python submission (verdict: Runtime Error):
k,s = map(int,input().split())

count = 0
for x in range(k+1):
  a = s-k-x
  a = 0 if a < 0
  for y in range(a,k+1):
    if x + y > s:
      break
    for z in num:
      if x + y + z == s:
        count += 1
      elif x + y + z > s:
        break

print(count)

Fixed submission:
k,s = map(int,input().split())

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

print(count)

Buggy python submission (verdict: Runtime Error):
k,s = map(int,input().split())

count = 0
for x in range(k+1):
  a = s-k-x
  a = 0 if a < 0 else a
  for y in range(a,k+1):
    if x + y > s:
      break
    for z in num:
      if x + y + z == s:
        count += 1
      elif x + y + z > s:
        break

print(count)

Fixed submission:
k,s = map(int,input().split())

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

print(count)

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

count = 0
num = range(k+1)
for x in num:
  for y in num:
    if x + y > s:
      break
    for z in num:
      if x + y + z == s:
        count += 1
      elif x + y + z > s:
        break

print(count)

Fixed submission:
k,s = map(int,input().split())

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

print(count)

Buggy python submission (verdict: Runtime Error):
k,s = map(int,input().split())

count = 0
num = range(k+1)
for x in num:
  for y in num:
    if x + Y > s:
      break:
    for z in num:
      if x + y + z == s:
        count += 1
      elif x + y + z > s:
        break:

print(count)

Fixed submission:
k,s = map(int,input().split())

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

print(count)

Buggy python submission (verdict: Runtime Error):
k,s = map(int,input().split())

count = 0
num = range(k+1)
for x in num:
  for y in num:
    if x + Y > s:
      break
    for z in num:
      if x + y + z == s:
        count += 1
      elif x + y + z > s:
        break

print(count)

Fixed submission:
k,s = map(int,input().split())

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

print(count)

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

count = 0
num = range(k+1)
for x in num:
  for y in num:
    for z in num:
      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):
    a = s - x - y
    if a >= 0 and a <= k:
      count += 1

print(count)

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):
    a = s - x - y
    if a >= 0 and a <= k:
      count += 1

print(count)

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):
    a = s - x - y
    if a >= 0 and a <= k:
      count += 1

print(count)