HDU-1090

问题链接:http://acm.hdu.edu.cn/showproblem.php?pid=1090

问题简述:输入一个数字n,接下来输入n行,每行输入两个数字,输出两个数字的和。

AC代码:

#include <iostream>
using namespace std;
int main()
{
    int a, b,s;
    while (cin >>s)
    {
        while (s--)
        {
            cin >> a >> b;
            cout << a + b << endl;
        }
    }
}

猜你喜欢

转载自blog.csdn.net/weixin_43973189/article/details/85010651