题目:
描述:
Hey, welcome to HDOJ(Hangzhou Dianzi University Online Judge).
In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + ... + n.输入:
The input will consist of a series of integers n, one integer per line.
输出:
For each case, output SUM(n) in one line, followed by a blank line. You may assume the result will be in the range of 32-bit signed integer.
翻译如下
描述:
嗨,欢迎来到杭州电子科技大学oj
在这个问题里,你的任务是计算 SUM(n) = 1 + 2 + 3 + ... + n.
输入:
第一行输入包含整型的个数n,之后每行一个整型。
输出:
对于每一个情况,第一行输出SUM(n),之后输出一个空行。假设结果在int范围内。