Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Question 3 Given x no . of houses in a city. You have to divide these houses into Y no . of localities such that
Question
Given no of houses in a city. You have to divide these houses into no of localities such that every locality has at least one
house. Also, every house in a locality should have a telephone connection wire with each of the other houses in the same locality.
No need to connect any house with the houses outside its own locality.
You are given integers X and Y X: Represents the number of houses Y: Represents the number of localities
Write a function that takes & as arguments & prints the minimum and the maximum number of telephone connections
required to design the city accordingly.
Example:
Ex:
Input :: Output Min: Max:
Ex:
Input :: Output Min: Max:
NB: The code must be proficient enough to handle inputs of numbers up to
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