ACM——A + B Problem (2)
2024-08-24 21:47:05
A + B Problem (2)
时间限制(普通/Java):1000MS/3000MS 运行内存限制:65536KByte
总提交:2600 测试通过:1372
总提交: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 ;
}
最新文章
- 常用js函数整理--common.js
- Hadoop生态上几个技术的关系与区别:hive、pig、hbase 关系与区别
- 关于strlen
- Android Studio怎么删除项目
- DOM----comment类型
- B-树、B+树、B*树的区别
- Swift Error fatal error: unexpectedly found nil while unwrapping an Optional value
- phpQuery 无法解析 html 结构
- 借助扩展事件查看SQL 2016备份和还原操作的内幕
- android 仿微信表情雨下落!
- 初学python之路-day05
- Bootstrap框架介绍
- Webpack+Vue+ES6 前端组件化开发mobile-multi-page应用实战总结和踩坑
- scrapy instantiation
- 如何实现HashMap的同步
- webgl之观察三维空间
- 按顺序动态加载js, 可控版本, 有回调
- htmlparser学习(原创)
- HBTS(HBOI) 2019 真实退役记
- Qt基础——让使用Designer创建的UI也能自动适应窗口大小
热门文章
- VS2005 工程在win7下使用管理员权限运行
- 【原】日志处理-Spark
- 【原创】Java移位运算
- HW4.46
- centos 中查找依赖及库
- gridview合并单元格
- javascript数组操作汇总
- [每日一题] 11gOCP 1z0-053 :2013-10-7 the backup of MULT_DATA................................32
- sqlplus 连接数据库报错SP2-0642: SQL*Plus internal error state 2130, context 0:0:0
- 抽象类Abstract的简单使用