12 hour clock subtraction
Submissions: 2251   Accuracy:

33.21%

  Difficulty: School   Marks: 0
*School Problem's Submission isn't counted in score!

Given two positive integers num1 and num2, subtract num2 from num1 on a 12 hour clock rather than a number line.

Input:
First line of the input contains an integer T denoting the number of test cases. For each test case there will be single line containing two space integers num1 and num2.

Output:
Corresponding to each test case, print the difference in a new line.

Constraints:
1 <= T <= 100
0 <= num1 <= 1000
0 <= num2 <= 1000

Example:
Input
2
7 5
5 7

Output
2
-2

 

** For More Input/Output Examples Use 'Expected Output' option **

Contributor: Aditya Garg
Author: Aditya Garg 1


If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.



Need help with your code? Please use ide.geeksforgeeks.org, generate link and share the link here.


to report an issue on this page.