HDU-1089 A+B for Input-Output Practice (I)
2018-03-10 17:23
471 查看
[align=left]Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
[/align]
[align=left]Problem Description[/align]Your task is to Calculate a + b.
Too easy?! Of course! I specially designed the problem for acm beginners.
You must have found that some problems have the same titles with this one, yes, all these problems were designed for the same aim.
[align=left]Input[/align]The input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line.
[align=left]Output[/align]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.
[align=left]Sample Input[/align]1 510 20 [align=left]Sample Output[/align]630
[align=left]Author[/align]lcy
二、测试数据是一对整数
三、每一行输入对应一行输出,暗示输出两数之和后要换行,保证输出占一行
四、小白在读题时可能误认为先按输入表列输入最后一次性按下回车输出所有输出表列;正确理解为输入一行输出一 行,输入一行输出一行
[/align]
[align=left]Problem Description[/align]Your task is to Calculate a + b.
Too easy?! Of course! I specially designed the problem for acm beginners.
You must have found that some problems have the same titles with this one, yes, all these problems were designed for the same aim.
[align=left]Input[/align]The input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line.
[align=left]Output[/align]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.
[align=left]Sample Input[/align]1 510 20 [align=left]Sample Output[/align]630
[align=left]Author[/align]lcy
C++代码
#include<iostream> using namespace std; int main() { int a,b; while(cin>>a>>b) { cout<<a+b<<endl; } return 0; }
注
一、测试数据的数量没有限制二、测试数据是一对整数
三、每一行输入对应一行输出,暗示输出两数之和后要换行,保证输出占一行
四、小白在读题时可能误认为先按输入表列输入最后一次性按下回车输出所有输出表列;正确理解为输入一行输出一 行,输入一行输出一行
相关文章推荐
- hdu1089 - A+B for Input-Output Practice (I)
- HDU 1089 A+B for Input-Output Practice (I)
- HDU 1089----1096 A+B for Input-Output Practice(简单题)(JAVA版)
- HDU-1089-A+B for Input-Output Practice (I)(极度无聊)
- HDU 1089 A+B for Input-Output Practice (I)
- HDU 1089-1096 A+B for Input-Output Practice(IO系列)
- HDU 1089 A+B for Input-Output Practice (I)(水~)
- HDU1089-HDU1096 A+B for Input-Output Practice (I)-(VIII)(入门必备训练)
- HDU 1089 ~ 1096 A+B for Input-Output Practice 解题报告 C语言
- 【HDU】1089 A+B for Input-Output Practice (I)
- hdu 1089 A+B for Input-Output Practice (I)
- HDU-#1089-1096 A+B for Input-Output Practice (I-VIII)系列
- HDU 1.1.3 A+B for Input-Output Practice (III)
- HDU 1095 A+B for Input-Output Practice (VII)(水~)
- 1089 A+B for Input-Output Practice (I)
- HDU 1093 A+B for Input-Output Practice (V)
- HDU 1096 A+B for Input-Output Practice (VIII)
- hduoj1089(A+B for Input-Output Practice (I))
- HDU 1.1.4 A+B for Input-Output Practice (IV)
- HDU 1096 A+B for Input-Output Practice (VIII)(水~)