1000A + B Problem
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 158161 Accepted Submission(s): 50186
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
Author
HDOJ
Statistic | Submit | Discuss | Note
#include
int main()
{
int a,b;
while(scanf("%d %d",&a,&b)!=EOF)
printf("%d\n",a+b);
}
本文介绍了一个简单的编程问题“1000A+B”,该问题是输入两个整数A和B,输出它们的和。通过使用C语言实现,文章提供了一段简洁的代码示例,展示了如何读取输入并计算两数之和。
325

被折叠的 条评论
为什么被折叠?



