A + B Problem (2)

时间限制(普通/Java):1000MS/3000MS          运行内存限制:65536KByte
总提交:2600            测试通过:1372

描述

Calculate a + b.

输入

The input will consist of a series of pairs of integers a and b,separated by a space, one pair of integers per line. A line containing 0 0 terminates the input and this line is not to be processed.

输出

For each pair of input integers a and b you should output the sum of a and b in one line,and with one line of output for each line in input.

样例输入

1 5
3 3
0 0

样例输出

6
6

题目来源

HDUOJ

#include<iostream>
#include<vector>
using namespace std;
int main(){
int i,a,b;
vector<int> ivec;
while(cin>>a>>b)
{
if(a==&&b==)
break;
ivec.push_back(a+b);
}
for(i=;i<ivec.size();i++)
cout<<ivec[i]<<endl;
return ;
}

ACM——A + B Problem (2)的更多相关文章

  1. ACM - a + b Problem

    前几天看了ACM的第一题,映入眼帘的是一个“简单”的题目: 输入两个数,a,b 输出他们的和. 本着,此乃ACM的原则,便有了如下的思考: ACM的题目肯定很难,a+b,怎么可能直接printf,不行 ...

  2. ACM: A Simple Problem with Integers 解题报告-线段树

    A Simple Problem with Integers Time Limit:5000MS Memory Limit:131072KB 64bit IO Format:%lld & %l ...

  3. ACM——A + B Problem (4)

    A + B Problem (4) 时间限制(普通/Java):1000MS/3000MS          运行内存限制:65536KByte总提交:2496            测试通过:124 ...

  4. ACM——A + B Problem (3)

    Home Problems 1086 A + B Problem (3) 时间限制(普通/Java):1000MS/3000MS          运行内存限制:65536KByte总提交:2317 ...

  5. ACM——A + B Problem (1)

    A + B Problem (1) 时间限制(普通/Java):1000MS/3000MS          运行内存限制:65536KByte总提交:5907            测试通过:151 ...

  6. 2013年 ACM 有为杯 Problem I (DAG)

    有为杯  Problem I DAG  有向无环图 A direct acylic graph(DAG),is a directed graph with no directed cycles . T ...

  7. ACM程序设计选修课——Problem E:(ds:图)公路村村通(优先队列或sort+克鲁斯卡尔+并查集优化)

    畅通工程 Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submi ...

  8. ACM程序设计选修课——Problem D: (ds:树)合并果子(最优二叉树赫夫曼算法)

    Problem D: (ds:树)合并果子 Time Limit: 5 Sec  Memory Limit: 64 MB Submit: 80  Solved: 4 [Submit][Status][ ...

  9. 【ACM】hdu_zs3_1008_Train Problem I_201308100835

    Train Problem I Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 65536/32768K (Java/Other)Tota ...

随机推荐

  1. Android从零单排之免费短信验证

    介绍 短信验证功能大家都很熟悉了.在很多地方都能见到,注册新用户或者短息验证支付等.短信验证利用短信验证码来注册会员,大大降低了非法注册,很大程度上提高了用户账户的安全性. 目前市面上已经有了很多提供 ...

  2. 洛谷P1118 数字三角形游戏

    洛谷1118 数字三角形游戏 题目描述 有这么一个游戏: 写出一个1-N的排列a[i],然后每次将相邻两个数相加,构成新的序列,再对新序列进行这样的操作,显然每次构成的序列都比上一次的序列长度少1,直 ...

  3. Storm系列(七)架构分析之Scheduler-调度器[DefaultScheduler]

    Storm默认的任务调度器.实现如下: 1  (defn –prepare [this conf]) 2  (defn –schedule [this ^Topologies topologies ^ ...

  4. JAVA面试题——JAVA编程题1(2015.07.22——湛耀)

    实现代码很简单:   package com.xiaozan.shopping;   import java.util.Arrays;   public class ShoppingCart {    ...

  5. pes and ts stream, how to convert

    http://stackoverflow.com/questions/4145575/transport-stream-mpeg-file-fromat What you are probably w ...

  6. (太强大了) - Linux 性能监控、测试、优化工具

    转: http://www.vpsee.com/2014/09/linux-performance-tools/ Linux 平台上的性能工具有很多,眼花缭乱,长期的摸索和经验发现最好用的还是那些久经 ...

  7. iOS开发中常见的语句@synthesize obj = _obj 的意义详解

    我们在进行iOS开发时,经常会在类的声明部分看见类似于@synthesize window=_window; 的语句,那么,这个window是什么,_ window又是什么,两个东西分别怎么用,这是一 ...

  8. Yii框架CGridView columns中使用数组或变量传值

    继续Yii框架的学习与使用,CGridView对于网站后台而言十分有用处,可以很快速地实现数据列表显示,并集成排序,搜索等功能,很巧妙. 今天,在项目中遇到了状态显示问题,在controller中定义 ...

  9. 【Apache开源软件基金会项目】

    因为想要继续巩固一下外语,并且扩展下java的知识面,翻译一下Apache软件基金会的各个项目是个不错的选择. 2014-10-19 1 [Apache .NET Ant Libary] .net A ...

  10. android_自定义布局

    1.需要实现view类 2.如果需要实现自定义属性则: 1.定义资源文件attrs---->values 2. <?xml version="1.0" encoding ...