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 ;
}

最新文章

  1. 常用js函数整理--common.js
  2. Hadoop生态上几个技术的关系与区别:hive、pig、hbase 关系与区别
  3. 关于strlen
  4. Android Studio怎么删除项目
  5. DOM----comment类型
  6. B-树、B+树、B*树的区别
  7. Swift Error fatal error: unexpectedly found nil while unwrapping an Optional value
  8. phpQuery 无法解析 html 结构
  9. 借助扩展事件查看SQL 2016备份和还原操作的内幕
  10. android 仿微信表情雨下落!
  11. 初学python之路-day05
  12. Bootstrap框架介绍
  13. Webpack+Vue+ES6 前端组件化开发mobile-multi-page应用实战总结和踩坑
  14. scrapy instantiation
  15. 如何实现HashMap的同步
  16. webgl之观察三维空间
  17. 按顺序动态加载js, 可控版本, 有回调
  18. htmlparser学习(原创)
  19. HBTS(HBOI) 2019 真实退役记
  20. Qt基础——让使用Designer创建的UI也能自动适应窗口大小

热门文章

  1. VS2005 工程在win7下使用管理员权限运行
  2. 【原】日志处理-Spark
  3. 【原创】Java移位运算
  4. HW4.46
  5. centos 中查找依赖及库
  6. gridview合并单元格
  7. javascript数组操作汇总
  8. [每日一题] 11gOCP 1z0-053 :2013-10-7 the backup of MULT_DATA................................32
  9. sqlplus 连接数据库报错SP2-0642: SQL*Plus internal error state 2130, context 0:0:0
  10. 抽象类Abstract的简单使用