一锐马上要过生日了,他打算邀请m个朋友来他家一起过生日。
他相信每个好朋友都会送一份精美的生日礼物给他,
他为了表达谢意,打算把他珍藏多年的n本卡通书拿出来回赠给来参加他生日Party的好朋友们。
为了公平,他希望尽可能让每个好朋友拿到的卡通书差不多,
也就是所有好朋友中拿到的卡通书最多的那一个(假设为x本)和最少的那一个(假设为y本)的差值尽可能的小(即|x-y|这个值尽可能的小)。
如果n正好能够被m整除,那么每个好朋友拿到的卡通书就一样多了。
Polycarpus has got n candies and m friends (n ≥ m). He wants to make a New Year present with candies to each friend.
Polycarpus is planning to present all candies and he wants to do this in the fairest (that is, most equal) manner.
He wants to choose such ai, where ai is the number of candies in the i-th friend's present, that the maximum ai differs from the least ai as little as possible.
For example, if n is divisible by m, then he is going to present the same number of candies to all his friends, that is, the maximum ai won't differ from the minimum one.