The largest and smallest number of solved problems
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Problem Statement
There are n students who collectively solved sum different problems. Each student solved at least one problem. Your task is to determine the following:
maxmax: The maximum number of problems that a single student could have solved.
minmax: The minimum number of problems that the student who solved the most problems could have solved.
maxmin: The maximum number of problems that the student who solved the fewest problems could have solved.
Input
You will receive two integers, n and sum, separated by a space. The constraints are as follows: 3 ≤ n ≤ 38, 4 ≤ sum ≤ 50, and sum > n.
Output
Print three integers, maxmax, minmax, and maxmin, separated by spaces.
Examples
Input #1
Answer #1
Submissions 775
Acceptance rate 37%