山东理工大学ACM平台题答案关于C语言 1015 A+B for Input-Output Practice (VI)
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 45 1 2 3 4 5
示例输出
1015
提示
来源
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);
}
}
>更多相关文章
- 09-29如何通过wrap malloc定位C/C++程序的内存泄漏
- 02-25打车软件大战升级,补贴还能维持多久?
- 12-23BMP文件右旋90度[c语言]
- 12-23寻找直方图中面积最大的矩形(C语言版)
- 12-23[ndk,2]ndk开发案例和错误处理
- 12-23[ndk,1]ndk开发,C语言入门讲解
- 12-23C语言连续存储实现队列机制
- 12-23Objective-c 数据类型
首页推荐
佛山市东联科技有限公司一直秉承“一切以用户价值为依归
- 01-11全球最受赞誉公司揭晓:苹果连续九年第一
- 12-09罗伯特·莫里斯:让黑客真正变黑
- 12-09谁闯入了中国网络?揭秘美国绝密黑客小组TA
- 12-09警示:iOS6 惊现“闪退”BUG
- 04-29通用智能人“通通”亮相中关村论坛
- 04-29拼多多投入45亿补贴,助力上海“五五购物节
- 04-29通义千问再开源 推出最大尺寸1100亿参数模型
- 04-29【环球视线】比亚迪交付首列出海云轨
- 04-21中国产品数字护照体系加速建设
相关文章
24小时热门资讯
24小时回复排行
热门推荐
最新资讯
操作系统
黑客防御