從零開始刷HDOJ(1)【HDOJ1000 - a+b problem】

從零開始刷HDOJ(1)【HDOJ1000 - a+b problem】

題面

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

翻譯

​ 輸入a, b,輸出a + b。

思路

​ 和各大OJ一樣,第一道題一般就是a+b problem。

代碼

#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;
}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章