output_description: Print the number of ways modulo $10^9+7$ in a line.
input_description: $n$ $k$
      
  
  The first line will contain two integers $n$ and $k$.
attempt: # -*- coding: utf-8 -*-
  # 文字列の入力
  import math
  
  n, k = map(int, input().split())
  
  
  def cmb(n, r, mod):
      if r < 0 or r > n:
          return 0
      r = min(r, n - r)
      return g1[n] * g2[r] * g2[n - r] % mod
  
  
  mod = 10**9 + 7  # 出力の制限
  N = 10**4
  g1 = [1, 1]  # 元テーブル
  g2 = [1, 1]  # 逆元テーブル
  inverse = [0, 1]  # 逆元テーブル計算用テーブル
  
  for i in range(2, N + 1):
      g1.append((g1[-1] * i) % mod)
      inverse.append((-inverse[mod % i] * (mod // i)) % mod)
      g2.append((g2[-1] * inverse[-1]) % mod)
  ans = 0
  
  for i in range(1, n + 1):
      ansb = 0
      for j in range(1, i + 1):
          ansb += ((-1) ** (i - j)) * cmb(i, j, mod) * (j**n)
      ansb /= math.factorial(i)
      ans += ansb
  print(int(ans))
  
problem_description: You have $n$ balls and $k$ boxes. You want to put these balls into the boxes.
  
  Find the number of ways to put the balls under the following conditions:
  
    * Each ball is distinguished from the other.
    * Each box is **not** distinguished from the other.
    * Each ball can go into only one box and no one remains outside of the boxes.
    * Each box can contain an arbitrary number of balls (including zero).
  
  Note that you must print this count modulo $10^9+7$.
samples: [{"input": "3 5", "output": "5"}, {"input": "5 3", "output": "41"}, {"input": "100 100", "output": "193120002"}]