Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Resource power Given A number of small - size resources and B number of medium - size resources and C number of large - size
Resource power
Given A number of smallsize resources and B number of mediumsize resources and C number of largesize resources. A valid resource system is a system of resources in which all resources are of the same type or all resources are of a different type.
You are given integers A B and C Print the maximum number of valid resource systems you can make with available resources.
Function description
Complete the function Resource This function takes the following parameters and returns the required answer.
A Represents the number of smallsized resources
B Represents the number of mediumsized resources
C Represents the number of largesized resources
Input format for custom testingNote: 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 smallsized resources
The second line contains an integer B denoting the number of mediumsized resources.
The third line contains an integer C denoting the number of largesized resources
Output format
Print the maximum number of valid resource systems you can make with available resources.
Constraints
A BC
Sample input
Sample output
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started