A Plus B
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
Output Specification
Output
Sample Input
Copy
2
1 1
-1 0
Sample Output
Copy
2
-1
Comments
//#print(...): similar to Python's print, prints all argument separated by space followed by new line. //#flush(): flushes stdout, ensuring everything output by print() immediately shows up. //#gets(): similar to the Ruby equivalent, returns one line of input from stdin. //#read(bytes): read bytes bytes from stdin as an ArrayBuffer. //#write(buffer): write a typed array, ArrayBuffer, or a view of ArrayBuffer to stdout. //#quit(code): exits the program with code. //#You can also assign to the global variable autoflush to control whether print() flushes.
//#eg: A PLUS B
let n = gets(); for(let i=0;i<n;i++){ const arr = gets().split(' '); print(Number(arr[0])+Number(arr[1])); }