The task:
For this natural n, calculate the sum of 1! +2! +3! + ... + n !. In solving this problem, you can use only one cycle. The use of math math library in this problem is prohibited.
n = int(input()) N = 1 sum = 0 for a in range(1, n+1): for b in range(1, a+1): N = N * b sum += N print(sum) However, my decision does not come out. Tell me how to solve it correctly?