seek 1+2+3+…+n Value .
Input includes an integer n.
Output one line , Include an integer , Express 1+2+3+…+n Value .
n = int(input())
print((n*(1+n))//2)
If you use for Cycle accumulation will run timeout
Use the summation formula of the arithmetic sequence , But be careful to use integral division //
Python Division in