主模块代码如下:
n = int(input())
f = eval(input())
print(product(n, f))
n = int(input())
f = eval(input())
print(product(n, f))
def f(n):
return n
def product(n,f):
s = 1;
for i in range(1,n+1):
s *= f(i)
return s
n = int(input())
print(product(n,f))