#include<iostream>
using namespace std;
void main()
{
int b,c,sum=0;
while(scanf("%d",&b)!=EOF)
{
sum=0;
for(int i=0;i<b;i++)
{
cin>>c;
sum+=c;
}
cout<<sum<<endl;
}
}

Problem Description

Your task is to calculate the sum of some integers.
 
Input
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.

 
Output
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.

 
Sample Input
4 1 2 3 4
5 1 2 3 4 5
 
Sample Output
10
15
 
Author
lcy

A+B for Input-Output Practice (VI)的更多相关文章

  1. hdu 1094 A+B for Input-Output Practice (VI)

    A+B for Input-Output Practice (VI) Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/327 ...

  2. NFS挂载异常 mount.nfs: Input/output error

    [root@localhost ~]# vi /etc/exports #增加/nfs 192.168.10.132(rw,no_root_squash,no_all_squash,async) [r ...

  3. PHP-FPM-failed to ptrace(PEEKDATA) pid 123: Input/output error

    If you're running PHP-FPM you can see these kind of errors in your PHP-FPM logs. $ tail -f php-fpm.l ...

  4. BIOS(Basic Input/Output System)是基本输入输出系统的简称

    BIOS(Basic Input/Output System)是基本输入输出系统的简称 介绍 操作系统老师说,平时面试学生或者毕业答辩的时候他都会问这个问题,可见这个问题对于计算机专业的学生来说是如此 ...

  5. read()、write()返回 Input/output error, Device or resource busy解决

    遇到的问题,通过I2C总线读.写(read.write)fs8816加密芯片,报错如下: read str failed,error= Input/output error! write str fa ...

  6. Angular 个人深究(三)【由Input&Output引起的】

    Angular 个人深究(三)[由Input&Output引起的] 注:最近项目在做别的事情,angular学习停滞了 1.Angular 中 @Input与@Output的使用 //test ...

  7. Docker 在转发端口时的这个错误Error starting userland proxy: mkdir /port/tcp:0.0.0.0:3306:tcp:172.17.0.2:3306: input/output error.

    from:https://www.v2ex.com/amp/t/463719 系统环境是 Windows 10 Pro,Docker 版本 18.03.1-ce,电脑开机之后第一次运行 docker ...

  8. dpdk EAL: Error reading from file descriptor 23: Input/output error

    执行test程序时输出: EAL: Error reading from file descriptor 23: Input/output error 原因: 在虚拟机添加的网卡,dpdk不支持导致的 ...

  9. html5 填表 表单 input output 与表单验证

    1.<output>     Js计算结果 <form oninput="res.value = num1.valueAsNumber*num2.valueAsNumber ...

  10. mount_cd9660:/dev/acd0: Input/output error

    mount -t cd9660 /dev/acd0 /cdrom g_vfs_done():acd0[READ(offset32768, length=204]error =5 mount_cd966 ...

随机推荐

  1. 使用C#开发C/S框架高级版添加新项目实例

    操作步骤: 1.新建一个项目CSFramework3.test,在CSFramework3.test项目下新建一个FormMan窗口(此时不需要继承). 2.按F7打开类,替换一下引用 using S ...

  2. 《android开发艺术探索》读书笔记(四)--View工作原理

    接上篇<android开发艺术探索>读书笔记(三) No1: View的三大流程:测量流程.布局流程.绘制流程 No2: ViewRoot对应于ViewRootImpl类,它是连接Wind ...

  3. 【Learning】 欧拉回路的求解

    欧拉回路: 欧拉回路,俗称一笔画,比如一笔画五角星等. 这里给出非严谨的定义:欧拉回路即从一个点出发,不重复.不遗漏地经过所有的边与所有的点,并恰好回到出发点. 包含欧拉回路的图称为欧拉图. 欧拉回路 ...

  4. string (KMP+期望DP)

    Time Limit: 1000 ms   Memory Limit: 256 MB Description  给定一个由且仅由字符 'H' , 'T' 构成的字符串$S$. 给定一个最初为空的字符串 ...

  5. 使用eclipse写C

    C终究还是程序员进阶少不了坎,熟悉nginx ,深入学习php等最后都逃不过C,那为何不去拥抱呢...'='',c对我来说也是老朋友了,但是那时做 硬件作比赛而且比较浅显,现在决定还是 重新试试吧,, ...

  6. 使用flask_sqlalchemy

    首先引用一下廖雪峰Python教程里关于sqlalchemy的话, 这里我们要讲的是flask_sqlalchemy的用法. 1. 安装 用pip安装即可, 进入cmd控制台输入 pip instal ...

  7. Hama安装及示例运行

    Hama介绍 Apache Hama是一个纯BSP(Bulk Synchronous Parallel)计算框架,模仿了Google的Pregel.用来处理大规模的科学计算,特别是矩阵和图计算. BS ...

  8. linux web服务器及LAMP动态网站平台搭建

    (vim补:)vim另存为:x,x w 目标文件路径vim批量删除x:x,x d Web服务:基于B/S架构的web通信服务端:支持HTTP协议的网页提供程序客户端:按标记规范显示网页的浏览器程序客户 ...

  9. hi3531spi flash启动和bootrom启动的对比

    a

  10. 程序bug致损失400亿,判程序员坐牢? 搞笑我们是认真的

    号外!号外!走过,路过,不要错过!日本 IT 业的狗血八卦继续独家放送啦!! 2015 年 9 月 3 日,随着东京最高法院驳回瑞穗证券的上诉,维持二审的原判结果,一个长达 10 年的诉讼终于画下了句 ...