I was trying to get a series of sum from 1 to n, 2 to n, ..., and n
For example, if n=5, then the result should be 15 14 12 9 5
Please comment for the code below. I can't figure out what's wrong.
n=int(input())
sum=0
m=0
factorial=1for i in range(1, n + 1):factorial *= isum=factorial-mprint(sum)