Answered You can hire a professional tutor to get the answer.

QUESTION

It is a Python Programming problem. You and K1 friends want to buy N different pieces of candy. Candy piece i costs pi.

Hey tutors,please help me out. It is a Python Programming problem.

You and K−1 friends want to buy N different pieces of candy. Candy piece i costs pi. The candy shop owner is greedy and wants to maximize his number of new customers, so he increases the sale price of the candy for repeated customers; more precisely, if a customer has already purchased x pieces of candy, then the cost of candy i is Ci∗(x+1).

Find and print the minimum cost for your group to purchase all N pieces of candy.

The input:

N: the number of
Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question