A Plus B

View as PDF

Submit solution

Points:3 (partial)
Time limit:5.0s
Memory limit:256M

Problem type

Xyene 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 Xyene, he only needs to do some simple addition problems. However, simple for you and I may not be simple for Xyene, 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 Xyene 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 Xyene needs to add.

Output Specification

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

Sample Input

1 1
-1 0

Sample Output



  • 1
     commented on July 17, 2016, 6:45 a.m.
    how to submit my code as a file ?

    how can i submit my code as a file to this problem . Or is copy pasting the code is the only option that we can do ??

    • 7
       commented on July 21, 2016, 2:28 p.m.

      There is not much demand for this feature (that I know of anyway), and this is the first time I have seen it being discussed. For most people, copy and paste is much faster than browsing for a file or finding it and drag-and-drop it. Obviously, if there is sufficient demand, it may be added eventually.

  • 2
     commented on July 16, 2016, 3:16 p.m.
    Java is stuck

    This is a general question (not sure where else to post this) but I submitted some Java solutions. They have been queued for over an hour. I am unable to abort them, meaning that I am blocked from submitting ("You have submitted too many submissions"). According to all submissions, it appears I am not the only one, but it only happens with Java. Please fix.Error with Java submissions

    • 1
       commented on July 16, 2016, 4:00 p.m. edited

      Certain external problem setters have managed to hang the judge Lemuria and neglected to inform us of their irresponsible behaviour.

      In case it wasn't clear, the issue is fixed.

      • 0
         commented on July 16, 2016, 4:05 p.m.


    • 0
       commented on July 16, 2016, 3:27 p.m. edited


  • -4
     commented on April 5, 2016, 5:11 p.m.
    Inconsistant Speed

    This vs this. I copy-pasted it, because I thought my code was really slow. However, if you look at the time required for the last test case, the first one takes 0.5 seconds, while the second one takes 2 seconds. While it doesn't matter for this question, I believe that it will make a big difference on other questions with more input.

    • 4
       commented on April 5, 2016, 5:34 p.m.

      The first submission you linked is about half a year old.

      If you resubmit the same solution a couple times, they'll tend to fall in the ballpark of 2 second regardless of which judge grades it.

      For the record, this problem has 1mb of input data for the last case, significantly more than most problems have in total.

  • -4
     commented on March 14, 2016, 12:07 p.m.

    Time limit 20 seconds + memory limit 256M = LOL.

    • 2
       commented on March 14, 2016, 9:30 p.m.

      Once upon a time, our judges were much slower, and 20s were necessary to pass the last case in Python.