LeetCode突然挂了,心情很不好。。。所以今晚注册了个ZOJ账号,以后没事也刷刷ZOJ吧
水题1001:
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个。