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 }
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 }