链接:https://vjudge.net/problem/HDU-1090

Task

Your task is to Calculate a + b.

Input

Input contains an integer N in the first line, and then N lines follow. Each line consists of a pair of integers a and b, separated by a space, one pair of integers per line.

Outout

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.对每一行输出a+b的结果

Sample

input

1
2
3
2
1 5
10 20

output

1
2
6
30

Solution

cstdio做io,scanf读取,printf打印

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
#include<cstdio>
using namespace std;
int main(){
  int a,b,c,N;
  scanf("%d",&N);
  for(int i=0; i<N; ++i){
    scanf("%d%d",&a,&b);
    c=a+b;
    printf("%d\n",c);
  }
  return 0;
}