Buggy python submission (verdict: Runtime Error):
import itertools

n, a, b = map(int, input().split())

candidate = list(range(a, b+1, 1))
if n == 1:
    if a == b:
        print(1)
    else:
        print(0)
elif n == 2:
    print(1)
elif n >= 3:
    if a > b:
        print(0)
    else:
        smin = a * n + (b-a)
        smax = b * n - (b-a)
        print(smax-smin+1)

Fixed submission:
import itertools

n, a, b = map(int, input().split())

if n == 1:
    if a == b:
        print(1)
    else:
        print(0)
elif n == 2:
    print(1)
elif n >= 3:
    if a > b:
        print(0)
    else:
        smin = a * n + (b-a)
        smax = b * n - (b-a)
        print(smax-smin+1)

Buggy python submission (verdict: Runtime Error):
import itertools

n, a, b = map(int, input().split())

candidate = list(range(a, b+1, 1))
if n == 1:
    if a == b:
        print(1)
    else:
        print(0)
elif n == 2:
    print(1)
elif n >= 3:
    smin = a * n + (b-a)
    smax = b * n - (b-a)
    print(smax-smin+1)

Fixed submission:
import itertools

n, a, b = map(int, input().split())

if n == 1:
    if a == b:
        print(1)
    else:
        print(0)
elif n == 2:
    print(1)
elif n >= 3:
    if a > b:
        print(0)
    else:
        smin = a * n + (b-a)
        smax = b * n - (b-a)
        print(smax-smin+1)

Buggy python submission (verdict: Runtime Error):
import itertools

n, a, b = map(int, input().split())

candidate = list(range(a, b+1, 1))
if n == 1:
    if a == b:
        print(1)
    else:
        print(0)
elif n == 2:
    print(1)
elif n >= 3:

    smin = a * n + (b-a)
    smax = b * n - (b-a)
    sl = list(range(smin, smax+1, 1))
    print(len(sl))

Fixed submission:
import itertools

n, a, b = map(int, input().split())

if n == 1:
    if a == b:
        print(1)
    else:
        print(0)
elif n == 2:
    print(1)
elif n >= 3:
    if a > b:
        print(0)
    else:
        smin = a * n + (b-a)
        smax = b * n - (b-a)
        print(smax-smin+1)

Buggy python submission (verdict: Runtime Error):
import itertools

n, a, b = map(int, input().split())

candidate = list(range(a, b+1, 1))
if n == 1:
    if a == b:
        print(1)
    else:
        print(0)
elif n == 2:
    print(a)
elif n >= 3:
    c = list(itertools.combinations_with_replacement(candidate, n-2))
    suml = []
    for i in c:
        suml.append(sum(i) + 4 + 6)
    sum_set = set(suml)
    print(len(sum_set))

Fixed submission:
import itertools

n, a, b = map(int, input().split())

if n == 1:
    if a == b:
        print(1)
    else:
        print(0)
elif n == 2:
    print(1)
elif n >= 3:
    if a > b:
        print(0)
    else:
        smin = a * n + (b-a)
        smax = b * n - (b-a)
        print(smax-smin+1)

Buggy python submission (verdict: Runtime Error):
import itertools

n, a, b = map(int, input().split())

candidate = list(range(a, b+1, 1))
if n == 1:
    if a == b:
        print(a)
    else:
        print(0)
elif n == 2:
    print(a)
elif n >= 3:
    c = list(itertools.combinations_with_replacement(candidate, n-2))
    suml = []
    for i in c:
        suml.append(sum(i) + 4 + 6)
    sum_set = set(suml)
    print(len(sum_set))

Fixed submission:
import itertools

n, a, b = map(int, input().split())

if n == 1:
    if a == b:
        print(1)
    else:
        print(0)
elif n == 2:
    print(1)
elif n >= 3:
    if a > b:
        print(0)
    else:
        smin = a * n + (b-a)
        smax = b * n - (b-a)
        print(smax-smin+1)

Buggy python submission (verdict: Runtime Error):
import itertools

n, a, b = map(int, input().split())

candidate = list(range(a, b+1, 1))
if n == 1:
    print(0)
elif n == 2:
    print(a)
elif n >= 3:
    c = list(itertools.combinations_with_replacement(candidate, n-2))
    suml = []
    for i in c:
        suml.append(sum(i) + 4 + 6)
    sum_set = set(suml)
    print(len(sum_set))

Fixed submission:
import itertools

n, a, b = map(int, input().split())

if n == 1:
    if a == b:
        print(1)
    else:
        print(0)
elif n == 2:
    print(1)
elif n >= 3:
    if a > b:
        print(0)
    else:
        smin = a * n + (b-a)
        smax = b * n - (b-a)
        print(smax-smin+1)

Buggy python submission (verdict: Runtime Error):
import itertools

n, a, b = map(int, input().split())

candidate = list(range(a, b+1, 1))
c = list(itertools.combinations_with_replacement(candidate, n))
suml = []
for i in c:
    if min(i) == a and max(i) == b:
        suml.append(sum(i))
sum_set = set(suml)
print(len(sum_set))

Fixed submission:
import itertools

n, a, b = map(int, input().split())

if n == 1:
    if a == b:
        print(1)
    else:
        print(0)
elif n == 2:
    print(1)
elif n >= 3:
    if a > b:
        print(0)
    else:
        smin = a * n + (b-a)
        smax = b * n - (b-a)
        print(smax-smin+1)