-->
当前位置:首页 > 题库

PROGRAMMING:Sum 1 to n

Luz5年前 (2021-05-10)题库424
This problem requires programming to calculate the sum of the first $$n $$items of sequence 1 + 2 + 3 +.
###Input format:
Input gives a positive integer $$n $$on a line.
###Output format:
In one line, output the value of the partial sum of $$s $$in the format of "sum = s". Note that there is a space on the left and right of the equal sign. The topic guarantees that the calculation result does not exceed the range of long integers.
###Input example:
```in
one hundred
```
###Output example:
```out
sum = 5050
```







answer:If there is no answer, please comment