1010 : A+B for Input-Output Practice (X)

时间限制:1 Sec 内存限制:64 MiB 提交:358 正确:146

提交 状态 论坛

题目描述

Your task is to Calculate a + b.

输入描述

Input contains multiple test cases. Each test case contains a integer N, and then 2N integers followed in the same line. A test case starting with 0 terminates the input and this test case is not to be processed.

输出描述

For each line of input, you should calculate and print the sum of a[1]+a[2], a[3]+a[4],...,a[2n-1]+a[2n] in one line. Every two integers separated by a space. 

样例输入

1 1 2
2 1 2 3 4
3 1 2 3 4 5 6
0

样例输出

3
3 7
3 7 11

来源

基础