1. Home
  2. Problems
  3. 1086

A + B Problem (3)

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

描述

Calculate a + b.

输入

The input will consist of an integer N in the first line, and N pairs of integers a and b,separated by a space, one pair of integers per line.

输出

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.

样例输入

2
1 5
3 3

样例输出

6
6

题目来源

#include<iostream>
using namespace std;
int main(){
int n;
cin>>n;
int* r=new int[n];
int i,a,b;
for(i=;i<n;i++)
{
cin>>a>>b;
r[i]=a+b;
}
for(i=;i<n;i++)
cout<<r[i]<<endl;
return ;
}

最新文章

  1. bitset用法总结
  2. 第八章 交互技术,8.1 VR电商购物(作者:宋五)
  3. 基于OpenCV 的iOS开发
  4. mybatis笔记2 基础理论准备
  5. clearfix--清除浮动
  6. Java对象访问 类的静态变量
  7. CentOS 7.2 搭建 Ghost 博客
  8. Servlet课程0424(一) 通过实现Servlet接口来开发Servlet
  9. 每个Web开发者必备的9个软技能
  10. Floodfill算法——求独立子图个数
  11. mysql 优化方法
  12. 非递归并查集——zoj4109
  13. git的命令行操作
  14. linux 安装mysql相关和openjdk
  15. 【转载】COM 组件设计与应用(十一)—— IDispatch 及双接口的调用
  16. 【Docker 教程】- Docker 架构
  17. JavaScrip练习
  18. window coordinate
  19. In a Web Application and Mobile (hybrid), how to know which this platform running?
  20. 存储过程IF --ELSE IF -- END IF 使用

热门文章

  1. LVS与其他负载均衡软件的区别
  2. EventHandlerList z
  3. Loadrunner执行Java脚本
  4. 开发工具安装运行bug总结
  5. codevs 3160 最长公共子串(SAM)
  6. 如何使用 RDP 或 SSH 连接到 Azure 虚拟机
  7. Learning JavaScript Design Patterns The Constructor Pattern
  8. JavaScript Garden
  9. hdoj 1253 胜利大逃亡
  10. [struts2]开启struts2开发模式