设为首页 加入收藏

TOP

山东理工大学ACM平台题答案关于C语言 1015 A+B for Input-Output Practice (VI)
2014-11-23 21:27:40 来源: 作者: 【 】 浏览:8
Tags:山东 理工大学 ACM 平台 答案 关于 语言 1015 for Input-Output Practice

A+B for Input-Output Practice (VI)

Time Limit: 1000ms Memory limit: 65536K 有疑问?点这里^_^

题目描述

Your task is to calculate the sum of some integers.

输入

Input contains multiple test cases, and one case one line. Each case starts with an integer N, and then N integers follow in the same line.

输出

For each test case you should output the sum of N integers in one line, and with one line of output for each line in input.

示例输入

4 1 2 3 4
5 1 2 3 4 5

示例输出

10
15

提示

来源

HDOJ

#include
void main()
{
int a,i,j,m;
while(scanf("%d",&i)!=EOF)
{
j=0;
for(m=0;m {
scanf("%d",&a);
j=j+a;
}
printf("%d\n",j);
}
}
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
分享到: 
上一篇纯C语言写的拼图游戏源码 下一篇山东理工大学ACM平台题答案关于C..

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: