[Login|Register]
Problems

Status

Rank

Problem 1311
Sum
Time Limit: 1000ms
Memory Limit: 65536kb
Description
Your task is to find the sum of all integer numbers lying between 1 and N inclusive
Input
The input consists of a single integer N that is not greater than 10000 by it's absolute value.
Output
Write a single integer number that is the sum of all integer numbers lying between 1 and Ninclusive.
Sample Input
-3
3
2
Sample Output
-5
6
3
Hint
有多组测试实例。可通过scanf("%d",&n)==EOF检测是否已无测试实例。
University of Science and Technology of China
Online Judge for ACM/ICPC
Processed in 0.7ms with 1 query(s).