Answered step by step
Verified Expert Solution
Link Copied!

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 small-size resources and B number of medium-size resources and C number of large-size resources. A valid resource system is a system of 3 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 3 parameters and returns the required answer.
A. Represents the number of small-sized resources
B Represents the number of medium-sized resources
C Represents the number of large-sized 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 small-sized resources
The second line contains an integer B denoting the number of medium-sized resources.
The third line contains an integer C denoting the number of large-sized resources
Output format
Print the maximum number of valid resource systems you can make with available resources.
Constraints
0A, B,C 10
Sample input
Sample output

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

DB2 11 The Database For Big Data And Analytics

Authors: Cristian Molaro, Surekha Parekh, Terry Purcell, Julian Stuhler

1st Edition

1583473858, 978-1583473856

More Books

Students also viewed these Databases questions