第4章-5 求e的近似值 a = 1 tot = 1 n = int(input()) for i in range(1, n + 1): a *= i t = 1 / a tot += t print("{:.8f}".format(tot))