Balanced mixture
Given A number of powerful resources and B number of weak resources. You have to select a balanced mixture of these resources. A balanced mixture has C resources containing no less than 4 powerful resources and no less than one weak resource. You are given integers A, B, and C. Each powerful and weak
resource is unique in itself. Hence, two mixtures with the same number of powerful and weak resources are considered different if at least one of the resources is different in the 2 mixtures. Print the number of ways of selecting a balanced mixture
with the given number of resources.
Function description
Complete the function Balanced(). This function takes the following 3 parameters and returns the required answer:
- A: Represents the number of powerful resources
- B: Represents the number of weak resources
- C. Represents the number of resources in a balanced mixture
Input format for custom testing
Note: Use this input format if you are testing against custom
input or writing code in a language where we don't provide
boilerplate code
- The first line contains an integer A denoting the number of powerful resources.
- The second line contains an integer B denoting the number of weak resources
- The third line contains an integer C denoting the number of resources in a balanced mixture