a)
input_value = int(input("Введите n:"))
result = 1
if input_value % 2 == 0:
for element in range(2, input_value + 2, 2):
result *= element
else:
for element in range(1, input_value + 2, 2):
result *= element
print(result)
b)
input_value = int(input("Введите n:"))
result = 1
if input_value % 2 == 0:
for element in range(2, input_value + 2, 2):
result *= element
else:
for element in range(1, input_value + 2, 2):
result *= element
if (input_value + 1) % 2 == 0:
result *= 1
else:
result *= -1
print(result)