← All problemsSign in

Chairs Requirement

CodeChefRating 305Open on judge ↗

Chef's coding class is very famous in Chefland. This year $X$ students joined his class and each student will require one chair to sit on. Chef already has $Y$ 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 - The first line contains a single integer $T$ — the number of test cases. Then the test ca

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start