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: from subprocess import *
  
  call(
      (
          "pypy3",
          "-c",
          """
  r=range
  M=10**9+7
  n=input()
  d=int(input())
  dp=[[[0,0]for j in r(d)]for i in r(len(n)+1)]
  dp[0][0][0]=1
  for i,x in enumerate(map(int,n),1):
    for j in r(10):
      for k in r(d):
        dp[i][(j+k)%d][1]+=dp[i-1][k][1]
        dp[i][(j+k)%d][1]%=M
        if j<x:
          dp[i][(j+k)%d][1]+=dp[i-1][k][0]
          dp[i][(j+k)%d][1]%=M
        if j==x:
          dp[i][(j+k)%d][0]+=dp[i-1][k][0]
          dp[i][(j+k)%d][0]%=M
  print(~-sum(dp[-1][0])%M)
  """,
      )
  )
  
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"}]