101050: [AtCoder]ABC105 A - AtCoder Crackers

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Score : $100$ points

Problem Statement

Takahashi has decided to distribute $N$ AtCoder Crackers to $K$ users of as evenly as possible. When all the crackers are distributed, find the minimum possible (absolute) difference between the largest number of crackers received by a user and the smallest number received by a user.

Constraints

  • $1 \leq N,K \leq 100$
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

$N$ $K$

Output

Print the minimum possible (absolute) difference between the largest number of crackers received by a user and the smallest number received by a user.


Sample Input 1

7 3

Sample Output 1

1

When the users receive two, two and three crackers, respectively, the (absolute) difference between the largest number of crackers received by a user and the smallest number received by a user, is $1$.


Sample Input 2

100 10

Sample Output 2

0

The crackers can be distributed evenly.


Sample Input 3

1 1

Sample Output 3

0

Input

题意翻译

高桥决定将 $N$ 个 AtCoder Crackers 尽可能平均地分配给 $K$ 个用户。 分发所有饼干后,找到用户收到的最大数量的饼干和用户收到的最小数量的饼干之间的最小可能差(绝对)。

加入题单

算法标签: