output_description: Print the smallest possible sum of the digits in the decimal notation of a
  positive multiple of K.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      K
attempt: K = int(input())
  A = [1]
  B = [[x, 0] for x in range(K)]
  C = [1]
  B[1][1] = 1
  while B[0][1] == 0:
      for x in C:
          b = (10 * x) % K
          c = (x + 1) % K
          if b == 0:
              B[0][1] = B[x][1]
              break
          elif c == 0:
              B[0][1] = B[x][1] + 1
              break
          else:
              if b in C:
                  pass
              else:
                  C += [b]
                  B[b][1] = B[x][1]
              if c in C:
                  pass
              else:
                  C += [c]
                  B[c][1] = B[x][1] + 1
  print(B[0][1])
  
problem_description: Statement
  
  Find the smallest possible sum of the digits in the decimal notation of a
  positive multiple of K.
samples: [{"input": "6", "output": "3\n    \n\n12=6\u00d72 yields the smallest sum.\n\n* * *"}, {"input": "41", "output": "5\n    \n\n11111=41\u00d7271 yields the smallest sum.\n\n* * *"}, {"input": "79992", "output": "36"}]