This page is still under construction.

Parts of this page are still being built. What you see may change.

Fast A+B

Time limit1sMemory limit512 MB

Summary
Read T pairs of integers from fast input and print each sum on its own line.
Level

Easy1 of 10

Topics
Implementation, Math, Array
Solved
No attempts yet

Problem

Before you work through loop problems in bulk, check how your program reads input and writes output. A slow method can time out once there are many lines to read or print.

In C++, if you use cin and cout, apply both cin.tie(NULL) and sync_with_stdio(false), and print the newline character \n instead of endl. Once you do that, stop mixing in the C style calls scanf, printf, puts, getchar, and putchar.

In Java, you can use BufferedReader and BufferedWriter instead of Scanner and System.out.println. Call BufferedWriter.flush once at the very end.

In Python, you can use sys.stdin.readline instead of input. It keeps the newline at the end of the line, so add .rstrip() when you store the string.

The input stream and the output stream are separate, so you do not have to read every test case before printing anything. Reading one case and printing its answer right away is fine.

Each test case gives two integers AA and BB. Print A+BA+B for every test case.

Input

The first line contains the number of test cases TT. TT is at most 10610^6. Each of the next TT lines contains two integers AA and BB, with 1≤A≤10001 \le A \le 1000 and 1≤B≤10001 \le B \le 1000.

Output

For each test case, print A+BA+B on its own line, in the order the cases are given.

Examples5

  1. Example 1

    Input
    5
    1 1
    12 34
    5 500
    40 60
    1000 1000
    
    Expected output
    2
    46
    505
    100
    2000
    
  2. Example 2

    Input
    1
    1 1
    
    Expected output
    2
    
  3. Example 3

    Input
    1
    1000 1000
    
    Expected output
    2000
    
  4. Example 4

    Input
    2
    1 1000
    1000 1
    
    Expected output
    1001
    1001
    
  5. Example 5

    Input
    6
    1 2
    2 3
    3 4
    4 5
    5 6
    6 7
    
    Expected output
    3
    5
    7
    9
    11
    13