Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Need python 3 solution for the same asap The Car company has manufactured N number of cars, out of this they need K number of
Need python solution for the same asap
The Car company has manufactured N number of cars, out of this they need K number of cars with the same battery level to check the durability of car ba batteries. The total capacity of the car battery is po ints each car takes hour to charge point. Create a function to find the minimum number of ti me to charge K cars to get the same level of battery
the function getCars should take two lines of inputs, the first line of input will be the number of cars there N and number of cars needed K then the second line of input will be the battery level for the N number of cars. In
the output print the minimum number of hours needed to get the K number of cars with the ame level of battery.
Sample Case
Sample Input
N
K
and the Sample Output is
Explanation
Here already two cars at the battery level and at nearest have a at battery level it will takes hour to reach the battery level So the total time needed to get the cars at the same battery level is hour.
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