hdoj1902a+b(4)
来源:互联网 发布:手机打碟机软件 编辑:程序博客网 时间:2024/06/05 20:34
A+B for Input-Output Practice (IV)
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 75664 Accepted Submission(s): 40443
Problem Description
Your task is to Calculate the sum of some integers.
Input
Input contains multiple test cases. Each test case contains a integer N, and then N integers follow in the same line. A test case starting with 0 terminates the input and this test case is not to be processed.
Output
For each group of input integers you should output their sum in one line, and with one line of output for each line in input.
Sample Input
4 1 2 3 4
5 1 2 3 4 5
0
Sample Output
10
15
Author
lcy
Recommend
JGShining | We have carefully selected several similar problems for you: 1002 1061 1040 1108 1013
Statistic | Submit | Discuss | Note
已ac
#include<stdio.h>int main(){ int a,n,i; int b[1000]; while((scanf("%d",&n)!=EOF)&&(n!=0)) { a=0; for(i=0;i<n;i++) { scanf("%d",&b[i]); a+=b[i]; } printf("%d\n",a); }}
- hdoj1902a+b(4)
- 辨析B树(B-、B+、B*)
- 以太网数据包: 目地地址(6B) 源地址 (6B) 类型 (2B) 数据 (46~1500B) 校验和 (4B)
- (B 树、 B- 树、 B+ 树、 B* 树)
- B树、B-树、B+树、B*树 (转)
- B树(即B-tree)、B+树、B*树
- B树(B-树)、B+树、B*树
- B-树(即B树) B+树 B*树
- B树(B-树)、B+树、B*树
- B-树(B树)、B+树、B*树
- 浅谈数据结构中的树(B/B+/B-/B*)
- HD1092 a+b输入格式(4)
- 网络编程(4)B/S
- NEUQ】A+B(基本输入输出4)
- codeforce 4B(思维水题)
- 1004: A+B(基本输入输出4)
- 相亲相爱的B家人(B树,B+树,B-树,B*树)
- B-树/B+树/B*树详解(查找+插入)
- ajax
- java之树的子结构
- 打印n对括号的全部有效组合
- Android如何在非Activity类中实现Vibrate效果
- 使用ajax获取servelt数据乱码
- hdoj1902a+b(4)
- 三分钟掌握 JUnit3.0
- 黑马程序员-线程Thread类和Runnable接口
- OC视频笔记(对象的拷贝 )
- ACM练习 yougth和他的朋友们
- 字母统计
- mysql中SELECT语句的执行顺序
- cocos2d-x-3.xWindows下的环境搭建,包括Android项目的配置
- C++ 中dynamic_cast<>的使用方法