output_description: Print the number of integers satisfying the condition, modulo 10^9 + 7.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      K
      D
attempt: K = list(map(int, input()))
  D = int(input())
  
  mod = 10**9 + 7
  
  next_dp = [0] * D
  border = 0
  
  for current_digit in K:
      dp, next_dp = next_dp, [0] * D
      for current_mod, cnt in enumerate(dp):
          for next_mod in range(current_mod, current_mod + 10):
              next_dp[next_mod % D] += cnt
  
      for next_mod in range(border, current_digit + border):
          next_dp[next_mod % D] += 1
  
      border = (border + current_digit) % D
  
      for i in range(D):
          next_dp[i] %= mod
  print((next_dp[0] + (border == 0) - 1) % mod)
  
problem_description: Statement
  
  Find the number of integers between 1 and K (inclusive) satisfying the
  following condition, modulo 10^9 + 7:
  
    * The sum of the digits in base ten is a multiple of D.
samples: [{"input": "30\n    4", "output": "6\n    \n\nThose six integers are: 4, 8, 13, 17, 22 and 26.\n\n* * *"}, {"input": "1000000009\n    1", "output": "2\n    \n\nBe sure to print the number modulo 10^9 + 7.\n\n* * *"}, {"input": "98765432109876543210\n    58", "output": "635270834"}]