| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 765 人关注过本帖
标题:[求助]一道比较简单的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
快速回复:[求助]一道比较简单的ACM题目
数据加载中...
 
   



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

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