A Plus B

View as PDF

Submit solution

Points: 5.00 (partial)
Time limit: 2.0s
Memory limit: 64M
Input: stdin
Output: stdout

Author:
Problem type
Allowed languages
C, C#, C++

Tudor is sitting in math class, on his laptop. Clearly, he is not paying attention in this situation. However, he gets called on by his math teacher to do some problems. Since his math teacher did not expect much from Tudor, he only needs to do some simple addition problems. However, simple for you and I may not be simple for Tudor, so please help him!

Input Specification

The first line will contain an integer ~N~ (~1 \le N \le 100\,000~), the number of addition problems Tudor needs to do. The next ~N~ lines will each contain two space-separated integers whose absolute value is less than ~1\,000\,000\,000~, the two integers Tudor needs to add.

Output Specification

Output ~N~ lines of one integer each, the solutions to the addition problems in order.

Sample Input

2
1 1
-1 0

Sample Output

2
-1


12
-2

Comments

Please read the guidelines before commenting.



  • 1
    VDev  commented on Jan. 18, 2025, 1:15 p.m.

    FULL AC

    #include <bits/stdc++.h>
    
    using namespace std;
    
    
    int main(){
        long long n, a, b;
        cin >> n;
        for(long long i = 0; i < n; i++){
                cin >> a >> b;
            cout << a + b << endl;
        }
        return 0;
    }
    

  • 2
    phipham304  commented on April 5, 2024, 5:47 p.m.

    ai giải thích đề được không :v


    • 1
      dainghiajustiin  commented on April 6, 2024, 12:20 p.m.

      Output bị lỗi đó bạn. Đề bảo yêu cầu in ra N dòng với mỗi dòng là kết quả của a + b thui


      • 1
        phipham304  commented on April 6, 2024, 2:51 p.m.

        bảo sao đọc đề thấy output sai sai :))