Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 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 valeStep 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