Answered step by step
Verified Expert Solution
Link Copied!

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 python3 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 10 po ints each car takes 1 hour to charge 1 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 0
Sample Input
N =73
K =53710454
and the Sample Output is 1
Explanation
Here already two cars at the battery level 4 and at nearest have a at battery level 3, it will takes 1 hour to reach the battery level 4. So the total time needed to get the 3 cars at the same battery level is 1 hour.

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

Step: 3

blur-text-image

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

Channel Strategies And Marketing Mix In A Connected World

Authors: Saibal Ray, Shuya Yin

1st Edition

3030317323, 978-3030317324

More Books

Students also viewed these General Management questions

Question

Calculate the largest poverty percentage rate in cell J 1 7 . 1 0

Answered: 1 week ago