分析:好吧这个题没什么分析的。。(我不会说这篇文章是用来试一试CSDN的博客功能的。。)明白ACM导入测试数据的方式是多组的,这个跟题目叙述有一点关系,具体落实到代码如下:
#include <iostream>
using namespace std;
int main()
{
int a,b;
while(cin>>a>>b)
{
cout<<a+b<<endl;
}
}
就是那个while的问题。
此外还有while(scanf("%d%d",a,b)!=EOF),也是可以的,对应的题目表述是"The input of the problem consists several test cases..."
好了就是这样。。