Maurice Tutor

(5)

$15/per page/Negotiable

About Maurice Tutor

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Algebra,Applied Sciences See all
Algebra,Applied Sciences,Biology,Calculus,Chemistry,Economics,English,Essay writing,Geography,Geology,Health & Medical,Physics,Science Hide all
Teaching Since: May 2017
Last Sign in: 398 Weeks Ago, 5 Days Ago
Questions Answered: 66690
Tutorials Posted: 66688

Education

  • MCS,PHD
    Argosy University/ Phoniex University/
    Nov-2005 - Oct-2011

Experience

  • Professor
    Phoniex University
    Oct-2001 - Nov-2016

Category > Computer Science Posted 16 Sep 2017 My Price 8.00

halloween night

Uncle Ben is a very kind man and is revered by the whole neighborhood. One halloween night a group of trick-or-treaters come by Ben's house. Uncle Ben has some treats with him but he sees that the children do not have equal number of treats. He feels that it would be unfair to give away the treats to just any of the kids. So he decides to line up all the kids and distribute the treats according to the number of treats that the respective child has, so that he may equalize the number of treats to the best extent. What is the maximum number of children that have equal number of treats. It is not necessary that Uncle Ben give all his treats.

Input

First line has two integers N (1 = N = 100000), number of children and K (1 = N = 107), number of treats Uncle Ben has. The second line contains N integers sepearated by single space, c1, c2, .... ,cn (1 = ci = 106) where ci is the number of treats ith children has.

Output

Output maximum number of children that have equal number of treats.

Example

Input: 4 5 5 5 3 1 Output: 3 Explanation: Uncle Ben gives two treats to 3rd child. So 3 children have five treats each.
There is no way that more than 3 children can have equal treats.

Answers

(5)
Status NEW Posted 16 Sep 2017 03:09 PM My Price 8.00

Hel-----------lo -----------Sir-----------/Ma-----------dam-----------Tha-----------nk -----------You----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------and----------- ac-----------qui-----------sit-----------ion----------- of----------- my----------- po-----------ste-----------d s-----------olu-----------tio-----------n.P-----------lea-----------se -----------pin-----------g m-----------e o-----------n c-----------hat----------- I -----------am -----------onl-----------ine----------- or----------- in-----------box----------- me----------- a -----------mes-----------sag-----------e I----------- wi-----------ll

Not Rated(0)