`
richard_ma
  • 浏览: 15106 次
最近访客 更多访客>>
社区版块
存档分类
最新评论

hdu1000 A+B

阅读更多
A + B Problem

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

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

解题思路
这里最阴毒的一句已经在题目中用红色粗体标出了。

#include <stdio.h>
#include <stdlib.h>

int main (int argc, char const* argv[])
{
    int a, b;

    while (scanf("%d %d", &a, &b) != EOF) {
        printf("%d\n", a+b);
    }

    return 0;
}
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics