output_description: Print the value \sum_{K=1}^N K\times f(K).
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
attempt: from math import factorial
  from functools import lru_cache
  
  n, v = map(int, input().split())
  m = 10**9 + 7
  # r!(0>r>M)
  lis = [0]
  
  
  def permutation(n, x, mod=10**9 + 7):
      # nPx
      # 順列
      # ex) permutaion(5, 2) = 20
      tmp = 1
      for i in range(n, n - x, -1):
          tmp = (tmp * i) % mod
      return tmp
  
  
  def comb(n, k, p):
      """power_funcを用いて(nCk) mod p を求める"""
      if n < 0 or k < 0 or n < k:
          return 0
      if n == 0 or k == 0:
          return 1
      a = factorial(n) % p
      b = factorial(k) % p
      c = factorial(n - k) % p
      return (a * power_func(b, p - 2, p) * power_func(c, p - 2, p)) % p
  
  
  @lru_cache(maxsize=1000)
  def power_func(a, b, p):
      """a^b mod p を求める"""
      if b == 0:
          return 1
      if b % 2 == 0:
          d = power_func(a, b // 2, p)
          return d * d % p
      if b % 2 == 1:
          return (a * power_func(a, b - 1, p)) % p
  
  
  acc = 0
  for j in range(n + 1):
      s = comb(n, j, m)
      t = s * permutation(v, j, m) % m
      acc += ((-1) ** j) * t * (permutation(v - j, n - j, m)) ** 2 % m
  print(acc % m)
  
problem_description: Statement
  
  For a positive integer X, let f(X) be the number of positive divisors of X.
  
  Given a positive integer N, find \sum_{K=1}^N K\times f(K).
samples: [{"input": "4", "output": "23\n    \n\nWe have f(1)=1, f(2)=2, f(3)=2, and f(4)=3, so the answer is 1\\times 1 +\n2\\times 2 + 3\\times 2 + 4\\times 3 =23.\n\n* * *"}, {"input": "100", "output": "26879\n    \n\n* * *"}, {"input": "10000000", "output": "838627288460105\n    \n\nWatch out for overflows."}]