博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
hduoj1090A+B for Input-Output Practice (II)
阅读量:6900 次
发布时间:2019-06-27

本文共 851 字,大约阅读时间需要 2 分钟。

A+B for Input-Output Practice (II)

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)

Total Submission(s): 34997    Accepted Submission(s): 23258

Problem Description
Your task is to Calculate a + b.
 

 

Input
Input contains an integer N in the first line, and then N lines follow. Each line consists of a pair of integers a and b, separated by a space, one pair of integers per line.
 

 

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

 

Sample Input
2 1 5 10 20
 

 

Sample Output
6 30
View Code
#include 
int main(){
int n,a,b;scanf("%d",&n);while(n--){ scanf("%d %d",&a,&b); printf("%d\n",a+b);}return 0;}

 

转载于:https://www.cnblogs.com/zhaojiedi1992/archive/2012/07/21/zhaojiedi_2012_05_27000000.html

你可能感兴趣的文章
安卓电子市场开放下载VMware View 客户端
查看>>
Backbone.js(1.1.2) API中文文档
查看>>
Spring Social实现QQ社交登录
查看>>
adm100练习4-关闭SAP
查看>>
详解karma & jasmine自动化测试
查看>>
让代码飞起来——高性能Julia学习笔记(二)
查看>>
SCCM TP4安装客户端Agent
查看>>
基于Solr的全文搜索服务器的安装部署
查看>>
网页图片优化的实用工具和技巧分享
查看>>
Smarty高级特性 – 用户自定义函数使用 SMARTY:: register_function
查看>>
APR协议
查看>>
Dedecms从服务器到安装一条龙攻略
查看>>
查看tomcat启动文件都干点啥---Catalina.java
查看>>
JDK安装与环境变量配置
查看>>
SaltStack源码分析之file状态模块
查看>>
Jetty锁定文件的问题
查看>>
[转] 中国人不可不知道的知识
查看>>
MongoDB分布式文件存储数据库视频教程Ⅰ
查看>>
开机自启pm2
查看>>
NT环境下进程隐藏的实现
查看>>