[Solution] Chairs Requirement CodeChef Solution | CodeChef Problem Solution 2022
Chef's coding class is very famous in Chefland.
This year students joined his class and each student will require one chair to sit on. Chef already has chairs in his class. Determine the minimum number of new chairs Chef must buy so that every student is able to get one chair to sit on.
Input Format
- The first line contains a single integer — the number of test cases. Then the test cases
Solution Click Below:- CLICK HERE
- The first and only line of each test case contains two integers and — the number of students in the class and the number of chairs Chef already has.
Output Format
For each test case, output the minimum number of extra chairs Chef must buy so that every student gets one chair.
No comments:
Post a Comment