P5722 [Deep Basics 4. Example 11] Sum of a Sequence
Description
Compute the value of $1+2+3+\cdots+(n-1)+n$, where the positive integer $n$ is no more than 100. Since you are not as smart as Gauss, you are not allowed to use the arithmetic sequence sum formula to get the answer directly.
Input Format
Input a positive integer $n$.
Output Format
Output a positive integer representing the final sum.
Explanation/Hint
Constraints: $1 \leq n \leq 100$.
Translated by ChatGPT 5