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: # coding: utf-8
  # Your code here!
  
  from datetime import datetime
  K = int(input())
  start = datetime.now()
  def KSum(n):
      k = 0
      for i in str(n):
          k += int(i)
      return k
  
  m = KSum(K)
  j = 1
  while((datetime.now()-start).total_seconds() < 1.8):
      for x in range(100):
  	    P = KSum(K*j)
      	if m > P:
          	m = P
      	j += 1
  print(m)
  
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"}]