#K76802. Wine Aging Challenge
Wine Aging Challenge
Wine Aging Challenge
Dr. Bacchus has a unique passion for perfectly aged wine. In this problem, you are given two integers p and n on each line, where p represents the shortest required aging period in years and n represents the number of wine boxes available in his cellar. The maximum number of consecutive years during which Dr. Bacchus can enjoy a perfect bottle of wine is given by:
\(\text{result} = \min(p,n)\)
Input terminates with a line containing 0 0
which should not be processed. Your task is to compute and output the answer for each test case.
inputFormat
The input consists of several lines. Each line contains two integers p and n separated by spaces. The input terminates with a line containing "0 0", which should not be processed.
outputFormat
For each test case, output the maximum number of consecutive years on a separate line. The answer for each test case is computed as \(\min(p, n)\).
## sample3 1
3 4
10 20
100 50
1 10
0 0
1
3
10
50
1
</p>