Question: i need efficient code that doesn't timeout as soon as possible Save the Soap Factory locked Problem Submissions Leaderboard Discussions Submissions: 37 Max Score: 25

i need efficient code that doesn't timeout as soon as possible

i need efficient code that doesn't timeout as soon as possible Savethe Soap Factory locked Problem Submissions Leaderboard Discussions Submissions: 37 Max Score:25 Difficulty: Easy A factory producing powdered soap is about to run

Save the Soap Factory locked Problem Submissions Leaderboard Discussions Submissions: 37 Max Score: 25 Difficulty: Easy A factory producing powdered soap is about to run out of business because the price of the soap, e dollars, is too expensive. However the soap is very high quality and reducing the price may affect the brand. One of the employees, Jake, creates two proposals to increase the powdered soap sales. Proposal 1: If a customer buys b times as much soap in one week than in the previous week, then the customer will receive a rebate of d % on the previous week's purchase(s). If the customer maintains this pattern of buying b times as much as in the previous week, after the first two weeks the customer will receive a d9% discount on the soap ordered that week. The very first week, the customer is required to buy only 1 lb of soap. The value of bis recorded as b/b, where b; and by are integers. Rate This Challenge More Proposal 2: If a customer buys 1 lb of soap in the first week and in the followng weeks, always orders a lbs more than in the previous week, then the customer receives a rebate of e% on the previous week's order. In both proposals the customer does not recieve his rebate on his current order until the next week when he pays for the new order (which would meet the respective requirements). Assuming that in each case, a customer remains committed to the requirements of the proposal, Jake is convinced that Proposal 1 always yields more revenue for the factory from a single customer, but he is having trouble determining when it would happen. Help Jake determine the minimum number of weeks required for the cumulative money spent by a single customer under Proposal 1 to exceed that of Proposal 2. Input Format Three lines: the first line has the cost, the second line contains the values for proposal 1 and the third line contains the values for proposal 2 by badde Constraints 10%

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!