A - AtCoder Crackers 解説 /

実行時間制限: 2 sec / メモリ制限: 1024 MB

配点 : 100

問題文

高橋君は N 枚の AtCoder せんべいを K 人の AtCoder 参加者になるべく公平に配ることにしました。 N 枚すべてのせんべいを配るとき、せんべいを最も多くもらった人と最も少なくもらった人のもらったせんべいの枚数の差(の絶対値)の最小値を求めてください。

制約

  • 1 \leq N,K \leq 100
  • 入力はすべて整数である

入力

入力は以下の形式で標準入力から与えられる。

N K

出力

せんべいを最も多くもらった人と最も少なくもらった人のもらったせんべいの枚数の差(の絶対値)の最小値を出力せよ。


入力例 1

7 3

出力例 1

1

3 人にそれぞれ 2,2,3 枚の AtCoder せんべいを配った場合、せんべいを最も多くもらった人と最も少なくもらった人のもらったせんべいの枚数の差(の絶対値)は 1 です。


入力例 2

100 10

出力例 2

0

均等に配ることができます。


入力例 3

1 1

出力例 3

0

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