Question: please can you help me to solve this by java On children's day, a teacher wants to distribute candies to all her students. She has

 please can you help me to solve this by java On

please can you help me to solve this by java

On children's day, a teacher wants to distribute candies to all her students. She has N candies, and each candy has a special value. She wants all candies to have the same special value so she decides to reduce the special values of some candies. However, the special values of all the candies cannot be reduced. Hence, she decides to reduce the special values for as much candies as possible so that at least K candies have the same special value and this value must be as large as possible. Find the maximum value that the teacher can achieve. Input Specification: input1: N, total number of candies innutt. K sandies havine the same snecial vale

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!