A Minus B

View as PDF

Submit solution

Points: 3
Time limit: 5.0s
Memory limit: 256M

Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig

Tudor's math classmate, Raymo111, is also on his laptop. He is not paying attention either. The math teacher is starting to get mad and makes them do some simple (not for them) subtraction problems. Neither of them know how to, and they need you to help them out.

Input Specification

The first line will contain an integer N (1 \le N \le 10\,000), the number of subtraction problems Tudor and Raymond need to do. The next N lines will each contain two space-separated integers, A and B, with -10^9 \le A, B \le 10^9.

Output Specification

Output N lines of one integer each, the solutions to the subtraction problems (A - B) in order.

Note: Do not prompt for input, as this will cause the judge to take the prompt as the solution.

Sample Input

1 1
-1 0

Sample Output

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation.


There are no comments at the moment.