#C1450. Minimum Extra Cages
Minimum Extra Cages
Minimum Extra Cages
In this problem, you are given several test cases. Each test case consists of two integers, (P) and (C), where (P) represents the number of pets and (C) represents the number of available cages. The goal is to determine the minimum number of extra cages required so that each pet can have its own cage. The calculation is based on the formula: (extra = \max(0, P - C)).
All inputs are read from standard input and outputs must be printed to standard output.
inputFormat
The first line contains an integer (T) representing the number of test cases. Each of the next (T) lines contains two space-separated integers (P) and (C), where (P) is the number of pets and (C) is the number of available cages.
outputFormat
For each test case, output a single line containing the minimum number of extra cages required.## sample
3
15 10
8 10
20 20
5
0
0
</p>