1. 程式人生 > >開始刷ZOJ了,立個flag

開始刷ZOJ了,立個flag

LeetCode突然掛了,心情很不好。。。所以今晚註冊了個ZOJ賬號,以後沒事也刷刷ZOJ吧

水題1001:

A + B Problem
Time Limit: 2 Seconds      Memory Limit: 65536 KB

Calculate a + b

Input

The input will consist of a series of pairs of integers a and b,separated by a space, one pair of integers per line.

Output

For each pair of input integers a and b you should output the sum of a and b in one line,and with one line of output for each line in input.

Sample Input

1 5

Sample Output

6

Hint

Use + operator

程式碼:

#include<iostream>
using namespace std;

int main(void){
	int a,b;
	while(cin>>a>>b)
		cout<<a+b<<endl;
	//return 0;
}  

打算每天都刷吧。

大三結束爭取做完300個。