305440: CF1032A. Kitchen Utensils
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Kitchen Utensils
题意翻译
厨房用具 国王的生日晚餐有客人参加。晚餐非常成功:每个人都吃过几道菜(尽管每个人的菜数都是一样的),每道菜都配有一套新的餐具。 王国所有的餐具从11件到100100件都有编号。众所周知,每套餐具都是相同的,并且由不同类型的餐具组成,尽管每种特定类型的餐具可能出现在一组中。例如,一套餐具可以由一个叉子、一个勺子和一把刀组成。 宴会结束后,客人们偷了很多餐具了,国王想知道被偷多少餐具。不幸的是,国王忘记了为每位客人准备了多少餐具,但他知道餐后剩下的所有餐具的清单。你的任务是找到被盗餐具的最少数量。题目描述
The king's birthday dinner was attended by $ k $ guests. The dinner was quite a success: every person has eaten several dishes (though the number of dishes was the same for every person) and every dish was served alongside with a new set of kitchen utensils. All types of utensils in the kingdom are numbered from $ 1 $ to $ 100 $ . It is known that every set of utensils is the same and consist of different types of utensils, although every particular type may appear in the set at most once. For example, a valid set of utensils can be composed of one fork, one spoon and one knife. After the dinner was over and the guests were dismissed, the king wondered what minimum possible number of utensils could be stolen. Unfortunately, the king has forgotten how many dishes have been served for every guest but he knows the list of all the utensils left after the dinner. Your task is to find the minimum possible number of stolen utensils.输入输出格式
输入格式
The first line contains two integer numbers $ n $ and $ k $ ( $ 1 \le n \le 100, 1 \le k \le 100 $ ) — the number of kitchen utensils remaining after the dinner and the number of guests correspondingly. The next line contains $ n $ integers $ a_1, a_2, \ldots, a_n $ ( $ 1 \le a_i \le 100 $ ) — the types of the utensils remaining. Equal values stand for identical utensils while different values stand for different utensils.
输出格式
Output a single value — the minimum number of utensils that could be stolen by the guests.
输入输出样例
输入样例 #1
5 2
1 2 2 1 3
输出样例 #1
1
输入样例 #2
10 3
1 3 3 1 3 5 5 5 5 100
输出样例 #2
14