Using a for loop, calculate and output the sum of 1+2+3+...+n1+2+3+...+n1+2+3+...+n.
Input n. For 100% of the data, 1≤n≤1001≤n≤1001≤n≤100.
The sum as described above.
10
55
Using your Hydro universal account