标题:[求助]一道比较简单的ACM题目
取消只看楼主
hacker168
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2006-10-18
 问题点数:0 回复次数:1 
[求助]一道比较简单的ACM题目

Problem Description


In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + ... + n.

Input


The input will consist of a series of integers n, one integer per line.

Output


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.

Sample Input


1
100

Sample Output


1

5050


搜索更多相关主题的帖子: ACM line SUM Output 
2006-11-03 17:03
hacker168
Rank: 1
等 级:新手上路
帖 子:6
专家分:0
注 册:2006-10-18
得分:0 
就是要求输入几个数据,输出他们的相加和,第一行表示输入几行数据
2006-11-03 17:33



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-100570-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.865194 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved