output_description: Print the number of Product Days in a year in Takahashi Calender.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      M D
attempt: n, k = map(int, input().split())
  l = list(map(int, input().split()))
  mod = 10**9 + 7
  a = 0
  for i in range(n):
      b = l[i]
      t = (len([1 for m in l if m < b]) % mod) * (int((k - 1) % mod * k // 2) % mod) % mod
      # print(i,b,t)
      s = (len([1 for m in l[i:] if m < b]) % mod) * k % mod
      #  print(s)
      a += (s + t) % mod
  print(a % mod)
  
problem_description: Statement
  
  Today is August 24, one of the five Product Days in a year.
  
  A date m-d (m is the month, d is the date) is called a Product Day when d is a
  two-digit number, and all of the following conditions are satisfied (here
  d_{10} is the tens digit of the day and d_1 is the ones digit of the day):
  
    * d_1 \geq 2
    * d_{10} \geq 2
    * d_1 \times d_{10} = m
  
  Takahashi wants more Product Days, and he made a new calendar called Takahashi
  Calendar where a year consists of M month from Month 1 to Month M, and each
  month consists of D days from Day 1 to Day D.
  
  In Takahashi Calendar, how many Product Days does a year have?
samples: [{"input": "15 40", "output": "10\n    \n\nThere are 10 Product Days in a year, as follows (m-d denotes Month m, Day d):\n\n  * 4-22\n  * 6-23\n  * 6-32\n  * 8-24\n  * 9-33\n  * 10-25\n  * 12-26\n  * 12-34\n  * 14-27\n  * 15-35\n\n* * *"}, {"input": "12 31", "output": "5\n    \n\n* * *"}, {"input": "1 1", "output": "0"}]