#C70. Expertise Overlap
Expertise Overlap
Expertise Overlap
You are given three integers: T, P, and J, where:
- T represents the total number of participants,
- P represents the number of participants who consider themselves experts in Python, and
- J represents the number of participants who consider themselves experts in JavaScript.
Your task is to compute the maximum and minimum possible number of participants who can be experts in both Python and JavaScript.
Using the definitions below:
- The maximum overlap is given by \(\min(P, J)\).
- The minimum overlap is given by \(\max(0, P + J - T)\).
Print the two computed numbers as output, separated by a space.
inputFormat
A single line containing three space-separated integers: T, P, and J.
outputFormat
Output two space-separated integers representing the maximum and minimum overlap of participants who can be experts in both Python and JavaScript.## sample
8 5 3
3 0