Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Asta and Kelly like prgramming. but Asha practices more thari Kelly. Not wanting to fall beind. Kelly resolves to practice more. Let's say Asha s
Asta and Kelly like prgramming. but Asha practices more thari Kelly. Not wanting to fall beind. Kelly resolves to practice more. Let's say Asha s of days it wil take for Kelly to have solived move problems than Asha? solves A problems pe day and Kelly solves K problems per day. Asha is already P problerns ahead of Kelly. What is the minimum nu Complate thc minNum function in your editor. It has 3 paramctors 1. An integer A 2 An integerK An integer P It must roturn tha minimum number of days needed by Kelly Input Fonmat I he locked stub code in your editor reads the-ollowing 'nput trom stdin and passes it to your function: The first line contains an intecer A Second line contains an integer K Next liri ttintains an integer P Constraints Output Format Your tunction must return the minimum number of days it will take far Kelly to have solved more prablems than Asha. IF it is not passible for Kelly to ge: ahcod of Acha, return I. This is printed to stdout by the locked stub code in your editor. Sample Input Sample Output Asha is problem ahaad af Kally. After day passes, Kally will have salved 5 prablems while Asha will have only solved 3+-4 prablems. Thus, it takes 1 day for Kelly to surpass Asha
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