[Solution] Air Hockey CodeChef Solution | CodeChef Problem Solution 2022
Alice is playing Air Hockey with Bob. The first person to earn seven points wins the match. Currently, Alice's score is and Bob's score is .
Charlie is eagerly waiting for his turn. Help Charlie by calculating the minimum number of points that will be further scored in the match before it ends.
Input Format
- The first line of input will contain an integer — the number of test cases. The description of test cases follows.
Solution Click Below:- CLICK HERE
- The first and only line of each test case contains two space-separated integers and , as described in the problem statement.
Output Format
For each test case, output on a new line the minimum number of points that will be further scored in the match before it ends.
No comments:
Post a Comment