hdu刷题之路——hdu 1000 A + B Problem

hdu刷题之路

hdu 1000 A + B Problem
(水题入门)

Problem Description
Calculate A + B.

Input
Each line will contain two integers A and B. Process to end of file.

Output
For each case, output A + B in one line.

Sample Input
1 1

Sample Output
2

直接按照题意来就是 注意EOF即可

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

猜你喜欢

转载自blog.csdn.net/weixin_43508782/article/details/84572556
今日推荐