Answer to Question #250785 in Python for Vijay

Question #250785
There are M number of boys, N number of girls and P number of pets given. A pet race is held for a fun filled Sunday in a town. Each pet animal is accompanied by two persons for the race. The organisers are planning for the group has three members, and among these members, there is at least one boy and at least one girl, the third member being a boy, a girl or a pet. One bench is required for each such group.
The task is here is to find the maximum number of benches required for this
1
Expert's answer
2021-10-13T12:02:37-0400
m = int(input("Number of boys: "))
n = int(input("Number of girls: "))
p = int(input("Number of pets: "))
group = min(m, n, p)
print("The number of groups:", group)

Example:
Number of boys: 3
Number of girls: 4
Number of pets: 5

The number of groups: 3

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS