HDOJ 1090 A+B for Input-Output Practice (II)

http://acm.hdu.edu.cn/showproblem.php?pid=1090

acm常见的输入输出类型,就是一种模板,花一点点时间背下来就可以了,

 1 #include<iostream>
 2 using namespace std;
 3 int main (){
 4 
 5     int a,b,n,i=0;
 6     cin>>n;
 7     while(i<n){
 8         cin>>a>>b;
 9         cout<<a+b<<endl;
10         i++;
11     }
12     return 0;
13 }

 

 

posted on 2013-05-02 09:39  wsxjbcy  阅读(123)  评论(0编辑  收藏  举报

导航