Scratch brush HDOJ (1) [HDOJ1000 - a + b problem]

Scratch brush HDOJ (1) [HDOJ1000 - a + b problem]

Face questions

A + B Problem

Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)

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

Recommend

We have carefully selected several similar problems for you: 1089 1002 1090 1091 1092

Statistic | Submit | Discuss | Note

translation

Enter a, b, the output of a + b.

Thinking

And major OJ as first question is generally a + b problem.

Code

#include <iostream>

int main(int argc, char ** argv)
{
    int x, y;
    while (std::cin >> x >> y)
        std::cout << x + y << std::endl;
//底下就是暂停用的,不用管。
#ifdef __EDWARD_EDIT
    std::cin.get();
    std::cin.get();
#endif
    return 0;
}
Published 40 original articles · won praise 0 · Views 5161

Guess you like

Origin blog.csdn.net/edward00324258/article/details/72540888