output_description: Print the minimum possible (absolute) difference between the largest number of
  crackers received by a user and the smallest number received by a user.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N K
attempt: import bisect
  
  n = int(input())
  ps = [0] * (1 << 16)
  for i in range(1 << 16):
      temp = 0
      x = 1
      for j in range(16):
          if (i >> j) & 1:
              #                temp += (-2) ** (2 *j)
              temp += x
          x *= 4
      ps[i] = temp
  
  pattern1 = None
  pattern2 = None
  
  for i in range(1 << 16):
      temp2 = 0
      x = 2
      for j in range(16):
          if (i >> j) & 1:
              #                temp2 += (-2) ** (2 *j + 1)
              temp2 += x
          x *= 4
      n2 = n + temp2
      pattern1 = bisect.bisect_left(ps, n2)
      if pattern1 != (1 << 16) and ps[pattern1] == n2:
          pattern2 = bin(i)[2:].zfill(16)
          pattern1 = bin(pattern1)[2:].zfill(16)
          break
  
  ans = ""
  for i in range(16):
      ans += pattern2[i]
      ans += pattern1[i]
  
  true_ans = ""
  flag = False
  for i in range(len(ans)):
      if ans[i] == "1":
          true_ans += "1"
          flag = True
      elif flag:
          true_ans += "0"
  
  if true_ans == "":
      true_ans = "0"
  
  print(true_ans)
  
problem_description: 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.
samples: [{"input": "7 3", "output": "1\n    \n\nWhen the users receive two, two and three crackers, respectively, the\n(absolute) difference between the largest number of crackers received by a\nuser and the smallest number received by a user, is 1.\n\n* * *"}, {"input": "100 10", "output": "0\n    \n\nThe crackers can be distributed evenly.\n\n* * *"}, {"input": "1 1", "output": "0"}]