appleman has n cards. each card has an uppercase letter written on it. toastman must choose k cards from appleman's cards. then appleman should give toastman some coins depending on the chosen cards. formally, for each toastman's card i yo
appleman has n cards. each card has an uppercase letter written on it. toastman must choose k cards from appleman's cards. then appleman should give toastman some coins depending on the chosen cards. formally, for each toastman's card i you should calculate how much toastman's cards have the letter equal to letter on ith, then sum up all these quantities, such a number of coins appleman should give to toastman.
given the description of appleman's cards. what is the maximum number of coins toastman can get?
