

If 'K' is greater than 'N', return -1 denoting the invalid order.
Given if 'N' = 10, 'K' = 5. Then 5 candies are left in the jar after the event.
The first line of input contains an integer ‘T’ denoting the number of test cases.
The first and the only line of each test case contains two space-separated integers N and K, where ‘N’ is the number of candies in jar and ‘K’ is the number of candies the customer requires.
For each test case, return the candies left in the jar. If the order is invalid return -1.
The output of each test case will be printed in a separate line.
You don’t need to print anything; it has already been taken care of. You just need to implement the given function.
1 <= T <= 5
1 <= N, K <= 10^4
Time Limit: 1 second
The main idea is to check if K is greater than N or not.
Count vowels, consonants, and spaces
King Placement
No Repeated Digits
No Repeated Digits
Smit’s String Flip Game.
Longest Alternating Subarray