import sys, math
for line in sys.stdin:
y1, y2 = 0, 0
n = int(line.strip())
for i in range(1,n+1):
if i%2==0:
y2 += math.factorial(i)
else:
y1 += math.factorial(i)
print(y1, y2)
KY229 阶乘
最新推荐文章于 2024-11-03 20:27:08 发布